Friday, 19 June 2020

Turbo Tomato: Colouring In

In the previous devlog, I discovered a seemingly small change to a level timer required a lot of extra work to make the changes in my VSCode development environment.

This week it was the same, only more.

It's been a while - 23 years - since I worked on Turbo Tomato, and not everything in the game has aged well. I had already pulled some features that were never going to fly today, and this week started with deciding to replace the collectable bonus and powerup items that drop when an enemy is destroyed.

Each powerup has it's own sound effect, but examined today these are inconsistent and don't always make it clear to the player what has happened. I decided to replace this approach with a single effect and little bouncing sprites of text to explicitly say what each collected powerup was.

I needed to add some graphics for these texts, so I opened up the collectables source image and got to work. I soon realised that many of the collectable sprites themselves were similarly inconsistent and unclear, and needed to be redrawn.

Redrawing sprites meant choosing a palette of 16 colours. I was aware that each level could have it's own palette, but how many palettes were actually in use? A quick bit of Python later revealed there were many, with varying colour orders and degrees of similarity, and it would basically be impossible to get the new collectable sprites looking good in all of them (I don't think the old sprites entirely worked either). I didn't want to redraw multiple sets of sprites, so I decided I would move the game to have one standard shared palette across the board.

Obviously, most graphics in the game were now going to have to be remapped to the new palette.

Why do I do these things to myself?

I started with the tilesets and wrote a custom palette remapper tool in Python. However, after processing with this tool, many tilesets still required manual touch-up work. TT has 26 tilesets in total so this took some time.

Once I had a workable palette and remapped tiles, I used the Tiled image export function to save an image of each level and stitched them together to make "World Maps". This gave me an overview of how the games levels looked and hung together en masse.

I then moved on to the enemy graphics (updating the remapper tool to support custom pen-swaps on specific regions of the image along the way). Some some manual rework was required but not as much as the tilesets.

However, on combining the remapped level images with the remapped enemy sprites, I discovered an unforseen flaw in my clever plan. Observe, dear reader:

The new palette had dropped a shade each of green and brown, and this loss of differentiation had made many enemies - or parts thereof -  invisible against many of the background tiles.

I had a bit of a sit down, pulled myself together, deleted all the remapped tilesets and sprites, and went through the whole process again with a further modified palette. Fortunately, the new new palette meant this attempt actually required a lot less manual reworking of the remapped images and was completed relatively quickly. The results were a lot better:

I wrote a quick pipeline tool to process the tileset images. The enemy pipeline is more complex as the output data files need to contain attributes such as names, descriptions, speeds and so on for each enemy as well as their graphics. I'll get to that soon enough.

Going back to the World Maps, I'm not happy with many of the tilesets as they currently stand. I'm considering, budget allowing, getting a pixel artist to give a few of them a polish up. I am also aware of a few static images that were never finished so there could be a reasonable amount of art work to do. I also took a couple of hours to write a tool to extract the unique 16x16 tiles from an image and pack them into TT tileset format. This was an interesting experiment in itself, and may prove useful if I do employ an artist later.

And, after all this, I never actually got around to replacing the power-up sound effects. I think it makes more sense at this stage to press on with remapping the other game graphics like the enemies, bombs, explosions and so on though. This will help flesh out the modern asset pipeline so it's no loss.

The sound effects, like everything else on my rapidly expanding to-do list, will have to wait their turn.

No comments:

Post a comment