00:39.01 | *** join/#bzflag I_Died_Once (~I_Died_On@unaffiliated/idiedonce/x-1828535) |
02:21.52 | rodie | can't call 'em charms either;) |
02:22.51 | rodie | oh, oops |
02:43.37 | the_map | wrong window? |
04:27.44 | *** join/#bzflag BZnotify (~BZnotify@192.30.252.45) |
04:27.44 | BZnotify | [13bzflag] 15JMakey pushed 1 new commit to 062.4: 02https://git.io/vo22g |
04:27.44 | BZnotify | 13bzflag/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.39 | rodie | essentially, 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.22 | macsforme | https://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.32 | brad | ;/ws 88 |
13:16.47 | blast007 | macsforme: 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.35 | Guest696 | Hi! :) |
15:57.31 | kierra | Howdy |
15:57.38 | Guest696 | faggot |
15:58.01 | kierra | Look who knows so much |
15:58.19 | JeffM | so clever... it's almost impresive |
15:58.34 | Guest696 | i am impressed too |
15:58.54 | Guest696 | by this shitty site |
15:59.15 | JeffM | what sites have you made? |
15:59.25 | Guest696 | what the fuck are talking about? |
15:59.54 | JeffM | well 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.20 | JeffM | hmmm, 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.40 | blast007 | man, 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.39 | rodie | i 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.16 | rodie | i could cut&paste examples if you want to be amused;) |
17:55.20 | the_map | that won't always be reasonable to try though |
17:55.27 | the_map | especially in situations when you have jargon |
17:55.33 | the_map | or when you have a bunch of really long words |
17:55.43 | the_map | and it only actually works on monospace fonts |
17:55.52 | the_map | otherwise, it is pointless to even attempt it |
17:56.41 | JeffM | most consoles use monospaced fonts |
17:58.17 | the_map | the menus in bzflag are not monospaced though |
17:58.50 | *** join/#bzflag alpha1-2 (~alpha1@host0.181-1-183.telecom.net.ar) |
17:59.15 | JeffM | yes, 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.15 | the_map | then you strike the keys on the kbd carefully |
18:00.17 | JeffM | really the GUI system should be able to handle allignment, that's what most otehr systems. |
18:00.30 | alpha1-2 | <PROTECTED> |
18:03.04 | the_map | we could use a monospaced for *everything* :) |
18:03.21 | the_map | oops, missed a word |
18:03.59 | the_map | that explains why I had two "for"'s in the sentence |
18:21.38 | blast007 | rodie: I'm talking about alinging them onto screen space |
18:22.40 | blast007 | we 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.51 | blast007 | also don't have text wrapping capabilities |
18:23.02 | JeffM | how will that work with locaized strings? |
18:23.21 | blast007 | as good as everything else |
18:23.24 | blast007 | so, poorly |
18:23.50 | blast007 | (note that I'm not doing any wrapping - just noting we don't have that) |
18:24.06 | JeffM | doesn't the font system have a method to know how wide a string is going to be before it renders? |
18:24.10 | blast007 | for the help menus, we just have it split up into multiple localized strings |
18:24.11 | JeffM | I'm pretty sure I wrote one initaly |
18:24.12 | blast007 | yes |
18:24.25 | JeffM | you can use that to compute a centered postions |
18:24.29 | blast007 | but I'm trying to adjust the position in a section of the code that doesn't know the screen width |
18:25.17 | blast007 | so 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.23 | JeffM | I'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.00 | JeffM | then at least you can write a function to compute it for you. |
18:26.51 | blast007 | that or I just stash it away for now and wait until a day when the GUI gets replaced with something that works |
18:27.12 | blast007 | we do a stupid amount of manual work for each menu |
18:28.09 | JeffM | a 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.34 | JeffM | then it'll at least look centered ish |
18:29.02 | JeffM | are you using FTGL or still the old picture thing I wrote? |
18:29.34 | blast007 | the old stuff |
18:29.58 | JeffM | then the width funciton is very fast, there is no GL, just maths using the kerning table |
18:30.07 | JeffM | there'd be no issue calling it in a while loop |
18:31.03 | blast007 | maybe I just need to call the dialog 'resize' method when I change the help label.. |
18:31.14 | JeffM | or 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.10 | blast007 | What 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.13 | blast007 | x = 0.5f * ((float)_width - fm.getStrLength(MainMenu::getFontFace(), fontSize, ctl->getLabel())); |
18:50.15 | JeffM | the x is where the left side of the string is relative to the left side of the screen? |
18:52.22 | blast007 | no, I think it's both the right side |
18:52.31 | JeffM | right side would be very odd |
18:52.43 | blast007 | when I set to to 640 (with a 640x480 window) it aligns to the right side of the screen |
18:52.44 | JeffM | most graphics put X0 on the left and the right is posive |
18:53.01 | JeffM | ok |
18:53.04 | blast007 | the part I don't get is that this math works for the *title*, but not for my help text |
18:53.05 | JeffM | then yeah that won't work |
18:53.13 | blast007 | float x = 0.5f * ((float)_width - titleWidth); |
18:53.22 | JeffM | what i usualy do is compute the center X, so width/2 |
18:53.51 | JeffM | then add or subtract from that half the width of the thing you want to center, depending on what side you want |
18:54.18 | JeffM | so if you want the right side then it'd be (screen/2) + (width/2) |
18:54.19 | blast007 | ah, there's a different.. I'm using setLabel, not setString |
18:54.24 | blast007 | difference* |
18:54.31 | JeffM | ahh, wrong string? |
18:54.36 | blast007 | seems so :) |
18:54.40 | JeffM | label is probalby much shorter ;) |
18:54.57 | blast007 | because why would I went to 'set label' on a HUDuiLabel? ;) I'd want to 'set string', of course ... |
18:55.45 | JeffM | well that's actualy what windows does too. a label is a non editable string, but it still has a text property |
18:55.59 | JeffM | elements are ether labels or text boxes. |
18:56.07 | JeffM | both have a text property |
18:56.32 | JeffM | that said, what does "set label" even do? |
18:56.46 | blast007 | it sets a label on the label |
18:56.56 | blast007 | turtles all the way down |
18:57.44 | alpha1-2 | were you able to talk to OD already? |
18:57.47 | alpha1-2 | sry |
18:57.54 | blast007 | the label probably renders right aligned instead of left aligned, which is what has been throwing me off |
18:58.24 | JeffM | so the element has 2 text items that render diffeerently label and string? |
18:58.36 | blast007 | yep |
18:58.45 | JeffM | yeah that's fuged up |
19:03.37 | blast007 | holy crap, it works |
19:05.26 | JeffM | Science... it wrorks! |
19:16.57 | JeffM | little easier to add the strings now? :) |
19:27.26 | *** join/#bzflag BZnotify (~BZnotify@192.30.252.42) |
19:27.26 | BZnotify | [13bzflag] 15macsforme pushed 1 new commit to 062.4: 02https://git.io/voafj |
19:27.26 | BZnotify | 13bzflag/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.10 | macsforme | I 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.07 | macsforme | although I'm saying that after making this: http://fairserve.net/~josh/bzflag/embedded/gcwzero3.png |
19:35.41 | macsforme | JeffM: we use a kerning table? |
19:39.09 | macsforme | I 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.33 | kwtm | What 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.49 | kwtm | Alternatively, 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.56 | the_map | kwtm: have you checked options --> input settings --> change key mapping ? that has almost all the mapping listed and changeable |
20:05.28 | kwtm | the_map: You are right, that settings scren has almost all the mappings listed ... except the one I'm looking for. |
20:05.51 | kwtm | I guess the camera momentum setting is only in observer mode, so they decided not to put it in. |
20:06.25 | the_map | does 'a' usually work for it? |
20:06.52 | kwtm | Or 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.07 | the_map | second column, fifth down |
20:07.13 | kwtm | Yeah, it works. If I'm in observer mode, and I... |
20:07.16 | kwtm | oh, I will look for it. |
20:08.33 | kwtm | No, 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.41 | macsforme | I believe it uses the same binding as the "slow keyboard" key... those will have to be bound together |
20:09.29 | the_map | kwtm: 'a' toggles camera momentum when you're in obs mode, following someone |
20:09.31 | kwtm | My goodness, the_map is right! (As is macsforme.) And here I was looking for the words "Camera Momentum". Thank you! |
20:09.41 | the_map | you're welcome :) |
20:10.01 | kwtm | Now I can follow people as an observer and not get jerked around like a dog on a (very stiff) leash. :) |
20:38.31 | JeffM | macsforme, 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.41 | JeffM | but it's still kerning data, just really bad data :) |
20:39.23 | JeffM | that's one of the 2 main advanatages of uing FTGL, real kerning |
20:40.15 | JeffM | IIRC, the kerning offset I get assumes the previous character is an upper case X |
20:40.20 | JeffM | or maybe a W |
20:40.57 | JeffM | unless it's changed since I did it. |
20:41.21 | macsforme | TextTool was re-written recently... it uses FreeType2 now |
20:41.44 | JeffM | I 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.03 | JeffM | ok, then it'll still write a fixed kerning offset to the fmt |
20:42.12 | macsforme | I see what you were referring to now |
20:42.23 | JeffM | I used MFC to get that data from the font, but there are many ways to dot hat |
20:42.41 | JeffM | yeah it's like the bare minium defintion of "kerning" |
20:42.50 | JeffM | it at least alows a different offset per letter |
20:42.59 | JeffM | the previous system had one offset for all letters |
20:43.07 | JeffM | everything had to be mono spaced |
20:43.14 | macsforme | good enough for monospace :) |
20:44.49 | JeffM | well the font images were all hardcoded and we could not make anymore, there was no tool to build them |
20:44.57 | JeffM | so we could not make new sizes |
20:45.19 | JeffM | my replacement was just to allow some expansion and font replacements. |
20:45.26 | JeffM | FTGL is the way to go for the future. |
20:46.59 | JeffM | I think the origonal font images were hand drawn/coded |
20:47.12 | macsforme | last I heard, FTGL still uses the fixed-function pipeline... I don't know if that has been updated recently |
20:47.38 | JeffM | well at least it'll match bzflag's current rendering code :) |
20:47.48 | JeffM | really font drawing can be done with a shader |
20:48.13 | JeffM | let the card do the vector drawing of the glyphs, who needs silly bitmap catches |
20:48.16 | macsforme | I guess there is a OpenGL 3.0 port: https://github.com/BSVino/ftgl-gl3 |
20:48.54 | JeffM | cool |
20:49.16 | JeffM | that'd probably work well for you if you also convert over the other drawing. |
20:49.29 | JeffM | but if you use a third party GUI system it may also have it's own font system. |
20:50.22 | JeffM | CEGUI should be able to do it all |
20:57.29 | *** join/#bzflag Guest791 (d9639d73@gateway/web/freenode/ip.217.99.157.115) |
20:57.29 | Guest791 | Hello |
20:57.40 | Guest791 | Is there someone online? |
21:00.34 | allejo | just ask your question |
21:13.19 | macsforme | ~ask |
21:13.19 | infobot | Questions 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.36 | Guest791 | K M8 just dont H8 |
21:18.10 | Guest791 | Is 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.23 | JeffM | I was sure his quesion was going to involve wangs |
21:49.38 | *** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001) |
22:27.44 | blast007 | macsforme: 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.21 | blast007 | JeffM: yeah, CEGUI is one option, but it's a bit of dependency hell |
22:36.49 | BulletCatcher | The 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.02 | JeffM | blast007, yeah that is a trade off when not rolling your own |
22:44.16 | blast007 | well, it's worse than most |
22:44.19 | JeffM | sweet monkey jesus that is a lot of deps...... it needs them ALL? |
22:44.27 | blast007 | or actually, worse than all of them |
22:44.28 | blast007 | no |
22:44.37 | blast007 | but it generally needs at least one from each category |
22:44.58 | blast007 | it handles resource loading, for instance, so it needs it's own image loader |
22:45.08 | blast007 | needs a regex system, and XML parser |
22:45.12 | blast007 | etc |
22:45.19 | blast007 | so yeah, it's a bit heavy |
22:45.45 | JeffM | and i just thought it was bad because4 I didn't like the API :) |
22:56.57 | JeffM | yeah, there doesn't seem to be alot of things in that space |
22:57.38 | JeffM | there is this, https://github.com/ocornut/imgui |
22:57.48 | JeffM | looks like you just hook up whatever rendering you want |
22:58.33 | JeffM | it's specificly "minimize dependencies" |
23:03.34 | spldart | o_0 huge git pull out of the blue. |
23:03.57 | blast007 | I'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.53 | JeffM | just takes time or money to integrate :) |
23:40.24 | blast007 | also this: https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac |
23:42.03 | JeffM | yeah you want to do it on the GPU when possible |
23:44.00 | *** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001) |