Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by OptimusPrime. 08/15/26 23:39
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/15/26 09:47
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
Accepting new programming clients
by AndrewAMD. 08/06/26 21:25
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Lapsa), 7,899 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 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