-
games-info storage
I actually have a few questions. I am creating a game in C and using windows and DirectX. I am planning on making an EFS like game which is basically a turn based strategy tile game. One of the things I was thinking was how do people usually go about making their program save games and load games(do people save the entire maps and all the chars and stats in a file or do they have reference points of some kind, keep in mind this kind of game almost anything can change)?
Second off, anyone know where I can get any info on hex grids, or if someone would be so kind as to kinda teach me how to do them(maybe not teach but post some ideas)?
Third and last for the moment, my chars are going to all be customizable with skills and weap and armor slots and all that jazz, what do you think would be the best way for me to store that kind of info, linked lists or something else?
Thanks guys!
-
1. When I do things like that, ill just save the characters stats, position...etc. So like write the basic character stats into a file, along with position in the map, quests completed...etc. This is faster as you are not writing the whole map data and all into the file. Then when you load it, just read from the file, and 'rebuild' the character based off the stats you wrote, and position the character at the coordinates you specified...etc. Although every game is different, and this may not be the best option for yours, thats what id recommend....Well, after rereading your post, I noticed you said stradigy game (thought you said RPG before). Well, for a stradigy, id just write down all the enemy positioins and that stuff, then if the enemy unit is injured or something then write his current health, otherwise dont write it and just set it to the max of whatever kind of enemy he is.
2. Not sure, but you could divide the map into sections and store them in a 2 dimentional array.
3. Personally, id use arrays, but there may be a better way to do it.
-
For good IsoHex tutorials/articles/etc. check out gamedev:
http://www.gamedev.net/reference/list.asp?categoryid=44
There's a lot of good articles. For hex stuff look for articles by TANSTAAFL. I'm currently reading his DX 7 IsoHex book and his stuff is really good.