News:

The forum will NOT disappear in April 2023 please check this topic!

Main Menu

Game saves

Started by Chris!, January 17, 2023, 03:16:27 PM

Previous topic - Next topic

Chris!

I was wondering if it was possible to make a game that saves on the Odyssey 2, if it has been attempted it at all if so. I want to make an adventure game, but I don't want to force the player to complete it in one sitting.
All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html

manopac

it might be difficult to do saves (as you need extra hardware on the cart)- how about save points with codes ?
sex, lies, and videopac

Pickaxe Brad!

#2
In Spyrus: Prepare for Defeat!, I made save/restore codes you earn after each level.  You can reset or power off the Odyssey2 and use your code the next time you play the game.  The Odyssey2/Videopac is really the best system for codes like this, since it has the keyboard.  If you're interested in doing codes let me know, I might be able to help with it.

Another option is what HERO just released with.  Unless I'm mistaken, I think the player can jump right back to at or near the level they ended on (or any of the upper levels really) just by pressing the number key corresponding to the level.
What happened to Odyssey Game Maker?  It's been 5 months since it was announced.  Still no download link!

Chris!

What I want to do is also save the health number along with the level number, and whether the player has the sword or not. Those three things are the things I want to save. I guess I'll have to go with code displaying at the beginning of each level. I am just wondering how to go about doing this. It's only three variables to put in the code.
All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html

Pickaxe Brad!

#4
I would go about this in the following order:

1) Make a few levels, even if they are temporary, just make sure you can tell them apart. Also make it display (or some way of determining) if you have the sword and what your health is.

2) Code the game (just for now) to directly set those three values before you start and test whether you can change just those values to "start level 3 with no sword and 47 health" or "start level 1 with the sword and 19 health" or etc.

3) Make a function that sets those three variables for you and call that instead of setting them directly the way you did in 2.

4) Change the function that sets those three variables so that it takes data from values of 5 bits or less (values 00h-1fh) and make it still set those 3 variables correctly. You may need to figure out how to set large numbers (in your 3 variables) from more than one value. For example if you need the full range of 00h-ffh, you're going to have to use the lower bits of two values to set that variable (by using bitshifts and masks or etc.). Note: if you use 4 bits (00h-0fh) instead of 5 bits it'll be less of a coding hassle, but you might have longer savecodes. More on this in step 6. Make sure you can still start the levels correctly (as in 2) by setting these smaller values and calling that function.

5) Optional: If you want to optimize this, you could try to reorganize those values to share them.  For example, if you only need 1 but for the sword variable (meaning it can only be 0 or 1) and your health value is 0-100 (requiring only 7 bits), both variables could be set from only two values.  But you can do this step later.

6) Make a way for the player to enter keystrokes and set those variables.  You could do a direct mapping of keys to values ("2" key = 02f and ":" key = 0ah) but you're going to have to handle the colon and dollar sign because there are no keys for them (and handle spacebar too if you don't want codes with invisible characters).  My suggestion: do the 4 bits option in step 4 and use the keyboard range of 10h-1fh ("+" through "K") but make sure to mask off the top four bits and only use the lower 4.

7) You now should be able to start any level start with any health values and with or without sword by using O2 keyboard-entered codes.  People may be able to reverse engineer the codes, so you might want to make some sort of obfuscation scheme.  Also, I should note, since I encoded 5 bits per character, I discovered that my game was sometimes encoding the data into some unsavory words.  I made some changes to prevent this.

Making some assumptions, (assuming 16 levels 0-15 (4 bits), health range 0-100 (7 bits), and sword values 0-1 (1 bit), you could make savecodes of as small as 3 characters. Or you could use 4: make one char for the level, two for the health, and one for the sword value.
What happened to Odyssey Game Maker?  It's been 5 months since it was announced.  Still no download link!

Chris!

Thanks for the info! I may use that in a future game. I have been working on this for a long time and I have used 1700 or so bytes in the first bank and it is showing signs it can't take much more room in it. Or perhaps I could tell it to jump to a new bank upon startup. Anyway, it does look like a lot of work to do, and I don't think I'm smart enough to do all that just yet.
All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html