Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

An Undo system sounds interesting. Or maybe something like a Rewind function (similar to what you had written with "back a few spaces"), using a specific keyboard-key, that reverses everything on the screen, back to a point of the player's choosing, determined simply by holding that key down, for as long as you want to rewind. That would also work. But I can not say, whether it's technically possible on a C64, to rewind the entire gameplay, by more than just a few centimeters?

Undo can theoretically support up to 255 steps back. I'm already working on it for the next version.

Stay tuned!

(1 edit)

Sounds very good, looking forward to this feature! It could for example be included in a way, that the player had to stay on a keyboard-key, to rewind the gameplay and as long, as he holds down this key, everything runs in reverse. If the player releases the key, he can continue playing the game from this point on.

A nice side-effect here, would be the following. There are some C64 emulators, like for example Hoxs, Denise or CCS64, that allows the user, to remap keyboard-keys to buttons on the controller. Then the player could rewind in the game, directly on his controller, offering excellent handling. And I also have another idea, regarding this point, that would make it possible, on a real C64 as well.

The C64 supports a second firebutton (Pot-X) and there are some joysticks available, that have such a "Fire2" button (e.g. the "ArcadeR" or the "Cheetah Annihilator" and also certain joystick-adapters). If the rewind function were possible not only on a keyboard-key, but additionally also with Fire2, then owners of the mentioned joysticks, could also rewind the game, directly on their controllers, even on a real C64.

I'm currently working on this new Undo feature and I'm already well underway.

I'm trying to use a single button for this feature. I was thinking of doing it this way: a single button press takes you back one block, while a longer press restarts the level. What do you think?

I'll just post an idea borrowed from Baba Is You:

Holding the button takes you back one block at a time faster and faster.

(8 edits)

Right. When I suggested the idea with the fire2 button, I had completely forgotten, that "Gravity Snake", unlike 99% of all other C64 games, doesn't actually need the standard firebutton in the gameplay (okay, for restarting the level, but not for controlling the snake itself). This means, fire1 is not really needed so far.

Then, logically, you wouldn't need a fire2 button support at all and of course, fire1 can be used for the rewinding process. In this case, I would set it similar, to what "Vivid Warthog" also had suggested, that the game rewinds, as long as the player holds down the fire1 button. If the player release this button, he can start playing again, from this point on. That would be a pretty intuitive approach, if you ask me. The rewinding could begin, after the player had hold the fire1 button for 2 seconds.

And the "level restart" function could be mapped to a short single button-press. A short press on the firebutton, normally is alot shorter than 2 seconds and as a side-effect, this would have another advantage. Alot joysticks have a autofire-button and then also this autofire-button could be used for level-restart, because autofire is alot of short button presses in a row.

Additionally I would also use the Space-Bar key for level-restart, because in alot emulators today, the user can remap a keyboard-key to a controller-button and then these users can do this with the Space-Bar and they would have the level-restart on another button on their controller, than the rewinding-function, which would also be nice. Then you don't need to take care, how long you press this button.

And some controller-adapters for the real C64 machine, like for example the GenAssister, plug into both joystick-ports simultaneously and with such an adapter, the player has the fire-function of the first joyport directly on a controller button too, and this fire action corresponds to the Space-Bar in most games. Therefore this adapter is great for Shooters on the C64, because in these games, often the Space-Bar is used for "calling a drone" and "send away a drone" and then you have this feature directly on a button of your controller too, besides the normal fire function on another button. And when "Gravity Snake" uses the Space-Bar too, then this also applies to your game.

(+1)

Here's an example of how undo works in the game. Currently, it happens one square at a time with each press of the fire button. Take a look at the following link: https://x.com/Naufr4g0/status/2096164494657380845?s=20

(1 edit)

Looking forward to this new version, thanks for integrating my suggested feature. Each press one square, you wrote, this can sometimes mean alot of presses. Therefore I thought, the game could rewind automatically, as long as the player holds down the firebutton. That would be an alternative, that could be tested, in comparison. The automatic rewinding could begin, after the firebutton is pressed for 2 seconds. A shorter press, would restart the level.

Programming the game to rewind time seems simple, but it's more like programming a game that runs backwards like in the movie Tenet (there's not enough memory to store everything on the screen for every previous moment, so you have to reconstruct what happened from the limited data you have).

Anyway, I'm just testing the undo routine right now, which is why I used the easiest way to implement it in the game. I'll use a different approach later.

(4 edits)

Ah okay. I didn't knew, that there's not enough memory, to display every single step of the snake, while rewinding. In that case, your undo-method obviously has to work in discrete steps, I understand. Makes sense, of course. Nevertheless, it might be worth considering, how the firebutton handles the function and whether the squares, when the undo-routine runs, go back automatically, while the firebutton is held down, rather than requiring the user, to press the button repeatedly, for every single square. But go ahead and do everything the way you think is best. You know more about programming than I do, I am sure. The finer details of the function can always be tweaked later on, once the structure of the function is in place.

In fact, such an undo (or rewind) function like this, is interesting for C64 games in general, since, as far as I know, no C64 game features anything like that so far. This makes it a point of general interest for C64 games as a whole.


The problem with the snake's lack of memory for its positions arises from the fact that it can fall at certain points. If it moved like a classic snake game, the problem wouldn't exist. When the snake falls, it changes not only the position of its head, but also that of the body behind it, positions that can't be used, as is, when going back in time. However, if I had programmed the game with the idea of taking steps backward, I would have chosen a different approach to developing the code, probably.

In any case, development is progressing, and I've solved most of the issues. There's no problem adjusting the rewind speed, so I think I'll do as advised. The only limitation: you can rewind a maximum of 255 positions, which is still a decent number, given that most levels take about 100 to 150 moves to complete.

I also thought about including achievements for each level: one star if you complete the level, two stars if you complete it without using rewind, three stars if you complete it without using rewind and in a certain limited number of moves.