Short term: Store Floats Long Term: Full Text File Writing

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
slobu
Posts: 13
Joined: Mon May 19, 2008 1:00 pm

Short term: Store Floats Long Term: Full Text File Writing

Post by slobu »

I apologize if this is a topic already addressed. I didn't specifically see it in the feature requests though. I may have missed it. Sorry!

Anyway, ANY sort of data saving function would be appreciated. I figured the simplest to implement would be text file writing. I'll make do with saving bitmap pictures or a data blob. With pictures hopefully I could make a script to read pixel colors and transform that into variables. Would it be easier to code support for a data blob? It could be a strict size to ease portability between platforms and file systems. A last thought would be save state support. Something like Game_Save('foo.dat') and Game_Load('foo.dat') that would dump the ZGameEditor engines state or load it back into memory.

Again, sorry to bring this up if it's an old topic. I only mention it because it's the one thing stopping me from seriously using ZGameEditor. Password entry is just too tiresome for the end-user and hampers how much lasting impact the player has on his game environment.

UPDATE: The responses to this topic indicate that only Floats are currently flexible enough to have storage and retrieval be useful. In that case, I humbly request at least storage of float values for the short term.
Last edited by slobu on Fri Oct 24, 2008 1:49 pm, edited 2 times in total.
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Actually, file reading is working but writing is still not implemented. For loading from file, see the project FileDemo included in ZGE.
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi Slobu,

As Francesco mentioned, File reading is already available .. one of the major problems however is that the only variable format ZGE can currently handle is of the type Float. You cannot use Strings or Integers dynamically .. yet. Even if String were supported, you still need a substring function and other string related routines to be able to make use of the data.

K
slobu
Posts: 13
Joined: Mon May 19, 2008 1:00 pm

Already know about file reading. Should have been clearer!

Post by slobu »

Thanks for the quick responses!

I may have been too broad. I already know about file reading via the FPS demo. I'm still trying to wrap my head around how that works :)

My real focus is file writing. Being able to store information would elevate ZGE from a demoscene thing to a true game editor (in my opinion). Almost all games have some form of data retention from high score tables to how tired your battle mage is.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

The problem with the current File-solution is that it is Component-based which is not very intuitive to use if you are used to writing code for accessing files. However if I add support for writing it is good enough for saving small stuff like highest score, optionsettings, and even whole arrays of data. So what will happen is probably that first ZGE will support file read/write through the component-solution. Then in a later version, when the scripting is advanced enough to allow it, a code based solution (like in your post before it was edited) with file-functions will appear.
Post Reply