My second take on subtune 4 of C64’s Rambo 2

The midnight has passed and I’m on fever.. I spent the whole passed day improving my first take on subtune 4 of C64’s Rambo 2. Now, I’m somewhat satisified with the result (below is fixed version):

Finally fixed version

Among other bits and pieces I added a small ending to the tune. Not so good one, though.

Making music takes a lot of time, but it is relaxing and covering old C64 tunes, takes me back in time. I guess I will continue making music, because it’s so hard to find time and energy to other programming than studying work…

I’ve started to code my dream game :-)

I’m still big fan of C64’s Ultima IV & V. Since playing those games, I’ve wanted to make some kind of 2D Ultima game myself and now I’ve started…

Though in my limited spare time, it will take probably quite a long time to finish this game. Not only coding takes time, but also to come up with some nice story for the game…

This is what I’ve done so far (far from perfect…):

Hopefully I will be able to make at least a ”mini version” for the Amiga, too.

Demonstration of speed of C64’s basic

Ah, this takes me way back in time… Just wanted to test the speed of C64’s basic with a simple program of controlling a worm. The video:

It was 1987 when I last coded with Commodore 64. ..and I admit it: I never learned 6502 / 6510 assembly well.. On Amiga I have done 680×0 assembly coding a lot, though…

Let’s see a picture of the source code:

1024 is the starting address of C64’s screen memory and 56320 is the address of joystick port 2.

If you want to download the d64 image with the program, it’s available below:

VERY fun way to play C64’s Pitstop II

It was, when I was about 10 – 11 years old, when I invented this kind of style to beat the computer player on Commodore 64’s Pitstop II. Watch the video:

The computer player is stuck behind me and AI computer player and eventually the computer player’s tires will blow up. After that, it’s easy to win the race. 🙂

This might be very fun with two human players. 🙂

For Relaxation: THE C64 Joystick with Manic Miner 64DX

Commodore 64 gets still new games or remakes of the old ones. In the end of the year 2019 was released Manic Miner 64DX. I tried my new retro joystick with it. The video below may give a picture can it be used for playing this kind of game:

Manic Miner 64DX for the Commodore 64

If you want to download this game, here’s the link: https://csdb.dk/release/?id=185586

Playing old retro games helps me to cut loose from my hard studies. This is perhaps because playing retro games today is not so serious as it was back in the day when the games were new.

Some pictures of the joystick:

Retro games also take me back in time. As a programmer I also think at the same time while playing the how the games might be programmed.

Map Editor now at version 0.13

I have started to code my dream game, some kind of 2D Ultima style game. At the moment the visibility blocking routine is working somehow, perhaps it now good enough for me…

When making the game, I noticed that I have to improve and fix my Map Editor a bit. Current version of the Map Editor is 0.13.

What’s new in it, is:

  • The world map can be filled with selected tile
  • The world map can be viewed as whole and by clicking somewhere of the map in whole, the editing continues from that area

Since I don’t have any certificate to sign the exe at the moment, version 0.13 comes with only source code and other files to be compiled with BlitzMax. Once you have installed BlitzMax ,compiling is easy: Just hit the rocket symbol and you have the exe.

Check the short video of the editor:

Map Edtor v0.13

I might share a video of the Ultima style game I’m making later…

Merry Christmas!

This autumn was quit tough with studies for me.. Functional programming in Haskell is difficult.

But the autumn is over and the Christmas knocks on the door… Here’s little Christmas intro I wrote in Cerberus X:

The next semester is going be even more tough: I’m going to start and finish my Bachelor of Science thesis. That includes seminar and some education on writing academic text. And of course I’m having some other courses too.

What this means to Blue Bit Entertainment is, that I probably won’t have lots of time and energy for it.

Hard work.. But..

Merry Christmas and Happy New Year 2020 to all of you!

Easy Math Challenge v2.0 — now with sound again!

I have rewritten Easy Math Challenge in Cerberus X and now the game is with sound again. In the video below, the music is added to the video and the sound effects are off. The video is made with my phone and it was not allowed to record the sound.

When you have solved enough puzzles, you’ll get into a resting screen where there is different background music and old school text scrolling.

The game is a good time killer while sitting for example in a train. 🙂

Mid, Left & Right functions for Strings in Cerberus X

It’s beginning to be late night, but I want share these with you.

Many of you probably remember Mid, Left and Right functions for strings in basic programming languages.

  • Mid returns from given position x amount of chars
  • Left returns from left x amount of chars
  • Right returns from right x amount of chars

These are easy to implement in Cerberus X, since it has nice string slicing methods.

Implementation for Mid:

Method Mid:String(str:String, startPos:Int, howMany:Int)
        Return str[(startPos)..(startPos+howMany)] 
End

Implementation for Left:

Method Left:String(str:String, howMany:Int)
     Return str[0..howMany]
End

Implementation for Right:

Method Right:String(str:String, howMany:Int) 
     Return str[(str.Length()-howMany)..(str.Length())]
End

You can test these for example with print Mid(“This is String”,5,2).

That’s it for tonight..

Font Class for my Font 2 PNG’s fonts in Cerberus X

My studies keep me really busy and tired… Still, I’m working on Cerberus X version of Easy Math Challenge, because there seems to be problem with sound in Monkey2 with 64-bit compilations for Android.

Anyway, here’s direct implementation (earlier I did this for Monkey X) of font class to use with fonts made in my Font 2 PNG for Cerberus X.

The source (the code is directly from my Cerberus X editor, but highlighting isn’t quite right):

Import mojo2
Import brl.databuffer

Class MyFont
	Field maxHeight:Int
	Field fontDat:DataBuffer
	Field gfxFont:Image
End

Class FontTest Extends App

	Field bg:Image
	Field font1:MyFont
	Field canvas:Canvas
	
	Method OnCreate:Int()

		bg = Image.Load("cerberus://data/bg.jpg",0,0)
		
		' -------
		' Font
		' -------
		font1 = New MyFont
		font1.gfxFont = Image.Load("font.png")
		font1.fontDat = New DataBuffer(95*4*2) ' 95 characters, for each character two 4 byte integers
		font1.maxHeight = 51
		font1.fontDat = DataBuffer.Load("cerberus://data/font.dat")		
		
		canvas = New Canvas()
		
		Return 0
	End

	Method OnRender:Int()
	
		canvas.DrawImage(bg,0,0)

		' drawString assumes, that we have a canvas called canvas
		drawString(font1,"Sample Text", (640 - (stringWidth(font1, "Sample Text"))) / 2, 60)		
		canvas.Flush()
		
		Return 0
	End
	
	Method drawString(font:MyFont, text:String, x:Float, y:Float)
		Local len = text.Length()
		
		Local chrs:Int[]
		chrs = text.ToChars()
		
		For Local i = 0 To len - 1
			'                          width of a character in font                                          pos. of character in font
			canvas.DrawRect(x, y, font.fontDat.PeekInt((chrs[i]-32)*4*2 + 4), font.maxHeight, font.gfxFont, font.fontDat.PeekInt((chrs[i]-32)*4*2), 0, font.fontDat.PeekInt((chrs[i]-32)*4*2 + 4), font.maxHeight)
			x = x + font.fontDat.PeekInt((chrs[i]-32)*4*2 + 4)
		Next
 
	End
	
	Method stringWidth:Int(font:MyFont,text:String)
		Local len:Int = text.Length()
		Local chrs:Int[]
		Local length:Int = 0
		
		chrs = text.ToChars()
		
		For Local i:Int = 0 To len - 1
			'                                width of character in font
			length = length + font.fontDat.PeekInt((chrs[i]-32)*4*2 + 4)
		Next
		
		Return length
	End
		
End

Function Main:Int()
	New FontTest()
	Return 0
End

I’m a bit lost for words, but if you find my “poor man’s Font 2 PNG” useful, feel free to use this code.