Computer Science Canada RPG Code optimizing and Save feature help |
Author: | LegendsEnd [ Sun Oct 09, 2005 10:02 pm ] | ||
Post subject: | RPG Code optimizing and Save feature help | ||
To begin with, the RPG i'm making goes back to the intro screen after a Game Over and while I have it working, it seems very...hard to keep track of, here's an example I just made. I dislike having that many loops as it begins to get confusing is there any other more efficient way?
I'm also having trouble figuring out the Save game code. Could someone post an example where someone can run a program, chose to save at a certain point and start with all the variables set at what they were and continue from the same location at the code? Thanks in advance and I appreciate the help. |
Author: | TokenHerbz [ Sun Oct 09, 2005 10:18 pm ] |
Post subject: | |
1st off, use procedures, (proc for short) proc Battle post code end battle proc heal post code end heal loop Battle heal end loop You want to have 1 main loop ONLY in your game, and atm im a lil busy to find your save feature tutoreal, but in a few i will |
Author: | Cervantes [ Mon Oct 10, 2005 8:40 am ] |
Post subject: | |
To avoid the problem of so many nested loops, you could try hiding using a boolean variable to hide your intro, or to hide the game screen when you're at the intro screen. Alternatively, you could still have nested loops, just change the appearance of them. You have one main loop which calls several procedures. Those procedures could have loops within them, which could call procedures which have loops within them! But it becomes more managable if you layer things this way. As for saving, you'll want to write the values of all the important data into files. It would be good if you knew records, and then you could easily use read and write |
Author: | [Gandalf] [ Mon Oct 10, 2005 2:22 pm ] |
Post subject: | |
I'm starting to think that any help thread with "RPG" should be banned. This is not the case in this topic, but often you get some huge code impossible to give help on. If you want to get help for your "RPG" then post small problems, it's easier for the creator to isolate the problem than anyone else. |