Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TraderTom, Akow), 1,388 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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