IRC log for #bzflag on 20200509

00:25.28*** join/#bzflag Zehra (~Zehra@unaffiliated/zehra)
01:29.11ZehraI've looked through StateDatabase .h/.cxx, BZDBCache.h, BZDBLocal.h, DefaultBZDB.h, looking to check if some server variables are either float or double, any recommendations on where to look?
01:29.59Flashthat's kind of vague
01:32.13ZehraLet me reword it, in StateDatabase.h, variables like "static const std::string  BZDB_EXPLODETIME;" appear, however this does not tell me the type of variable it is, I'm looking for where to find it.
01:32.41ZehraSome variables can easily be known by name and I've found quite a bit, but none of the ones I am specifically looking for.
01:33.51CaptainRoberts[mThey are all strings
01:33.55CaptainRoberts[mPpl
01:34.19Flash~lart CaptainRoberts[m
01:34.19infoboteats CaptainRoberts[m's liver with some fava beans and a nice chianti
01:34.58CaptainRoberts[mDeep fry it, it’s kinda fatty
01:35.00Flashdread pirate or not
01:35.06blast007there *are* all strings, though  :)
01:35.47blast007the value can even have mathematical operations that refer to other variables
01:35.51CaptainRoberts[mYeah bzdb transmits and stores all values as strings then does an eval
01:36.09CaptainRoberts[mSo the float or double precision is pointless
01:37.51ZehraAlright. I believe that solves my question.
01:38.47Flashregardless, chianti and liver ... Friday night is complete
01:39.47blast007Zehra: what you may be looking for is how a variable is *evaluated*.  So just 'git grep _whateverVar' and see what eval function is used to convert the BZDB variable into a number/boolean.
01:49.22Zehrablast007: Ah, I also realized one thing I overlooked too, no bz_getBZDBFloat() exists, thus making my earlier question quite invalid to an extent.
01:53.47blast007hmm, some of that stuff is a bit weird.  The actual BZDB system returns a float, not a double.
01:55.47blast007and for some reason we don't use the other eval variants for the BZFS API functions.  We could use isTrue, evalInt, etc.
01:56.24blast007bool        StateDatabase::evalTriplet(const std::string& name, float data[4])   <--- I also assume that 4 should be a 3, cuz.. "Triplet"
01:57.21Flashdoesn't matter .... float[4] == float*
01:58.50ZehraNo wonder I've gotten confused at certain points.
01:59.36FlashC/C++ is a wonderfully [im]precise language
02:04.57Flashunless painfully explicit, assume double in most cases
02:06.20blast007Flash: are you talking about BZDB specifically?
02:13.41Flashno, C/C++ generally
02:19.23ZehraFloat to double conversion does not result in much issues, double to float is loss in precision...
02:20.13ZehraDepending on application it is used for, it may or may not be "permitted", either due to "precision" or "memory" requirements.
02:20.53CaptainRoberts[mNothing in bzflag needs double precision
02:22.06Flashon the other hand, 64 bit processing defaults to double, and shouldn't be negated, except by well defined exception
02:23.04CaptainRoberts[mMost optimizers will pipeline floats to process faster than doubles when the precision is not needed.
02:24.42CaptainRoberts[mAnd the graphics are all going to be float, so you have to convert back to float before display anyway, so you loose speed converting back. Nothing in bzflag will need the precision to justify it.
02:24.56CaptainRoberts[m98% of the time bzflag is drawing
02:25.49CaptainRoberts[mUnless you are looking at worlds being larger than several thousand units.
02:26.30blast007are there precision differences when building for 32-bit versus 64-bit?  on Linux, at least, collisions behave differently in 32-bit versus 64-bit.  (It's possible to get stuck in teleporters in 32-bit builds)
02:27.34CaptainRoberts[mCollision detection and response may be more consistent with doubles.
02:27.35ZehraIIRC on spldart's server, I did get stuck in a teleporter, but this did not occur on another build, but the system was Windows.
02:28.03blast007I've not see the 'stuck in teleporter' issue on Windows
02:28.09blast007only 32-bit linux builds
02:28.29CaptainRoberts[mGood thing those are dying
02:28.56blast007yeah, though some of our users apparently are still using 32-bit :)
02:29.36blast007bumping the minimum GL version will probably take care of those, though
02:30.20blast007hmm, though I suppose a Pentium M/4 might still have a card that can do GL 2.0
02:30.43CaptainRoberts[mYou would probably get more consistent results by transforming the collision checks to be relative to the tank instead of doing them in world space too. Then you’d always be checking things in a small relative area.
02:31.45blast007we should do fewer collision checks too.  when you're cranking out 400 FPS, the dt is real small and results in wonky math.
02:32.09CaptainRoberts[mYeah that will run into float precision errors
02:32.27CaptainRoberts[mFrame limit your simulation to 60
02:33.49blast007Yeah, that was my thought.  Limit the simulation and then the graphics could dead reckon between simulation updates.
02:35.15FlashCaptainRoberts[m: why do you say "optimizers will pipeline float to process faster"? On modern hardware, double is faster
02:35.31FlashGPU is an exception
02:37.59CaptainRoberts[mI have not seen that in my experience with floats in 64 bit compiles. But maybe that’s just me.
02:38.42FlashYMMV but the hardware does 64-bit operations
02:38.56Flashexcept for REALLY old HW
02:41.22CaptainRoberts[mYes but the hardware also can do operations on 32 but floats at a faster IPC in some cases.
02:42.20FlashREALLY old HW
02:43.54Flashand, for almost all cases, "your attempt at optimization is worse than your compiler ... do you REALLY want to play in that space?"
02:45.39blast007Flash: what if I install an 8087 math co-processor?
02:46.57Flashand do we care?
02:47.57CaptainRoberts[mYeah for bzflag it does not matter.
02:54.31BZNotifybzflag: 03blast007 commented on pull request #251 "Fix multiple issues with SDL 2 window creation" by 03macsforme (06https://git.io/JfCsQ): @macsforme mentioned to me that the resolution change infinite loop...
09:44.58*** join/#bzflag I_Died_Once (~I_Died_On@unaffiliated/idiedonce/x-1828535)
16:49.15BZNotifybzflag: 03blast007 commented on pull request #251 "Fix multiple issues with SDL 2 window creation" by 03macsforme (06https://git.io/JfCd7): I tested older BZFlag versions with SDL 2.0.9, back to 2.4.8, and t...
17:05.35*** join/#bzflag Zehra (~Zehra@unaffiliated/zehra)
18:45.21*** join/#bzflag I_Died_Once (~I_Died_On@unaffiliated/idiedonce/x-1828535)
23:52.25*** join/#bzflag Sgeo (~Sgeo@ool-18b982ad.dyn.optonline.net)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.