The Daily Click ::. Forums ::. Klik Coding Help ::. Making a save/load screen, help
 

Post Reply  Post Oekaki 
 

Posted By Message

Rikus

Administrator
Crazy for News

Registered
  02/12/2001
Points
  980502
27th December, 2004 at 21:45:14 -

Hi folks, i had a question since it has been years i programmed a game i forgot how to do this but can someone tell me or make an example on how to make a save loading screen? Like how to save a current frame, and then load it up again later.

For my old games i used to use ini files to do this, do you guys still use that or is there a better way. Please let me know how to it would be apriciated. Btw i am using mmf 1.5,

Thankies,

Rikus

 
Be sure to follow us on the twitters for the latest and greatest: @dailyclick

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
27th December, 2004 at 21:51:10 -

You can use INIs still (lots of people do that) but you can also use the Save Game object if you need to save the states of objects on your level, so you can restart the level exactly as you saved it.

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
28th December, 2004 at 07:30:05 -

im going to post a little tutorial sometime on a really simple but very effective way of saving games, mainly for big games like RPGs/Adventure-platformer stuff.

you need the 1000 Global Values object and the Save Game object.

basically ive got a group called Save, quite obviously , the 2 above mentioned extensions and a counter. whenever the game wants to save it activates the Save group and now it begins (im running off the top of my head here so sorry if its not 100% accurate)

Always= add 1 to counter, save value "number of counter+(1000 Global Values+value of counter)".

*then when the counter hits the biggest number you want it to save, say 30 you just do*

Counter value is greater than 30= save memory to disk, close group.

*loading is done very similar, but in reverse, it loads up from the save file object into the 1000 global values object*


done! or it should be. this way you can pretty much have any number of global values. if only i thought of this for TOR instead of writing out 80 individual events when saving values. ah well this should work, if this dosnt help maybe the tutorial will

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Jack Galilee



Registered
  02/12/2002
Points
  990

VIP Member
28th December, 2004 at 08:26:58 -

Or you can just allocate an array with 3 Z values eg

0Z=Goodie Positions
1Z=Baddie Positions
2Z=Stats And Globals

So. (cant rember exactly how its setout but its a bit like this)
You could do it with a function object aswell so...


.On Function: Save_Game - set X,1,Y,1,Z,0 to X=X(Player) Y=Y(Player) Z=0
- set X,1,Y,1,Z,1 to X=X(Badie) Y=Y(Badie) Z=1
- set X,1,Y,1,Z,2 to Global Value A
- Save Array : AppDrive$+AppDir$+Save.sav

.On Function: Load_Game - Load Array : AppDrive$+AppDir$+Save.sav
- Set Player X(ArrayXYZ,0(1,X,)
- Set Player Y(ArrayXYZ,0(1,Y,)
- Set Badie X(ArrayXYZ,0(1,X,)
- Set Badie Y(ArrayXYZ,1(1,Y,)
- Set Global Value A to Array(X,1,Y,1,Z,2)

Thats the gist of it its not exactly what it will looks like AT ALL but its cloeish! and the gist of what you need to do!

 
The only thing better than winning gold in the paralympics is not being retarted

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
28th December, 2004 at 10:16:02 -

its really easy with inis, and since you've used them before it will be easier.

two groups okay?
"Load" (put this on the title screen usually)
"Save" (put this on every other frame)

also you can add the start of level event 'Set file to appdrive$ + appdir$ + "gamename.ini" (so the ini will be in the game folder instead of the your windows folder.

Save group
set group to 'level'
set frame number to ini
close group

Load group
set group to 'level
go to frame (ini value)

i can make that as an games factory game file for you if you want.

 
.

Rikus

Administrator
Crazy for News

Registered
  02/12/2001
Points
  980502
28th December, 2004 at 11:37:12 -

Thanks for the replies guys! It is apriciated. I tried out Andy's suggestion for the ini's and it works perfectly, thanks!

 
Be sure to follow us on the twitters for the latest and greatest: @dailyclick

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
28th December, 2004 at 14:04:37 -

Heh... INI's for save games. Not bad, but you'd be better off either either the safe game object (bonus pack 1) or the array object that comes with mmf. Though that's only my personal oppinion, so...

Image Edited by the Author.

 
http://www.facebook.com/truediamondgame
   

Post Reply



 



Advertisement

Worth A Click