Author Topic: Creating a Load/Save Data Screen showing inventory  (Read 5455 times)

jweldon

  • Visitor
  • *
  • Posts: 16
    • View Profile
    • Email
Creating a Load/Save Data Screen showing inventory
« on: 2005-12-08, 08:08:27 AM »
Here is another question I have about how to have a load/save screen in my game.  I looked through the FAQ/Help files and didn't see any like my question.
I am creating a "Zelda type" RPG game you go around and explore, pick up items, fight bad guys, etc...  I know how to use the Special function Save/Load within the game but how would I start the game?  I guess I would have to use the "On start" feature some how.  Can I also set one of the buttons as a "start" button that pulls up the Save/Load screen rather than waiting to touch a tile?  Is it possible to show a inventory screen also?

Thanks!

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Creating a Load/Save Data Screen showing inventory
« Reply #1 on: 2005-12-08, 09:01:57 AM »
There's a project in the project listing called "Game Academy Demo" that demonstrates the Load/Save function by providing a screen where you can pick a slot to save and load games with a kind of menu (and all without scripting).  I think it's mapped to the F2 key or something.  It tells you at the end of one of the levels if I recall (you'd think I'd remember my own projects better.  And wow, I just noticed this morning that that project has the highest <b>user</b> rating in the whole listing -- a perfect 10 by more than 300 users!?  How'd that happen?)

I would suggest that the first map in your game be a kind of menu screen where you just have the player standing in the middle of the screen and on the left side is a door with the words "New Game" above it and on the right is a door with the words "Load Game" above it.  If you only want to support one save game slot, the implementation should be quite easy.  The load game door could simply be a load game function that immediately jumps back to where you were when you saved.

To save the game you can either have a global function on each map they the user can activate at any time with a keypress to save at any time.  I don't recommend this if there is a risk that the player would save the game when they are in a dead-end situation (trapped or dying).  The other option is to have save points.  In both cases you can simply have a single save game function that saves into your slot if you're only doing one save game slot.  (I can help you figure out multiple slots if you want to too, or you can figure it out by looking at the Game Academy Demo.)

One thing to remember with your save game function is that you should remember to limit it to activate only once at a time.  If you use a keypress, make sure that it only activates on initial press, otherwise the game will keep re-saving as long as the user holds down the key (no big deal, but just a lot of extra potential disk activity).  And if you use a special function to do save points, make sure that it activates only on initial touch.

To answer your question about the "start" button, the F2 key in the Game Academy Demo works like this.  You just create a special function that has the "Global" box checked on every map.  It is activated by a keypress, and the "Global" will allow it to be activated no matter where the player is on the map.  Just add this kind of function to every map that supports this "start" button.  It can activate a "switch to map" effect that remembers the old map.  That way when they cancel out of that screen (perhaps by pressing the same button on this special "Start Screen" map), you can easily switch back to the old map and resume where you left off.

Does that help?

jweldon

  • Visitor
  • *
  • Posts: 16
    • View Profile
    • Email
Re: Creating a Load/Save Data Screen showing inventory
« Reply #2 on: 2005-12-08, 09:09:32 AM »
Yes, Thanks for the timely info!!!  I'll look at the Game Academy Demo first before I bother you again.  I think I'll take your advice on the save function with useing a button.  That mightbe more trouble than it's worth.  Save points sound good.

Thanks Again,
John