Hello,
The save and load feature are highly dependent on how your internal data are kept. Does your character has an inventory? Health? Does he walks on a map?
There's no real rule to savegames. If your game is simple, and you want to keep things simple, try using .INI files, like this:
[Player Character]
Health=100
Map=Venise
Location_X=10
Location_Y=32
... etc ...
If you didn't plan for a savegame from the start, you may need to rewrite quite a bit in order to implement it correctly.
If it's too hard and would cause too much of a rewrite, you could have the player save the game at key locations on the map.
Feel free to provide more information, and I'll do my best to help.
--Eric Fortier
Main Topics
Browse All Topics





by: MagmaiKHPosted on 2003-01-17 at 21:27:38ID: 7751826
fopen, fclose, fprintf, & fscanf are the C functions, all operate on a FILE*. #include <stdio.h>
C++ also offers the fstream class.
#include <fstream> //note no .h
using namespace std;
fstream fs("c:\\myfile.txt");
fs << "Writes text" << endl;
fs.close();
You can google for any of those to get more info and examples.