Restore level without loadGame()

Talk about making games.

Restore level without loadGame()

Postby akr » Fri Dec 10, 2010 3:56 pm

I have a lot of tile based actors on my game level. They get moved/removed while playing.

Want to bring this game (bouldercrash) to iphone and android. Therefore I want to have one
datafile without loadGame() each time to restart.

Any ideas how I can restore actors even when they get destroyed during gameplay with less effort (for restart)?
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: Restore level without loadGame()

Postby skydereign » Sat Dec 18, 2010 12:09 am

One way that will work is to build the levels through a global function. That way, to restart a level, or load any, delete the current level, and then recreate it. Pretty self explanatory I think. Now if you already created the levels within gameEditor, and not using a level array, then you can make the game create a text file with the proper values, which you can later copy into gameEditor and add the variable declaration.

You could also save them all into a text file, and load that up, but that wouldn't help too much either, as you want only one file.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Restore level without loadGame()

Postby jimmynewguy » Sat Dec 18, 2010 5:03 am

Well sky your kinda right since he only said without the loadgame function (i think because it blacks the screen, ect.) so if he used external files (like such viewtopic.php?f=6&t=6011&p=49212&hilit=loading+maps#p49212) it would work the way i think he wants :)
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: Restore level without loadGame()

Postby skydereign » Sat Dec 18, 2010 5:39 am

Well I suggested both methods, through script and through exterior files. For iphone/android it would be better to create the levels within global code, as you want to keep the number of files to one .dat and the save file.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Restore level without loadGame()

Postby akr » Sat Dec 18, 2010 11:30 am

Thanks for all the good ideas. I am thinking about a way in the CreateActor() script. Btw: Right, I dont want to use external files.

The coolest thing would be a CreateActor() script which creates actors in the visible game area depending on a levelcount and
a activation regions.

So I hold lets say 10 levels in different activations regions. Advantage is a low memory consumption and reusability.

STOP: That doesnt work because activation areas get activated when visible. Dont want to have my original levels visible.

Hmmmmm.

I have a array of my playfield. But that holds only type of actor.

Question: When I use that array and I figure out the name of the actor. Can I then create that actor in the visible area?

Hmm, this array gets filled on start through the createActor() script. So in the beginning its empty. This is because I want to use ge as level editor.....
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest