Friday, 23 August 2013

Here comes the Blob

17th-23rd August 2013

Last week and throughout this week, some people didn't hear from me for a while via email. Some people wondered what the heck happened to me. Well, I have been really busy on this project. As well as some classic gaming :) I also been on holiday for 2 weeks in Lydstep, Tenby as well, away from computers. There were wifi access points down there - but very limited. I wanted to get away from internet anyhow. It is too much of a distraction these days. Although the deadline isn't until 30th November to get the project finished and submitted to RGCD. I have a feeling that I will have it finished way before that particular date.

So then, what has been happening. Before I went on holiday for 2 weeks, between 27th July - 10th August. I was constructing the main game screen, using Jon Well's magnificent Multi Screen Construction Kit. This was only used to design one screen. When I checked the screen out, the size was 2 chars too small. So I expanded the grid and by adding just one more row of tiles to it. I also changed balls to blobs. The numeric counter was changed to blob symbols as well. Some different tiles were created. Those represented different obstacles, such as a normal tile, inverted tile, holes/traps, steel trapdoor, trapdoor switch, arrow pushers, and tiles that push you back to the previous tile. Then saved all of the graphics data, for just in case any adjustments or new tiles are planned. I also composed the title music for the game using Goat Tracker (See video below)



After finishing the game design grid, I captured the screen and transferred all existing screen and colour data directly to a memory location, using the T 0400 07e8 2000 (screen data), and T D800 DBE8 2400 (colour data) in VICE monitor. Then I closed down the VICE monitor and entered the Action Replay M/C monitor to save the data from $2000-$27e8 on to a .D64 image. Detatched the .D64 image and exported it to the C64 Studio project.Then I drew the sprites for the game.

The next step was to do some programming. The first thing I did was extracted all data into to the project directory, in which was called 'Invert'. I also added Exomizer to the directory as well. Compression is the key to starting a program :). I set up the main parameters inside C64 Studio to call  exomizer to compress the assembled binary, and  rename it to run via the decruncher, with no decrunch effect  (10 SYS 2061). Then I started the main programming of the level design. I based the level design on comparing which tiles are to be in place - as the level design was to be made manually by using the !byte command, using a row of 11 and a column of 10. Each number from 0 to 9 inside the table represented the object to be placed into the game area. I created a few routines in which read from the first tile character in each row, added 2 chars to place the next tile. I did separate low/high byte pointers to start from $0452, $0453, $047a, $047b, $d852, $d853, $d87a, $d87b and created a few loops which moved to the next tile character by 2 chars. Therefore with 2x2 chars, I used $0452 for the starting point of the top left tile, $0453 as starting point of the right tile, $047a as starting point of the bottom left tile, and the $047b as the starting point of the bottom right tile. I then added a few loops / subroutines to perform the action. Then it drew the correct test map on to the screen. The $D8xx + represented the colours.

My next step was to add the main player, a bluey blob in which was to be controlled by using a joystick plugged into port 2. I added some routines in which controlled the player. Basically, if the player was moving, and the joystick direction was being read at the same time. That process gets ignored, as the player is moved using a timer. After I was happy with this. I added the sprite/background collision routines, which compared which tiles the player was currently on after stopping on that particular tile. I got the effects to occur. One of which flashed the border (just for a test) if the player was on the hole tile. I was very happy with the overall result, I moved on to something else.

Now the sprite/background collision was ready, I loaded up Sprite Pad V1.8 and drew the player's animation frames. I originally had just 1 sprite for the player at first. Each frame represented the blog expanding and deflating. I liked what was done so far. So I saved the sprite data to C64 format again and inserted into the project. The next step was to program the sprite animation, where the player expanded and deflated at a certain speed. I programmed the routine in and it turned out quite nicely.

Back to programming the main levels. This time testing whether or not all tiles were correctly inverted to how they should look. After getting the routine working. I flashed the border again to say that the level was complete. I also programmed the clock routine. What a happy chap I was with this result.

Now came the nightmare, which I had for a few days. I designed 4 test levels, but after a level was finished. The tile data from the next level was out of place. I was pretty confused about how that happened. It puzzled me until yesterday. It turned out that I had forgotten to add the low and high byte values of the starting characters, which should initialise the first character and colour RAM position for each corner of the very first row of tiles. After that was solved. I programmed some messages to show LEVEL COMPLETE, LIFE LOST and GAME OVER. Then I was in the mood for doing some music.

I loaded up Goat Tracker V2.27 and worked on the in game music. Unlike the first tune which was used for the game, I wanted to do something pretty funky and quite cheerful. So I did a sort of funky cheery jazz type of tune as in game music inspired by demo scene musicians such as PRI, JCH, Drax, Syndrom, etc. Then added a game over jingle, inspired by the game over jingle from the "Artris" demo, by Scruffy Bits/Color7, which appeared in Commodore Format's cover tape #53. The result turned out pretty good. I generated a .SID file, and tested the .SID. Great, it worked. Now I transferred the music to the game project source, as .prg. I added some more routines in the game which plays the music. Awesome. It suits the game well. 

Now it was back to Sprite Pad V1.8 again, so I can add some explosions to the animation. This occur when the player loses a life, but first the blob sinks through the ground (or hole) magically. This can happen when time runs out or the player falls through a hole. I exported the new sprites to the project directory, then programmed the life lost routine, where the player gets killed. It looked quite good, but I wanted to add one more thing to the life lost routine. Shaking screen during the explosion. The pointers inside the explosion loop also read the animation table for the screen shake. Then restores the screen back afterwards. Wonderful. I love the overall result so far. So then what next? A real C64 test.


I copied the compiled .PRG to my 1541U2 and tested the game in action. Unfortunately, it looks as if I may need to adjust the correct tiles slightly as on the PAL monitor (TV) it doesn't look all that good. Still that won't really be much of a problem. Just a slight character change, and it will probably look much better. Everything else seems to be ok. More on this next week, as I am intending to get the FINAL touches done with Trance Sector Ultimate for RGCD tomorrow (Saturday) morning. Just a final bug fix for that.


I recently received an email from JSL offering me a front end logo for this game. Well, I am happy to take this, but I just hope it will be a 3 colour logo consisting of  7 or 8 chars down. There'll be no pressure either. After all, this is a hobby project - not exactly real life work :) I would like to to add one or two logo swing routines to the front end, so a 3 colour logo would ideal.For now, I shall enjoy a cup of tea. Then off to work in under an hour's time. Enjoy the game play video so far and tune in to another blog update, probably next week. Cheerio!


1 comment: