IDE/saving - .00x value rounding limit ?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

IDE/saving - .00x value rounding limit ?

Post by jph_wacheski »

I have noticed that the IDE interface is rounding values that have 3 places past the decimel,. specificaly a set rotation of .125 will become .12 or .005 becomes 0.

However I can still compile an .exe with these values,. and they also stay as set for the ZGE session,. it is only when reloading the .zgeproj ,.
I just opened my .zgeproj file in Notepad and indeed the values are cliped off when saving,. That extra percision is needed at times and should, IMHO be maintained in the file format. It really freaked me out when loading the latest ver. of Gyro-phyter Neo as I had just discovered some sweet looking effects based on slight rotations, and they had just dissapeared. see the attached .exe
Attachments
gyro_phyter_neo__025.zip
the floor pattern here is generated through a slight rotation,.
(41.23 KiB) Downloaded 435 times
iterationGAMES.com
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hej JPH,

Yea I've noticed this as well. The solution I've been going with is using a ZExpression to set those variables. Values don't get rounded in scripts obviously.

Good luck ~
K
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Oops, you are right. Sorry about that. I need to have a fixed number of significant digits otherwise all fractions will be saved with 12 or so characters in the zgeproj-file which seems unnecessary. Will three digits be enough for now, or maybe four?
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

4 Please :wink:
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

concure,. 3 is all I need for now,. it is just due to cardinal angles and fractional rotations,. so 4 will likely be fine for any forseeable use, and with Kjell's tip we can save any crucial values up to 12 places by assigning them in Zexpressions. Roc.
iterationGAMES.com
Post Reply