IRC log for #bzflag on 20160618

00:39.01*** join/#bzflag I_Died_Once (~I_Died_On@unaffiliated/idiedonce/x-1828535)
02:21.52rodiecan't call 'em charms either;)
02:22.51rodieoh, oops
02:43.37the_mapwrong window?
04:27.44*** join/#bzflag BZnotify (~BZnotify@192.30.252.45)
04:27.44BZnotify[13bzflag] 15JMakey pushed 1 new commit to 062.4: 02https://git.io/vo22g
04:27.44BZnotify13bzflag/062.4 14f21477f 15Jeff Makey: Restore "#include <cmath>" so wwzones.cpp will compile on GNU/Linux.
04:27.44*** part/#bzflag BZnotify (~BZnotify@192.30.252.45)
04:50.39rodieessentially, map, yes.
06:59.11*** join/#bzflag Leppp (~Leppp@cpe-24-94-29-105.san.res.rr.com)
07:46.18*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
08:31.22macsformehttps://github.com/BZFlag-Dev/bzflag/blob/2.4/src/game/ServerList.cxx#L360 uses an uninitialized value for the if test... I think it should be initialized to be false (and probably that functionality has been broken for the last ten years), but should I wait until we're out of RC status to fix that?
10:23.27*** join/#bzflag catay (~smertens@valyria.catay.be)
11:21.32brad;/ws 88
13:16.47blast007macsforme: nah, do it now
14:36.18*** join/#bzflag JeffM (uid48618@gateway/web/irccloud.com/x-eimmdjacantkxixr)
14:41.57*** join/#bzflag Void7 (~Void7@205.157.147.198)
14:59.37*** join/#bzflag JeffM (~Jeffrey@2605:e000:7d02:c700:b5b0:7eb5:3e7e:2f46)
15:18.34*** join/#bzflag KaadmY (uid135503@gateway/web/irccloud.com/x-wdraffgsttzxrhki)
15:48.22*** join/#bzflag Guest696 (5966515f@gateway/web/freenode/ip.89.102.81.95)
15:48.35Guest696Hi! :)
15:57.31kierraHowdy
15:57.38Guest696faggot
15:58.01kierraLook who knows so much
15:58.19JeffMso clever... it's almost impresive
15:58.34Guest696i am impressed too
15:58.54Guest696by this shitty site
15:59.15JeffMwhat sites have you made?
15:59.25Guest696what the fuck are talking about?
15:59.54JeffMwell clearly you can make better sites, so what are they?
16:00.48*** mode/#bzflag [+o blast007] by ChanServ
16:00.50*** kick/#bzflag [Guest696!~blast007@bzflag/developer/Blast] by blast007 (Guest696)
16:00.52*** mode/#bzflag [+o blast007] by ChanServ
16:01.08*** mode/#bzflag [+b *!*@*89.102.81.95] by blast007
16:01.20JeffMhmmm, not much to back up it his claims it seems :)
16:43.27*** join/#bzflag Void7 (~Void7@205.157.147.198)
16:55.10*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
17:13.47*** join/#bzflag Leppp (~Leppp@cpe-24-94-29-105.san.res.rr.com)
17:44.40blast007man, the hardest part of adding context sensitive help to the menus has been aligning the text...
17:44.47*** mode/#bzflag [-o blast007] by blast007
17:50.39rodiei knew a coder who would (always) align (justify, if you will) _both_ left and right columns for his usage() functions. he was a master of language and always found a properly lengthed word to fit his formatting needs _without_ using any padding spaces. thinking like that might help;)
17:51.35*** join/#bzflag Leppp (~Leppp@cpe-24-94-29-105.san.res.rr.com)
17:52.16rodiei could cut&paste examples if you want to be amused;)
17:55.20the_mapthat won't always be reasonable to try though
17:55.27the_mapespecially in situations when you have jargon
17:55.33the_mapor when you have a bunch of really long words
17:55.43the_mapand it only actually works on monospace fonts
17:55.52the_mapotherwise, it is pointless to even attempt it
17:56.41JeffMmost consoles use monospaced fonts
17:58.17the_mapthe menus in bzflag are not monospaced though
17:58.50*** join/#bzflag alpha1-2 (~alpha1@host0.181-1-183.telecom.net.ar)
17:59.15JeffMyes, but rodie was talking about usings, so console. There are a BUCH of reasons his ideas are pointless for menus, but when all you have is a hammer.....
18:00.15the_mapthen you strike the keys on the kbd carefully
18:00.17JeffMreally the GUI system should be able to handle allignment, that's what most otehr systems.
18:00.30alpha1-2<PROTECTED>
18:03.04the_mapwe could use a monospaced for *everything* :)
18:03.21the_mapoops, missed a word
18:03.59the_mapthat explains why I had two "for"'s in the sentence
18:21.38blast007rodie: I'm talking about alinging them onto screen space
18:22.40blast007we don't have a "center text" option for our GUI system, so you have to calculate it yourself based on the screen width and the calculated size that the string will render to
18:22.51blast007also don't have text wrapping capabilities
18:23.02JeffMhow will that work with locaized strings?
18:23.21blast007as good as everything else
18:23.24blast007so, poorly
18:23.50blast007(note that I'm not doing any wrapping - just noting we don't have that)
18:24.06JeffMdoesn't the font system have a method to know how wide a string is going to be before it renders?
18:24.10blast007for the help menus, we just have it split up into multiple localized strings
18:24.11JeffMI'm pretty sure I wrote one initaly
18:24.12blast007yes
18:24.25JeffMyou can use that to compute a centered postions
18:24.29blast007but I'm trying to adjust the position in a section of the code that doesn't know the screen width
18:25.17blast007so I'm trying to do fun maths that take the current position and string width and figure out how much to move the position to also center the new string
18:25.23JeffMI'd make the width a global and just use it, it'll be better then hand tweaking all the strings. You're making maintenenace a lot harder.
18:26.00JeffMthen at least you can write a function to compute it for you.
18:26.51blast007that or I just stash it away for now and wait until a day when the GUI gets replaced with something that works
18:27.12blast007we do a stupid amount of manual work for each menu
18:28.09JeffMa crap (but slightly easyer) hack would be to save the width in a global, get that, and then just keep padding spaces before and after the string untill the computed width is the same as the screen width.
18:28.34JeffMthen it'll at least look centered ish
18:29.02JeffMare you using FTGL or still the old picture thing I wrote?
18:29.34blast007the old stuff
18:29.58JeffMthen the width funciton is very fast, there is no GL, just maths using the kerning table
18:30.07JeffMthere'd be no issue calling it in a while loop
18:31.03blast007maybe I just need to call the dialog 'resize' method when I change the help label..
18:31.14JeffMor even actualy, the width of a space is fixed. Get the string lenght, get a space width. subtract string width from screen width, divide the reminder in 2, divide that by the space wdith, and that's how many spaces you need to add before and after the string.
18:34.49*** join/#bzflag echelon (~echelon@bzflag/player/echelon)
18:49.10blast007What am I doing wrong here?  I'm using this to calculate the x position of my label inside the resize() method of OptionsMenu.
18:49.13blast007x = 0.5f * ((float)_width - fm.getStrLength(MainMenu::getFontFace(), fontSize, ctl->getLabel()));
18:50.15JeffMthe x is where the left side of the string is relative to the left side of the screen?
18:52.22blast007no, I think it's both the right side
18:52.31JeffMright side would be very odd
18:52.43blast007when I set to to 640 (with a 640x480 window) it aligns to the right side of the screen
18:52.44JeffMmost graphics put X0 on the left and the right is posive
18:53.01JeffMok
18:53.04blast007the part I don't get is that this math works for the *title*, but not for my help text
18:53.05JeffMthen yeah that won't work
18:53.13blast007float x = 0.5f * ((float)_width - titleWidth);
18:53.22JeffMwhat i usualy do is compute the center X, so width/2
18:53.51JeffMthen add or subtract from that half the width of the thing you want to center, depending on what side you want
18:54.18JeffMso if you want the right side then it'd be (screen/2) + (width/2)
18:54.19blast007ah, there's a different.. I'm using setLabel, not setString
18:54.24blast007difference*
18:54.31JeffMahh, wrong string?
18:54.36blast007seems so :)
18:54.40JeffMlabel is probalby much shorter ;)
18:54.57blast007because why would I went to 'set label' on a HUDuiLabel?  ;)  I'd want to 'set string', of course ...
18:55.45JeffMwell that's actualy what windows does too. a label is a non editable string, but it still has a text property
18:55.59JeffMelements are ether labels or text boxes.
18:56.07JeffMboth have a text property
18:56.32JeffMthat said, what does "set label" even do?
18:56.46blast007it sets a label on the label
18:56.56blast007turtles all the way down
18:57.44alpha1-2were you able to talk to OD already?
18:57.47alpha1-2sry
18:57.54blast007the label probably renders right aligned instead of left aligned, which is what has been throwing me off
18:58.24JeffMso the element has 2 text items that render diffeerently label and string?
18:58.36blast007yep
18:58.45JeffMyeah that's fuged up
19:03.37blast007holy crap, it works
19:05.26JeffMScience... it wrorks!
19:16.57JeffMlittle easier to add the strings now? :)
19:27.26*** join/#bzflag BZnotify (~BZnotify@192.30.252.42)
19:27.26BZnotify[13bzflag] 15macsforme pushed 1 new commit to 062.4: 02https://git.io/voafj
19:27.26BZnotify13bzflag/062.4 14b8e3a6f 15Joshua Bodine: Fixed an uninitialized member variable.
19:27.26*** part/#bzflag BZnotify (~BZnotify@192.30.252.42)
19:33.35*** join/#bzflag Void7 (~Void7@205.157.147.198)
19:34.10macsformeI have to say, I don't see a point of building further features on top of our ancient menu code... it will be a significant amount of manual effort, whereas a better system would do most of the formatting automatically
19:35.07macsformealthough I'm saying that after making this: http://fairserve.net/~josh/bzflag/embedded/gcwzero3.png
19:35.41macsformeJeffM: we use a kerning table?
19:39.09macsformeI don't know if you're referring to our .fmt files, which have some basic offset information for each glyph, but I thought a kerning table has spacing information for specific glyph combinations (e.g., 'a' + 'b,' etc.)
19:53.40*** join/#bzflag zuii (~cauchy@BC06BF93.catv.pool.telekom.hu)
20:00.21*** join/#bzflag kwtm (~kwtm1@c-50-174-125-106.hsd1.ca.comcast.net)
20:01.33kwtmWhat is the command for binding a key to toggle camera momentum?  By default it is the "A" key, but I want to use "A" for something else.  If instead I want to use (say) "C" for camera momentum, I say  "/bind c down "... and then what?
20:02.49kwtmAlternatively, is there a way I can get all the keybindings listed ... including the default ones?  (The camera momentum one doesn't appear in the Options->Change Input Settings screen.)  I'm referring to the camera momentum as an observer.
20:04.56the_mapkwtm: have you checked options --> input settings --> change key mapping ? that has almost all the mapping listed and changeable
20:05.28kwtmthe_map: You are right, that settings scren has almost all the mappings listed ... except the one I'm looking for.
20:05.51kwtmI guess the camera momentum setting is only in observer mode, so they decided not to put it in.
20:06.25the_mapdoes 'a' usually work for it?
20:06.52kwtmOr maybe I just missed it.  If you want to help me look for it: it is, by default, the "a" key.  I can't find any setting that has the "a" key by default.  But it works, so when I find something else to the "a" key, I can't change the camera momentum any more.
20:07.07the_mapsecond column, fifth down
20:07.13kwtmYeah, it works.  If I'm in observer mode, and I...
20:07.16kwtmoh, I will look for it.
20:08.33kwtmNo, that's not the one.  Slow Keyboard Motion is: when I'm driving a tank (not an observer), the tank moves more slowly when I move it around.  Hmm, does it act as Camera Momentum toggle when I'm in observer mode?  Let me try...
20:08.41macsformeI believe it uses the same binding as the "slow keyboard" key... those will have to be bound together
20:09.29the_mapkwtm: 'a' toggles camera momentum when you're in obs mode, following someone
20:09.31kwtmMy goodness, the_map is right!  (As is macsforme.)  And here I was looking for the words "Camera Momentum".  Thank you!
20:09.41the_mapyou're welcome :)
20:10.01kwtmNow I can follow people as an observer and not get jerked around like a dog on a (very stiff) leash. :)
20:38.31JeffMmacsforme, the data in the format is pulled from kerning info in the font. it does a VERY bad job using it to rebuild runtime kerning, because you are correct it does not adjust for different letter combinations
20:38.41JeffMbut it's still kerning data, just really bad data :)
20:39.23JeffMthat's one of the 2 main advanatages of uing FTGL, real kerning
20:40.15JeffMIIRC, the kerning offset I get assumes the previous character is an upper case X
20:40.20JeffMor maybe a W
20:40.57JeffMunless it's changed since I did it.
20:41.21macsformeTextTool was re-written recently... it uses FreeType2 now
20:41.44JeffMI was mainly asking to see what the lookup time was if it's based on my code, it's fixed. if it's FTGL it's dyanmic
20:42.03JeffMok, then it'll still write a fixed kerning offset to the fmt
20:42.12macsformeI see what you were referring to now
20:42.23JeffMI used MFC to get that data from the font, but there are many ways to dot hat
20:42.41JeffMyeah it's like the bare minium defintion of "kerning"
20:42.50JeffMit at least alows a different offset per letter
20:42.59JeffMthe previous system had one offset for all letters
20:43.07JeffMeverything had to be mono spaced
20:43.14macsformegood enough for monospace :)
20:44.49JeffMwell the font images were all hardcoded and we could not make anymore, there was no tool to build them
20:44.57JeffMso we could not make new sizes
20:45.19JeffMmy replacement was just to allow some expansion and font replacements.
20:45.26JeffMFTGL is the way to go for the future.
20:46.59JeffMI think the origonal font images were hand drawn/coded
20:47.12macsformelast I heard, FTGL still uses the fixed-function pipeline... I don't know if that has been updated recently
20:47.38JeffMwell at least it'll match bzflag's current rendering code :)
20:47.48JeffMreally font drawing can be done with a shader
20:48.13JeffMlet the card do the vector drawing of the glyphs, who needs silly bitmap catches
20:48.16macsformeI guess there is a OpenGL 3.0 port: https://github.com/BSVino/ftgl-gl3
20:48.54JeffMcool
20:49.16JeffMthat'd probably work well for you if you also convert over the other drawing.
20:49.29JeffMbut if you use a third party GUI system it may also have it's own font system.
20:50.22JeffMCEGUI should be able to do it all
20:57.29*** join/#bzflag Guest791 (d9639d73@gateway/web/freenode/ip.217.99.157.115)
20:57.29Guest791Hello
20:57.40Guest791Is there someone online?
21:00.34allejojust ask your question
21:13.19macsforme~ask
21:13.19infobotQuestions in the channel should be specific, informative, complete, concise, and on-topic.  Don't ask if you can ask a question first.  Don't ask if a person is there; just ask what you intended to ask them.  Better questions more frequently yield better answers.  We are all here voluntarily or against our will.
21:17.36Guest791K M8 just dont H8
21:18.10Guest791Is this a good counting of percentage? (Double percentage = 1 / (1 + Math.pow(10, (R_B - R_A)/400)); Long procenty = Math.round(percentage * 100);)
21:18.55*** join/#bzflag Patlabor221 (~Jeffrey@2605:e000:7d02:c700:b5b0:7eb5:3e7e:2f46)
21:27.23JeffMI was sure his quesion was going to involve wangs
21:49.38*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)
22:27.44blast007macsforme: the changes I'm doing to add context sensitive help is minimalistic, but I'm still gonna wait for 2.4.8 to push it.  Just gonna focus on finishing up the plugin documentation revamp and then I think we're good for a release, unless we need another RC.
22:33.21blast007JeffM: yeah, CEGUI is one option, but it's a bit of dependency hell
22:36.49BulletCatcherThe very few functional changes since RC2 seem to be minor enough that an RC3 should be unnecessary, especially if we already plan to do 2.4.8.
22:39.17*** join/#bzflag spldart (~spldart@172.56.15.228)
22:39.17*** join/#bzflag spldart (~spldart@bzflag/contributor/spldart)
22:39.17*** mode/#bzflag [+v spldart] by ChanServ
22:44.02JeffMblast007, yeah that is a trade off when not rolling your own
22:44.16blast007well, it's worse than most
22:44.19JeffMsweet monkey jesus that is a lot of deps...... it needs them ALL?
22:44.27blast007or actually, worse than all of them
22:44.28blast007no
22:44.37blast007but it generally needs at least one from each category
22:44.58blast007it handles resource loading, for instance, so it needs it's own image loader
22:45.08blast007needs a regex system, and XML parser
22:45.12blast007etc
22:45.19blast007so yeah, it's a bit heavy
22:45.45JeffMand i just thought it was bad because4 I didn't like the API :)
22:56.57JeffMyeah, there doesn't seem to be alot of things in that space
22:57.38JeffMthere is this, https://github.com/ocornut/imgui
22:57.48JeffMlooks like you just hook up whatever rendering you want
22:58.33JeffMit's specificly "minimize dependencies"
23:03.34spldarto_0 huge git pull out of the blue.
23:03.57blast007I've found a some others before as well    https://github.com/fruxo/turbobadger   http://libagar.org/   and another way of doing glyph rendering: https://github.com/behdad/glyphy
23:04.53JeffMjust takes time or money to integrate :)
23:40.24blast007also this: https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac
23:42.03JeffMyeah you want to do it on the GPU when possible
23:44.00*** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001)

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