Search found 302 matches
- Tue Jan 27, 2015 11:30 pm
- Forum: Pioneer development
- Topic: Hexfloats
- Replies: 17
- Views: 10180
Re: Hexfloats
I'd be very surprised if the Windows and Linux floating point representation were different. After all, it usually all comes down to hardware, and I dare hope x86 processors all use IEEE floats ? Its usually down to the options enabled on the platform in question. Here's an interesting article abou...
- Tue Jan 27, 2015 11:26 pm
- Forum: Pioneer development
- Topic: Hexfloats
- Replies: 17
- Views: 10180
Re: Hexfloats
Half the point of the JSON savefile is to sort-of be human readable, so I'd still go with the hexfloats. You might like to just lift some code from a suitably-licensed libc somewhere.
- Sun Jan 25, 2015 10:11 pm
- Forum: Pioneer development
- Topic: Hexfloats
- Replies: 17
- Views: 10180
Re: Hexfloats
I did pretty much the same thing: // helper methods for safely storing/retrieving doubles inline char *DoubleToHexFloat(double v) { static char buf[32]; snprintf(buf, sizeof(buf), "%a", v); return buf; } inline double HexFloatToDouble(const char *buf) { double v; sscanf(buf, "%lf"...
- Sat Jan 10, 2015 12:43 pm
- Forum: Pioneer development
- Topic: Thanks to the developers! (& suggestion for savegames)
- Replies: 71
- Views: 47156
Re: Thanks to the developers! (& suggestion for savegames)
I found what I wrote. Not quite a spec, just the start of my thinking after a number of experiments. It was all in posts to the now-defunct pioneer-dev mailing list two years ago. http://pastebin.com/JiQeaDQu http://pastebin.com/tFz8GYsm http://pastebin.com/RZn57GsD http://pastebin.com/R9SjYujP That...
- Sat Jan 10, 2015 7:44 am
- Forum: Pioneer development
- Topic: Thanks to the developers! (& suggestion for savegames)
- Replies: 71
- Views: 47156
Re: Thanks to the developers! (& suggestion for savegames)
Because there's no way of doing that. You're reading a stream of bytes that have to be in the correct order. Almost no way of telling if what you've got is valid or invalid when you read it, and if you did what would you do with it? How do you fix it up? If you're reading a stream of bytes, then ye...
- Sat Jan 10, 2015 7:36 am
- Forum: Pioneer development
- Topic: Thanks to the developers! (& suggestion for savegames)
- Replies: 71
- Views: 47156
Re: Thanks to the developers! (& suggestion for savegames)
Just a note, you need to use hexfloats - decimal floats lose precision when you convert them to strings and back.
- Thu Jan 08, 2015 2:18 am
- Forum: Pioneer development
- Topic: Pioneer Performance
- Replies: 19
- Views: 13974
Re: Pioneer Performance
It'll be up in a couple of hours. I was waiting until I could get the precompiled models in, but I'm still having a few problems so I'm building now and will keep trying.
- Tue Jan 06, 2015 10:19 am
- Forum: Pioneer development
- Topic: Pioneer Performance
- Replies: 19
- Views: 13974
Re: Pioneer Performance
Oh good, nothing for me to do then *whistles*
- Tue Jan 06, 2015 9:02 am
- Forum: Pioneer development
- Topic: Pioneer Performance
- Replies: 19
- Views: 13974
Re: Pioneer Performance
There's still more things to improve, one of them would just be replacing the old-GUI screens with modern UI versions as they render more optimally anyway. Comm's screen and the F2-sector/system/galaxy views need rewriting. I'm starting to fiddle with these a little again now. No promises, but its ...
- Sun Nov 23, 2014 3:02 am
- Forum: Pioneer development
- Topic: Thanks to the developers! (& suggestion for savegames)
- Replies: 71
- Views: 47156
Re: Thanks to the developers! (& suggestion for savegames)
Feel free to ask me questions about this. Its not fresh in my head (I haven't been very active on Pioneer for quote some time), but I did have a plan :)jpab wrote:Finally, as impaktor said, it would be a good idea to look at robn's json-savefile branch and perhaps use it as a starting point for this work.