Persistent game level?
by Adam Beer · in Torque Game Engine Advanced · 01/21/2009 (4:27 pm) · 4 replies
I wasnt able to find anywhere on the forums where people talk about making a game world persistent. I would like to be able to go in-game and pickup items and move them around and exit the game. Once I load it back up, those objects are still in the same spot I moved them. This is mainly for items, vehicles and some other classes of shapes. Anyone have any resources or ideas on how to do this?
Thanks.
Thanks.
About the author
Adam is the owner of Ignition Games, an indie game and software development company.
#2
The basis of it is saving the mission state before you exit the game / level. Then next time you goto load up the game it just loads the last mission state.
01/21/2009 (6:07 pm)
http://www.garagegames.com/community/blogs/view/14794The basis of it is saving the mission state before you exit the game / level. Then next time you goto load up the game it just loads the last mission state.
#3
01/23/2009 (8:32 pm)
Thanks guys, got it working.
#4
* - See this example.
01/23/2009 (10:42 pm)
@Adam, if you end up needing something more flexible, there are various database resources. If you're not familiar with database design/querying it may not be worth it unless you can afford to spend the time to dive into it (it's not terribly complex for simple databases, but it can get quite hairy*).* - See this example.
Torque Owner Mike Rowley
Mike Rowley
onDrop() save the location to file with a writeFile() command overwriting the original location. The problem with this tho, is each item would have to have it's own name and location.