Last week the Reset64 Craptastic 4k Game compo deadline ended and I managed to squeeze in two games.
Quite pleased with that. So I think it’s time for a post mortem. First up: Plazzle.
About the game
Plazzle is a combination of the words ‘plasma’ and ‘puzzle’.Plasma because it’s based on the so-called ‘plasma’ demo effect, and puzzle because it’s a puzzle game.
The idea is: you have a nice plasma animating, but the screen is divided up in blocks and their positions are shuffled. You have to restore the pattern by switching blocks to solve the puzzle.
The game has a random mode, where you get a random variation of the game and a high score mode, where you have to play all pre-defined levels in order to get a score. You can play high score levels including ‘black levels’ or without.
I came up with an idea to have a cheap ‘music’ player where all the blocks in a level also have corresponding notes in a chord. The notes were played in the order they are presented, so mixed up at the start and in order (going up and down in an orderly fashion) when finished. Some people said that it made the music less interesting the more you solved it and I have to agree.
But this gave me an idea that you could solve puzzles even when all was black. You have to know which note is the first (I use a bass note for that, which corresponds to the top left block) and all notes have to be unique and in a predictable order (I chose going up from the ground note). A better explanation with example in the video below.
So I added the ‘black levels’.They are optional, because I expect not everyone to like or being able to make out the notes, so you can also go for a high score without playing the black levels.
How it works
Code examples of generating the plasma effect can be found on the internet. It’s basically adding or subtracting sine index values based on an algorithm. I based my code on an example I saw in a discussion in the csdb forum.
To make it clear: I do understand the principle and made something based on the same principle before, but not for the C64 and I didn’t trust myself to produce something just as good and performant in the time I had (I think I would need an extra year or more 🙂 ).
But calculating the plasma is just part of it. You have 1000 bytes that are continually recalculated by some algorithm, but they have to be ‘plotted’ to different spots, based on the mixed up blocks.
And it has to be fast enough and, so speedcode was necessary. And because there’s a 4K limit, you have to generate that.
And because I use different sizes of blocks the generating has to be flexible.
For the top C64 coders such a task is just a day in the office, but for me that gave me quite a few headaches.
But I succeeded and with a tool like ICU64 you can see both the scrambled part and the ‘Plazzle working area’:
You could use this knowledge to cheat on an emulator, but there are much easier ways for that (which I used extensively during testing).
There are several ways to make a plasma beautiful. But basically you use colour and/or character transitions. I use the C64 in character ECM mode, so you can change colour and character with one byte.
With ECM mode you use two bits of a byte to refer to 1 of 4 colours and the other 6 bits for which character you draw. That leaves you 64 characters, which is good enough. A nice side effect is, you only need a quarter of memory to define the characters, because you only have 64 characters, which is 64*8=512 bytes.
I wanted to have some variation in the type of characters, so I use different character sets, 4 predefined and one randomly generated. Those pre defined character sets would set you back 4×512=2K, but I used a trick to halve that: To make nice transitions your characters usually go from ’empty’ to ‘full’ to ’empty’ again. So if you just define 32 characters (from empty to full) and then mirror them when you use them, so you only need 8×32=256 byte when starting for one character set.
I play the game, even when not developing , so I like the game myself. People (myself included usually don’t like playing my game).
So that is a big plus.
BUT: I only play in random mode.
The levels aren’t that much fun I think, the difficulty curve not smooth and I’m not even sure scoring is working correctly!
And that’s because I’m not very good (or not bothered enough) at making good puzzles. Randomly generated puzzles work, but the high score game? Meh.
EDIT: I heard reviewers saying they don’t like puzzle games, which got me thinking. I’m not a big fan of puzzle games myself, but this one I like. So what’s going on here? I think this is less of a ‘problem solving’ or ‘do things in the right order’ kind, but more of a pattern-spotting kind of game. Hang back try to see where pieces should go.
Technically, there’s things to be done. The selector/indicator works but sometimes is hard to see in al the moving patterns. I’m not sure yet how I’m going to solve that.
I like how some levels look. I would have liked to have used even more character sets. But that’s for a post-compo version (a game you can pay for ;)).
1. some blocks are already at the right spot from the start (the amount varies per level). Try to see (from a distance perhaps) if you can spot those. That way you don’t move any blocks that are already correct.
2. if you don’t know where to start, try to make a few blocks fit, that way you create larger blocks that make it easier to solve the puzzle. Use color or full/empty spots that move across the field.
3. try to spot patterns that ‘disappear’. For instance a blob of purple that appears in a block and move down but doesn’t appear in any othe block. That one goes on the bottom.
4. sounds can help you, but only definitively on levels where there are 16 blocks or less. On levels with more blocks some notes are ‘mapped’ to multiple blocks. That could still be helpful, but only up to a point
The video below is an extract from the instructions that are included in the Disk version of the game
Talking about the disk version: I was playing around with directory art.
You can easily create a D64 disk image with file entries in KickAssembler (which I use). I was trying if I could create a Petscii Plasma to include as directory art. The result wasn’t very good (you could say pretty bad), but I never took it out.
So it’s still on the disk version in all its ugliness.
By the way: if you want to see an really stunning example of a C64 plasma, there is this: https://csdb.dk/release/?id=159933 a Petscii Plasma that is sooo colourful!
I tried to see if I could do something like that in my game, but it became too slow (besides calculating I also have to copy the plasma in a shuffled order).
A preview here of the new title screen can be found on the itch dev blog: