Jump to content

  • Log In with Google      Sign In   
  • Create Account

save feature in RPGs


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Chris F   Members   -  Reputation: 122

Posted 17 November 1999 - 06:55 AM

Can anyone help mus we are making an RPG but we dont know how to make a save feature. Any help would be very much appreciated.

Sponsor:

#2 zerovoid   Members   -  Reputation: 122

Posted 16 November 1999 - 04:14 PM

a very simple way to do that would be to have a struct such as

struct GameData
{
// game data in here...
};

// .. standard header files
#include <fstream>
using namespace std;

int main()
{
// ....
GameData gamedata;
ofstream FILE_OUTPUT;

//...
FILE_OUTPUT.write( "game.dat", &gamedata, sizeof(gamedata) );
//...

if i remember correctly that is the syntax, but it might be a little different..

so just mess with that... it should work

if anyone has corrections , feel free to post them

-zerovoid

[This message has been edited by zerovoid (edited November 16, 1999).]


#3 jobu   Members   -  Reputation: 122

Posted 16 November 1999 - 04:20 PM

well depending on what you want to save that should work

#4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 17 November 1999 - 06:55 AM

Thanks!!!!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS