Save/Load
Hello everyone :-),
I am a business consultant that is used to developing applications using databases such as Oracle, SQL, etc.
I am working on a game for the hellofit and was wondering how does one save/load into a game? Are there any tutorials or recommendations for this directly aimed at making a game?
Thanks in advance!!!
Dan
Saving/Loading a game is simply a matter of saving/loading the values of all variables in the game which describe the state of the game.
eg.
-player position/health/ammo
-enemy states/positions
loading usually takes longer because the game media (textures/sounds etc.) are loaded too, these are not saved every time because they don''t change.
hope that helps
eg.
-player position/health/ammo
-enemy states/positions
loading usually takes longer because the game media (textures/sounds etc.) are loaded too, these are not saved every time because they don''t change.
hope that helps
Beware that saving/loading games is extremely difficult. If your game is anything more than just trivial, it will be painful and bug-prone. Reasons:
- you have to make sure your engine can be reset to the exact saved state given a file to load
- every time you change game data, it must be reflected in the file type. generally, when you do this you also break all prior formats.
- all dynamic objects have to be saved as their data when saving; then when loading, the objects must be created again and then filled-in with the data.
I was reading Gamespot''s write-up on the development of Black & White. It''s an extremely long article, and not very technical, but an interesting read. One of their major mistakes was not putting in a save/load feature until the end of development.
- you have to make sure your engine can be reset to the exact saved state given a file to load
- every time you change game data, it must be reflected in the file type. generally, when you do this you also break all prior formats.
- all dynamic objects have to be saved as their data when saving; then when loading, the objects must be created again and then filled-in with the data.
I was reading Gamespot''s write-up on the development of Black & White. It''s an extremely long article, and not very technical, but an interesting read. One of their major mistakes was not putting in a save/load feature until the end of development.
Typically, do game developers use databases to load from? Their own text files?
I am a newbie at game development so I apologize if the question is ignorant in advance!
I look forward to your feedback!
Sincerely,
Dan H.
I am a newbie at game development so I apologize if the question is ignorant in advance!
I look forward to your feedback!
Sincerely,
Dan H.
Personally, I don't know of any game that uses a database to save the state. I suppose it could be done, but for most games I think it would be impractical... Unless you were making an online game where saved games would be stored on the server. Then databases might come in handy, but otherwise flat files are generally used.
Edited by - Inigmas on April 16, 2001 11:41:59 PM
Edited by - Inigmas on April 16, 2001 11:41:59 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement