Sunday, 27 March 2022

Cruiser-X 79: Another two new levels

 Yet another fun session in building two different levels. The first level was done on Tuesday afternoon, and yesterday I was playing around with PRG2TAP and Freeload. I could be using these two tools to generate a multi-load tape version of Cruiser-X 79 some time in the future as well as D64. 

 Today I have focused more on the "Cruiser-X 79" game project. This morning I constructed level 2. The second level is where the player enters an alien base. The idea of the second level was to add a slightly higher difficulty compared to level 1, but of course not too hard. I created a nice blue zone, in which the player has to fight through. The level is slightly less kind than level 1 when it comes to power ups. I wanted to make a few things interesting. One thing of which was to draw a parallax void. Also, I felt that I had to made a few alterations to some of the tiles for that particular level. 

The next step I considered about was to try and find quicker and easy way to level pack graphics and music, then compile the entire project to a D64. Dragging and dropping filenames for each level (especially if updated) can be very daunting. It also makes me worry about making big mistakes with the project. I come up with an alternative solution. Last week I was compiling the 16KB intro creation competition through ACME cross-assembler. I created a batch file which allowed to compile all of the re-mastered intros onto a D64 via a command-line tool called CC1541. 

I thought that I try and make a tool-chain batch file which can help me more in level crunching of the level charset, tiles data, map data and music and then compiling a complete game disk image. So I created a batch file called buildit.bat and created shell commands to call ACME cross assembler to compile the title screen code, and exomizer to crunch it. Then I called Exomizer to pack each level data that was made so far. Then called commands for CC1541 to compile all of the necessary files into a D64 called CRX79.D64. When I do more level data in the future, I can easily adapt the batch file to level crunch that data and compile it to CRX79.D64. Then execute VICE to run the D64 image.

I compiled the source, automatically called the batch file, and waited a few seconds for level crunching and other algorithms to take place. Then VICE ran the CRX79.D64 image. The game was automatically set to cheat mode. This is because at the moment I am more interested to see how the level maps turned out. There was a fault. The graphics ended up as garbage. It seems that the music files worked fine. What caused that fault? Well, the map data is a raw binary image. Raw binary images have an offset of two bytes. Basically, they are two bytes ahead compared to a normal PRG file. So I set the load address for all of the binary files two bytes in front (Charset $0802, tiles $b002, map $4802). 

After compressing and compiling a few times I ended up with a working map, for level 1. Then level 2 turned out good. I had a good blast and I was pretty pleased with how the second level turned out. It features a nice static parallax effect inside parts of the alien base. The music also sounds great for the second level. 


Now that I have finished constructing and compiling level 2. I decided to work on level 3. Level 3 is back in space, but with a slightly different background for the alien base. I decided to make level 3 as crystal space. The stage is supposed to be slightly more harder, compared to levels 1 and 2. Level 3 also introduces deadly background (There will be even more as stages progress). The alien groups are still the same as before, but are spawned in a different order. However, the stage gets more difficult, but not impossible. 

I felt that I should alter the chars of some of the tiles, so that they were not too much the same as level 1 and level 2 were. The result turned out quite good. After completing the map, I exported the charset, tile and map data into the binaries folder, and then I edited the level loading tables to load three new files c03, t03, g03 and m03 (Charset, tile data, map data, music data). Then I edited the batch file more to level crunch all of level 3's data and also compiled the game project in C64Studio. At first while I was testing level 3, I ended up with a blank map. It appeared that I didn't save the binary files as correct files. After re-packing, compiling and running in VICE. The third level was working great. 


I am very pleased with how the project has been turning out so far. There may only be 3 levels, but the overall result feels like a good old school game project - in which it intends to be that way. 3 levels complete. 13 more levels to go, and hopefully another 2 or more later on this week. Depending on free time available of course. 




No comments:

2023 at a glance

2024 is here, and 2023 has been a really quiet year on the production front due to everything that had gone back to normality. The year has ...