Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : Is it possible to save the game state in a parseable format?
New Topic New Poll Post Reply
Poster Message
Ryunosuke
Level: Roachling
Rank Points: 11
Registered: 04-04-2012
IP: Logged
icon Is it possible to save the game state in a parseable format? (+1)  
Apologies if this is already covered somewhere, I didn't see it on the board. I had this idea that it would be cool to write a program that takes a file containing information about a DROD room at a certain point in time, with all the objects and their locations, and uses it to generate a script for POV-Ray (3D raytracing program) that creates a 3D render of the room.

The main thing I'm missing is that I don't know if it's possible to generate such a data file from DROD itself, like a sort of computer-parseable 'screenshot'. Is it possible to do this?
11-22-2015 at 06:22 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 1306
Registered: 07-11-2014
IP: Logged
icon Re: Is it possible to save the game state in a parseable format? (+1)  
I actually don't know if the game ever saves any sort of mid-room state. If you quit the game with a room in progress I believe it restores your progress by replaying your demo from the initial room start. You'll definitely need to make your own build that spits out such information on request.

Creating your own render of the initial room state should be easier because it's stored in the dat files already. The source code is freely available, so you can see directly how the game unpacks and parses the room info from the dat files and use that to make your own programme that pulls the same data.

Now DROD RPG does save mid-room states as the rooms are persistent in that game, so you may be able to get some idea of how to save down the current state of the room from that game's source code. I've not looked at it myself, but I wouldn't be surprised if it was similar to how the level editor saves the rooms you've built, which is another part of the codebase that might help make your life easier.

____________________________
(07:23 PM) Pearls: Kieran is correct.
11-22-2015 at 08:26 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Ryunosuke
Level: Roachling
Rank Points: 11
Registered: 04-04-2012
IP: Logged
icon Re: Is it possible to save the game state in a parseable format? (0)  
Cool, thanks for the info. I might look into doing something with the existing room files before I attempt anything more complicated.
11-22-2015 at 04:50 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : Is it possible to save the game state in a parseable format?
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.