Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
saving and loading #184806
02/20/08 16:24
02/20/08 16:24
Joined: Feb 2008
Posts: 11
Portugal
T
Thiago_7 Offline OP
Newbie
Thiago_7  Offline OP
Newbie
T

Joined: Feb 2008
Posts: 11
Portugal
Pardon me, but since i´m a newbie i have to ask these stuff. I´m trying to make a RPG. A complex one. I´m new to making games but not programming. This one is a question in my mind. How can i make my game to save like in an ordinary RPG? How can i create a save file to keep all my structs and lists of items from the last time i played? And how do i load directly to the last level or area i played with all my items, information and configurations??

PS: and if anyone knows how to also create a file with configurations and variable values in C++, i also would be very much aprecciated.

Thank you all.


"i dunno"
Re: saving and loading [Re: Thiago_7] #184807
02/20/08 17:18
02/20/08 17:18
Joined: Feb 2008
Posts: 39
R
RicheyMB2 Offline
Newbie
RicheyMB2  Offline
Newbie
R

Joined: Feb 2008
Posts: 39
I've not used it but there is a game_save command which saves this kind of information.

You can also mark up to memory areas with add_struct.

Re: saving and loading [Re: RicheyMB2] #184808
02/21/08 09:45
02/21/08 09:45
Joined: Feb 2008
Posts: 11
Portugal
T
Thiago_7 Offline OP
Newbie
Thiago_7  Offline OP
Newbie
T

Joined: Feb 2008
Posts: 11
Portugal
thanks, but i dont understand that add_struct and marking up memory areas. What does it do?


"i dunno"
Re: saving and loading [Re: Thiago_7] #184809
02/21/08 14:28
02/21/08 14:28
Joined: Feb 2008
Posts: 39
R
RicheyMB2 Offline
Newbie
RicheyMB2  Offline
Newbie
R

Joined: Feb 2008
Posts: 39
The manual states that add_struct is intended for external languages so it uses long instead of var.

Anyone know of a way to do this using lite-c?

Re: saving and loading [Re: RicheyMB2] #184810
02/21/08 15:41
02/21/08 15:41
Joined: Jul 2005
Posts: 34
Hong Kong
U
ultranet Offline
Newbie
ultranet  Offline
Newbie
U

Joined: Jul 2005
Posts: 34
Hong Kong
You just need to write add_struct(struct_pointer, sizeof a struct) to mark the structs that you want to save.
When you use game_save(), remember to include SV_STRUCT or just SV_ALL which saves everything.

*one thing strange is that the last marked struct is not saved by game_save().
*so you may just mark a dummy struct to be the last one.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1