IRC logs of Freenode #BZFlag for Saturday, 2020-05-09

*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has joined #bzflag00:25
ZehraI'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
Flashthat's kind of vague01:29
ZehraLet 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
ZehraSome 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:32
CaptainRoberts[mThey are all strings01:33
CaptainRoberts[mPpl01:33
Flash~lart CaptainRoberts[m01:34
* infobot eats CaptainRoberts[m's liver with some fava beans and a nice chianti01:34
CaptainRoberts[mDeep fry it, it’s kinda fatty01:34
Flashdread pirate or not01:35
blast007there *are* all strings, though  :)01:35
blast007the value can even have mathematical operations that refer to other variables01:35
CaptainRoberts[mYeah bzdb transmits and stores all values as strings then does an eval01:35
CaptainRoberts[mSo the float or double precision is pointless01:36
ZehraAlright. I believe that solves my question.01:37
Flashregardless, chianti and liver ... Friday night is complete01:38
blast007Zehra: 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:39
Zehrablast007: Ah, I also realized one thing I overlooked too, no bz_getBZDBFloat() exists, thus making my earlier question quite invalid to an extent.01:49
blast007hmm, some of that stuff is a bit weird.  The actual BZDB system returns a float, not a double.01:53
blast007and for some reason we don't use the other eval variants for the BZFS API functions.  We could use isTrue, evalInt, etc.01:55
blast007bool        StateDatabase::evalTriplet(const std::string& name, float data[4])   <--- I also assume that 4 should be a 3, cuz.. "Triplet"01:56
Flashdoesn't matter .... float[4] == float*01:57
ZehraNo wonder I've gotten confused at certain points.01:58
FlashC/C++ is a wonderfully [im]precise language01:59
Flashunless painfully explicit, assume double in most cases02:04
blast007Flash: are you talking about BZDB specifically?02:06
Flashno, C/C++ generally02:13
ZehraFloat to double conversion does not result in much issues, double to float is loss in precision...02:19
ZehraDepending on application it is used for, it may or may not be "permitted", either due to "precision" or "memory" requirements.02:20
CaptainRoberts[mNothing in bzflag needs double precision02:20
Flashon the other hand, 64 bit processing defaults to double, and shouldn't be negated, except by well defined exception02:22
CaptainRoberts[mMost optimizers will pipeline floats to process faster than doubles when the precision is not needed.02:23
CaptainRoberts[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
CaptainRoberts[m98% of the time bzflag is drawing02:24
CaptainRoberts[mUnless you are looking at worlds being larger than several thousand units.02:25
blast007are 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:26
CaptainRoberts[mCollision detection and response may be more consistent with doubles.02:27
ZehraIIRC 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:27
blast007I've not see the 'stuck in teleporter' issue on Windows02:28
blast007only 32-bit linux builds02:28
CaptainRoberts[mGood thing those are dying02:28
blast007yeah, though some of our users apparently are still using 32-bit :)02:28
blast007bumping the minimum GL version will probably take care of those, though02:29
blast007hmm, though I suppose a Pentium M/4 might still have a card that can do GL 2.002:30
CaptainRoberts[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:30
blast007we should do fewer collision checks too.  when you're cranking out 400 FPS, the dt is real small and results in wonky math.02:31
CaptainRoberts[mYeah that will run into float precision errors02:32
CaptainRoberts[mFrame limit your simulation to 6002:32
blast007Yeah, that was my thought.  Limit the simulation and then the graphics could dead reckon between simulation updates.02:33
FlashCaptainRoberts[m: why do you say "optimizers will pipeline float to process faster"? On modern hardware, double is faster02:35
FlashGPU is an exception02:35
CaptainRoberts[mI have not seen that in my experience with floats in 64 bit compiles. But maybe that’s just me.02:37
FlashYMMV but the hardware does 64-bit operations02:38
Flashexcept for REALLY old HW02:38
CaptainRoberts[mYes but the hardware also can do operations on 32 but floats at a faster IPC in some cases.02:41
FlashREALLY old HW02:42
Flashand, for almost all cases, "your attempt at optimization is worse than your compiler ... do you REALLY want to play in that space?"02:43
blast007Flash: what if I install an 8087 math co-processor?02:45
Flashand do we care?02:46
CaptainRoberts[mYeah for bzflag it does not matter.02:47
BZNotifybzflag: blast007 commented on pull request #251 "Fix multiple issues with SDL 2 window creation" by macsforme (https://git.io/JfCsQ): @macsforme mentioned to me that the resolution change infinite loop...02:54
*** I_Died_Once <I_Died_Once!~I_Died_On@unaffiliated/idiedonce/x-1828535> has quit IRC (Ping timeout: 260 seconds)04:07
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has quit IRC (Quit: Gone for now.)04:35
*** I_Died_Once <I_Died_Once!~I_Died_On@unaffiliated/idiedonce/x-1828535> has joined #bzflag09:44
*** I_Died_Once <I_Died_Once!~I_Died_On@unaffiliated/idiedonce/x-1828535> has quit IRC (Ping timeout: 260 seconds)14:09
BZNotifybzflag: blast007 commented on pull request #251 "Fix multiple issues with SDL 2 window creation" by macsforme (https://git.io/JfCd7): I tested older BZFlag versions with SDL 2.0.9, back to 2.4.8, and t...16:49
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has joined #bzflag17:05
*** I_Died_Once <I_Died_Once!~I_Died_On@unaffiliated/idiedonce/x-1828535> has joined #bzflag18:45
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has quit IRC (Quit: Gone for now.)21:09
*** Sgeo <Sgeo!~Sgeo@ool-18b982ad.dyn.optonline.net> has joined #bzflag23:52
*** disco- <disco-!~disco@unaffiliated/disco-> has quit IRC (Remote host closed the connection)23:54
*** Sgeo_ <Sgeo_!~Sgeo@ool-18b982ad.dyn.optonline.net> has quit IRC (Ping timeout: 272 seconds)23:55

Generated by irclog2html.py 2.17.3.dev0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!