Tutorial game: Let’s level design! (part 5)

This one is more straight-forward.

In the previous tutorial, we created a character with 2×2 blocks set and then painstakingly painted them on the screen using code. In this part, we’ll start by creating a TRSE level that will later automate the rendering process.

First, make sure you have a character set with 2×2 blocks at hand. We’ll be using the one that was created in part 4.

Start by creating a new TRSE level file: “New -> image/charset/sprite” -> C64 level editor“. You should now be presented with the level editor data dialog:

Note: be sure to click the “CharColors” at the bottom of the form! By using colors defined by the character set, we are effectively halving the size of the levels (which can be seen in the “total size” here). Just keep the other parameters as is. In case you are wondering:

  • Screen width represents number of 2×2 blocks in the x axis (20*2 = 40)
  • Screen heigh represents number of 2×2 blocks on the y axis (10*2  = 20)
  • Each level will then be 20*10 = 200 bytes
  • In addtion there will be chunk size*data chunks = 64 bytes extra per level that you can fill with whatever info you need – monster information, items etc.
  • There is an with an addition 3 bytes for color information (background, multicolor 1 and multicolor 2)
  • This yields a total of 200 + 64 +3 = 267 bytes per level
  • There are levels x*levels y levels in total = 16 * 267 = 4304 bytes in total.
  • Screen rendering will be started at x=0 and y =2

Click OK and start by saving your new file to a new directory “levels/level1.flf“.

The next important thing to do is define your character set. Click on the “charset” tab and use the “load charset” button to load your previously created character set (like charsets/charset1.flf).

You can select your current character by clicking on one of the character icons on this tab. But first, we need to decide on a better-looking suite of multicolors for this particular screen: in the “colors” tab, select some suitable multicolor 1 & 2.

You’re now good to draw your levels! Here’s something that I made in 30 seconds:

Now use W/A/S/D to navigate your 4×4 maze of levels and create 15 more screens (or wichever number before falling asleep). Remember to specify the multicolor colors for each screen. You can also enjoy an overview of the levels on the “levels” tab. Here are the 4 screens I ended up creating:

Make sure to save your file!

In the next tutorial part, we’ll be including this .flf file in Turbo Rascal SE and hopefully be able to render the levels correctly.