#bitfighter IRC Log

Index Search ←Prev date Next date→

IRC Log for 2012-07-08

Timestamps are in GMT/BST.

00:02:36raptorquestion for anyone: given (const Vector<Point> *points, const Point &offset), will the following update each point in place?:
00:02:45raptor for(S32 i = 0; i < points->size(); i++)
00:02:46raptor (points->points->get(i) += offset);
00:04:52koda Quit (Quit: you can't say 'hello' without saying 'hell')
00:05:28Watusimoto_does it compile?
00:05:45Watusimoto_if so, it probably will
00:05:47Watusimoto_work
00:07:38raptoreverything needs to be turned into a vertex array...
00:07:46raptortedious
00:08:03Watusimoto_can you use a clever macro?
00:09:37raptornot really, the biggest hiccup is with glVertex2f - it can't be standalone anymore
00:10:08raptorbut that's OK, everything will be drawn faster
00:29:09Watusimoto_yes, I suspect this will be good overall
00:31:57raptorcan you tell me if this looks correct? http://pastie.org/4217944
00:32:09raptorthe top commented-out part is the original
00:33:41raptoror even if there is a more efficient way to build an array
00:41:19Watusimoto_looking
00:42:21Watusimoto_what is this from, anyway?
00:42:40raptorthe render health bar method in gameObjectRender
00:42:48raptorrenderHealthBar
00:43:22Watusimoto_looks ok, though I would have done it slightly differently
00:43:30Watusimoto_maybe
00:43:51Watusimoto_Point vertexArray[2*hatchCount];
00:44:04Watusimoto_instead of a vector
00:44:07raptorok
00:44:11Watusimoto_but the difference is very marginal
00:44:12raptorgood idea
00:44:20Watusimoto_but since you want an array in the end...
00:44:29Watusimoto_and you know the size...
00:44:41raptori need an F32 array in the end
00:44:59raptoris there a quick way to convert Point[] to F32[]?
00:45:05Watusimoto_not yet :-)
00:45:11Watusimoto_although...
00:45:18Watusimoto_maybe you can just cast it
00:45:32Watusimoto_you want x1,y1,x2,y2,...
00:45:35Watusimoto_right?
00:45:48raptorcorrect
00:46:02raptorwhere all x's and y's are dynamically generated in the loop..
00:46:20Watusimoto_try casting it to F32[] and see what happens
00:46:29Watusimoto_that would save some work!
00:46:57Watusimoto_you might need to use one of the unusual casts (reinterpret_cast, perhaps?)
00:47:29raptorhmmm
00:47:32Watusimoto_actually, why not start with an F32 array
00:47:34raptornot a sloiw down?
00:47:40Watusimoto_and forgo point altogether?
00:47:54Watusimoto_oh, I see why
00:47:59Watusimoto_points are a lot easier here
00:48:06raptoryes
00:48:38Watusimoto_well, I've never done it quite this way, but the only data members of point are x, y
00:49:02Watusimoto_so if classes really are structs, then it *should* be convertable
00:49:12raptoryes, using address() was something i saw else where in gameObjectRender, and it works
00:50:17Watusimoto_oh, and there they want F32s, right?
00:50:22Watusimoto_so yes, it should work fine
00:50:26raptoryes
00:50:34raptorok, so maybe just leave the Vector?
00:50:50Watusimoto_it's fine; I was just saying *I* would use an array
00:51:07Watusimoto_it is probably 1% more efficient
00:51:16Watusimoto_in a non-critical portion of the code
00:51:24raptorif the cast works, you mean
00:51:27Watusimoto_yes
00:51:42Watusimoto_if not, vector is better than reconstructing a F32 array manually
00:51:45Watusimoto_much better
00:51:57Watusimoto_but if this works, leave it and move on
00:54:33raptorhmm... how to cast...
00:59:54Watusimoto_you could do reinterpret cast
01:00:03raptorthis works: (F32*)(vertexArray)
01:00:08Watusimoto_or perhaps do a F32 *arr.....
01:00:10Watusimoto_yes, that
01:00:31raptorreinterpret_cast works too, but everywhere i read says to try and avoid it..
01:00:35Watusimoto_yes
01:00:44Watusimoto_but they also say to avoid c-style casts :-)
01:00:50raptorvery true...
01:00:59Watusimoto_but I prefer the C style, I think
01:02:39raptorlooks like C style will just pick any of the ones that work (besides dynamic)
01:07:01Watusimoto_really... I thought it was just brute force. that probably explains why it doesn't always work
01:07:21raptorone of the best posts on the topic: http://stackoverflow.com/a/332086
01:08:57raptori can't seem to be able to set a Point to a Point[] with array[0] = Point
01:15:06raptoroh man... the teleporter method is a beast...
01:16:40Watusimoto_get my latest before you work on teleporter
01:16:54raptordid you touch it in gameObjectRender?
01:17:13Watusimoto_not much
01:17:39raptorif(any 'yes' at all) iUpdateFirst();
01:17:42Watusimoto_ok, bed time. 3:17AM
01:17:48raptorgood night!
01:18:14Watusimoto_try compiling my latest at your convenience. I want to know if it will break gcc before I go further
01:18:22Watusimoto_send me an email
01:18:23raptorok, puched?
01:18:26raptorpushed
01:18:27Watusimoto_yes
01:18:31BFLogBot - Commit 83583c12bddd | Author: watusim...@bitfighter.org | Log: formatting
01:18:32BFLogBot - Commit 67c780f9ba74 | Author: watusim...@bitfighter.org | Log: One fewer magic number!
01:18:34BFLogBot - Commit 5d86c055048d | Author: watusim...@bitfighter.org | Log: Make first cut at centralized error checking for lua function params. Will allow auto-documentation as well. Still a couple of transitional things.
01:18:35BFLogBot - Commit 1dbc84baf88d | Author: watusim...@bitfighter.org | Log: Merge
01:18:36Watusimoto_there we go
01:18:49raptorcompiling...
01:18:51Watusimoto_there's some new stuff in there
01:19:00Watusimoto_varadic macros
01:19:33raptorwhat on earth does that mean?
01:20:05Watusimoto_macros with variable number of params
01:20:55Watusimoto_compile?
01:21:09raptoralmost
01:21:17raptornow it does..
01:21:20raptorso yes!
01:21:22Watusimoto_great
01:21:24Watusimoto_later!
01:21:26raptori'll check in my minor changes
01:21:27raptornight
01:23:54raptorok pushed change
01:28:37BFLogBot - Commit c9a23e1fe94f | Author: buckyballreaction | Log: Fix compile error and warning in Linux
01:36:12Watusimoto_ Quit (Ping timeout: 265 seconds)
04:18:35raptorho hum
04:18:51raptorES 1.1 conversion is about 1/4 done I think
04:27:12sam686A dead monitor i have, HP vs17e, starts working again after changing out 3 dead capacitors with working one in the monitor-s electronics... I have 3 working monitors now 1 CRT and 2 LCD (both LCD native is 1280 x 1024 at 60 or 75 Hertz)
04:27:43raptorwow, you changed the capacitors yourself?
04:28:53sam686yes, i almost burned my hand duing it.. heating up the metal connectors to melt the silver connectors..
04:29:03raptorouch
04:29:42sam686the tools used is about 25 dollers, 3 capactors totals about 4 dollers
04:30:01sam686cheaper then a new monitor (about 100 to 200 dollers)
04:31:21raptormuch
04:31:41sam686also the monitor I just fixed have a working built-in speakers, none of my other monitor have speakers ( i have separate speakers though).
04:37:29raptoris that your large monitor?
04:39:30sam686both LCD screen i have is almost exactly same size, My CRT is a little smaller.
04:41:20sam686my LCD screen height (1280 x 1024) is about 0.5 inch short of full length paper height in portrait paper and landscape screen
04:47:57raptorok
04:48:07raptordon't you have another CRT that is 2048 wide?
04:58:37sam686I used to have another CRT, but its very old and can only do 1024 x 768 at 60 hertz (or maybe 2048 x 1536 at 30i but too tiny blurry, and flickery interlace), not flat (round), and smaller then my current CRT
04:59:05raptorah ok
05:03:18sam686the most flickery problem about interlace CRT is when viewing this image without rescaling and withoug deflicker: http://sam686.maxhushahn.com/upload/bw_horizontal_lines.gif
05:04:04raptorinteresting
05:04:32sam686I can still use some interlace mode on my CRT, but not on LCD (trying on LCD only displayes black screen with "invalid mode")
05:09:32sam686I do notice some differences between all of my monitors about the colors... my old LCD is a little red / pink, the LCD I jsut fixed is a little green, my CRT is in between when using 6500K and max contract
05:10:53raptordo you have all three set up on one OS?
05:11:02sam686maybe pink screen might be a sigh the tiny florescent bulb behind LCD might be more then half way end of life
05:11:19sam686Yes, i hooked up all 3 monitors into one computer
05:12:20sam686with windows xp, Radeon 9200 AGP (VGA used, DVI-D, S-Video), and Radeon 9250 PCI (VGA used, DVI-I used as VGA adapter, S_Video TV out)
05:13:03raptori know some people at work who use 3 monitors... it seems really big
05:13:13raptori usually have 8 virtual desktops on one monitor instead
05:14:42sam686Since I have 2 desktop computers, and 3 monitor, and only 4 power cord (all use same power cord), I should get a power cord from somewhere, probably from a store...
05:16:12sam686problem with virtual desktop is, you can't watch video on one fullscreen virtual desktop, and play or program stuff on another virtual disktop at the same time, like you can on 2 real desktops..
05:16:54raptorthat's true
06:02:48sam686found a problem, like hostile zone energy recharge being shaky, slipzone is also shaky - might want to fix that..
06:03:35sam686that is, shaky if you are not hosting
06:25:58raptorok, getting sleepy
06:26:00raptortime for bed
06:26:02raptorgood night!
06:28:49sam686ok, night
06:57:46raptor Quit ()
08:13:29sam686 Quit (Ping timeout: 245 seconds)
08:14:07Watusimoto has joined
09:15:33Watusimoto Quit (Ping timeout: 252 seconds)
09:49:41Watusimoto has joined
11:02:47LordDVG has joined
11:06:08LordDVG Quit (Remote host closed the connection)
13:33:09raptor has joined
13:33:10ChanServ sets mode +o raptor
13:38:01raptorgood day
13:52:39Watusimoto Quit (Ping timeout: 245 seconds)
15:40:31Watusimoto has joined
15:41:42Watusimotohi
15:41:46raptorhi
15:41:52raptorno more GL_POLYGON
15:42:02raptoreverything must be GL_TRIANGLE_FAN
15:42:22Watusimotoreally?
15:42:40raptoryes - so far it's just been drop-and-replace, though, which has been good
15:42:47Watusimotointeresting
15:42:58Watusimotowe already triangulate most of our fills
15:43:09raptoryes - basically the new paradigm is: OpenGL isn't allowed to do any math
15:43:15WatusimotoI see
15:43:31raptorso practically everything is vertex arrays
15:43:53Watusimotoin some cases we may be able to cache those and reuse them
15:44:05Watusimotolike when we draw the same thing over and over
15:44:23Watusimotoan asteroid, for example, or perhaps parts of the ship
15:44:45Watusimotothough I'm not sure if that makes sense in practice
15:45:18Watusimotocan we still use opengl to do rotation and scaling and the such?
15:45:21raptoryes - you'll have to look over the code when i'm done - i'm sure there are plenty of practices that would increase performance
15:45:43raptorso far, yes
15:46:01raptorwell, at least translation works ok
15:46:27Watusimotomost of those improvements i make as I find, rather than scouring the code for opportunities for trivial improvement
15:46:49WatusimotoI converted robot.cpp over to the new centralized param checking
15:47:03WatusimotoI figured if that would work, everything else will as well
15:47:16Watusimotoit compiles; trying to figure out a good way to systematically test
15:49:31WatusimotoI *really* want to use nested #defines, but it appears to be impossible :-(
15:50:15raptorha
15:50:25raptorit's funny that we're all going back to C
15:50:51raptorquestion: one of the things that i don't feel good about is something like this: http://pastie.org/4220843
15:51:22raptorthe top version works, no problems, but is less performant (at least in my head); the bottom would be faster, but i'm doing something fundamentally wrong
15:51:26raptorany ideas?
15:55:25raptoroops, made a typo - i updated the pastie
15:55:57Watusimotolooking
15:56:49Watusimotowhy not do it even faster?
15:56:55raptorok
15:57:14raptori eagerly await your idea
15:57:26Watusimotocould we structure it so that we just do a glScale() and use the data already stored in AsteroidCoords[design][i]?
15:57:49Watusimotothen skip the whole data manipulation stage?
15:57:55raptorprobably
15:58:02raptorhowever, i wanted this to be a general case
15:58:29raptorwith asteroids we have a predefined static array, many other functions to not and require math in the for loop
15:58:37Watusimotook, so what are the weird artifacts?
15:58:53raptorlines go everywhere
15:59:14raptorusually to random far edges of the screen
15:59:38raptori've tried to use normal C arrays in many, many cases thinking i could get it correct for once
15:59:38Watusimotook
15:59:42Watusimotowell, it *looks* right
15:59:44raptorit always ends in disaster
16:00:09Watusimotowhat I would do is dump the points before rendering and make sure they are what you expect
16:00:17raptorah good idea
16:01:46Watusimotobecause it looks right
16:02:38Watusimotomight you need to pass a pointer to the array or something?
16:03:03raptor?
16:03:38raptorrenderVertexArray takes an array just like that - it works in several other cases where the array starts as static
16:03:52raptorerr.. predefined
16:03:59Watusimotojust guessing: &vertexArray? probably not.
16:04:04raptornope
16:04:09Watusimotoor *vertexArray?
16:04:20Watusimoto(when weird stuff happens, I usually try those :-)
16:04:49raptorpassing in something like this (but filled out) is what the default takes: F32 vertices[] = { };
16:05:06raptorbut i will try...
16:06:18raptoryeah doesn't compile
16:06:20Watusimotowhat you have is probably right
16:08:05raptorhuh
16:08:11raptori just got it to work...
16:08:35raptorok side question: i just came across renderTurretRanges()
16:08:44raptori've never seen that before - does that currently work?
16:13:04WatusimotoI think we removed it at some point
16:13:14Watusimotoit used to work in the editor, I believe
16:13:27Watusimotobut we had too much stuff going on
16:13:37Watusimotoit *might* still work if the turret is selected
16:13:56raptorok, well i changed it to GL_TRIANGLE_FAN
16:14:01Watusimotostill works
16:14:04raptori'll just leave it be...
16:14:09raptorhow do i get it to work?
16:14:11Watusimotoeven when turret not selected
16:14:14Watusimotogo into editor
16:14:16Watusimotoadd a turret
16:14:20Watusimotopress tab
16:14:36Watusimotook, you DO need to select the turret
16:14:47raptoroh hey... it draws a square
16:14:56Watusimotoright!
16:14:57raptorcool
16:17:11raptorcurious
16:17:25raptorif you drag a barrier in the editor, does the rendering go flying off the screen?
16:18:46Watusimotoah, I didn't
16:19:00Watusimotorebuilding now, will check
16:20:00Watusimotodragging walls in editor works fine
16:20:12raptori must have done something horrible somewhere...
16:20:38Watusimotoprobably...
16:20:39raptoryep... found the problem, too
16:21:06Watusimotowhat was the problem with the code you pastied?
16:21:47raptorjust a moment - i'm not there yet (again)
16:21:57Watusimotook, dinner time
16:21:59Watusimotoback later
16:22:51raptorok
16:26:59Watusimoto Quit (Ping timeout: 265 seconds)
17:09:24raptorkaen: do you know how to convert a 2D C-style array to one dimension?
17:10:10Watusimoto has joined
17:23:08kaenraptor, do you mean like http://pastebin.com/mYDyjn50 ?
17:24:22kaenyou can use an index counter instead of [i * w + j] and increment in the inside loop, as well
17:24:50raptorwell... i was thinking more like: *array1D = (array2D[i]);
17:25:01raptori mean without copying the array
17:25:32raptorit might not be possible - i did get that to compile, but stuff was really messed up
17:28:22raptorso a 4x2, 2D array of ints into a 1x8 array of ints...
17:28:30raptorerr 8x1
17:30:43raptori have 1 error left in gameObjectRender to be GLES compatible!
17:30:55raptorbut it's with rendering the teleporter.. :/
17:35:43kaenthis doesn't work for you?
17:35:43kaenint *arr1d = (int *) arr2d
17:35:55raptorhmm...
17:35:58raptortrying
17:36:28kaenohhh
17:36:36kaenit references the elements out of order I believe
17:36:51kaensounds like you will have to copy it :/
17:37:03raptorreally?
17:37:05raptorsadness
17:37:29raptorwhere did you find the out-of-order info?
17:37:59kaenactually I screwed up in my test code :P
17:38:01kaenit works fine
17:38:21kaen(swapped the order of '/' and '%' while dereferencing)
17:38:41raptorwhat works fine?
17:39:55kaen<kaen> int *arr1d = (int *) arr2d
17:39:57kaenworks fine
17:40:04raptorthat is a reinterpret_cast
17:40:05kaendisregard <kaen> it references the elements out of order I believe
17:40:11kaenah I see
17:40:40raptorlet me try a static
17:43:10raptoryeah, so yours compiles
17:43:21raptorbut all the data is messed up
17:44:56raptorah well
17:45:03raptorit's probably out of order data
17:49:00kaensounds like it was filled as { { 0, 2 }, { 1, 3 } } rather than { { 0, 1}, { 1, 2} } ?
17:49:08raptor Quit (Read error: Connection reset by peer)
17:49:23raptor has joined
17:49:23ChanServ sets mode +o raptor
17:49:54kaenerm, { { 0, 1}, { 2, 3} }
17:50:03raptori'm going to just have to copy - i want to move on, i think :(
17:50:12kaenblech
17:50:22raptormy current problem: http://sam686.maxhushahn.com/upload/11111111screenshot_1.png
17:50:45kaen:o
17:50:56raptorit's the last thing i need to get to draw with GLES
17:51:08raptorand it's the most complicated...
17:52:17raptorwhat do y ou think Watusimoto?: http://sam686.maxhushahn.com/upload/11111111screenshot_1.png
17:52:25raptorprogress? :)
17:58:35raptorprogress!: http://sam686.maxhushahn.com/upload/11111111screenshot_2.png
17:58:43raptor(see if you can spot the difference)
18:17:24raptorgameObjectRender is fully converted!
18:17:33raptoryay, i'd say i''m lik 60% done now
18:18:00kaen\o/
18:19:14kaenI can't believe how quickly you're moving through this. I wouldn't even know where to start.
18:29:07raptorit's because i'm sacrificing sanity
18:32:33raptorok, have to go for a few hours... maybe i'll finish up the GLES conversion today..
18:36:04raptor Quit ()
19:19:50sam686 has joined
19:19:50ChanServ sets mode +v sam686
19:30:45WatusimotoI'm very excited to see if this runs on Android
20:16:54sam686 Quit (Read error: Connection reset by peer)
20:21:08sam686 has joined
20:21:08ChanServ sets mode +v sam686
20:30:09sam686 Quit (Ping timeout: 245 seconds)
20:48:38koda has joined
20:54:20Watusimotook, signing off for the evening. good progress on the lua front today!
20:55:01BFLogBot - Commit 172aecbd4720 | Author: watusim...@bitfighter.org | Log: Variable name
20:55:02BFLogBot - Commit b4dff76a0be9 | Author: watusim...@bitfighter.org | Log: Add Loadout type to Lua param checking, fix compile problem
20:55:04BFLogBot - Commit e25cbe15feb7 | Author: watusim...@bitfighter.org | Log: Convert Robot to new centralized type checking -- introduce several new parameter types, remove duplicate error checking from Lua methods, remove unused functions, rearrange code order in Robot.cpp, and probably a few other things. This compiles but is as of yet untested.
20:55:05BFLogBot - Commit a9b0b3d1d46f | Author: watusim...@bitfighter.org | Log: Move table def closer to where it is actually used, for better understandibility
20:55:07BFLogBot - Commit 37180b0b0e46 | Author: watusim...@bitfighter.org | Log: Formatting
20:55:08BFLogBot - Commit 02131888f15a | Author: watusim...@bitfighter.org | Log: Remove debugging line
20:55:10BFLogBot - Commit c667e68fc54a | Author: watusim...@bitfighter.org | Log: Simplify and fix centralized param checking
20:55:11BFLogBot - Commit 60d40784ac33 | Author: watusim...@bitfighter.org | Log: Remove unneeded args from several robot methods -- luaW made these unnecessary. Also remove lua code that supported this. Depending on your test environment, you may need to copy robot_helper_functions into your test folder.
20:55:13BFLogBot - Commit 1354a6e74cb0 | Author: watusim...@bitfighter.org | Log: Formatting
20:55:14BFLogBot - Commit 929d5126496d | Author: watusim...@bitfighter.org | Log: Convert C cast to static_cast
20:55:16BFLogBot - Commit 027cb8d64458 | Author: watusim...@bitfighter.org | Log: Forgot to remove parameter!
20:55:17BFLogBot - Commit 76e398676fc4 | Author: watusim...@bitfighter.org | Log: More readable code
20:55:19BFLogBot - Commit d970a6c68199 | Author: watusim...@bitfighter.org | Log: Whitespace
20:55:20BFLogBot - Commit 16bf774b4b9c | Author: watusim...@bitfighter.org | Log: Comments
20:55:22BFLogBot - Commit e808051e9ba7 | Author: watusim...@bitfighter.org | Log: Fix bug preventing bots from aiming properly
20:55:23BFLogBot - Commit b084ba9f4c45 | Author: watusim...@bitfighter.org | Log: Comment
20:55:25BFLogBot - Commit f575da6409b0 | Author: watusim...@bitfighter.org | Log: Change -luaclasses cmd line option to -luadocs, formatting
20:55:26BFLogBot - Commit 304c45924316 | Author: watusim...@bitfighter.org | Log: Change help string
20:55:28BFLogBot - Commit 10933b8f73f9 | Author: watusim...@bitfighter.org | Log: Slightly nicer formatting
20:55:29BFLogBot - Commit 4fa569328979 | Author: watusim...@bitfighter.org | Log: Whitespace
21:18:26Watusimoto Quit (Ping timeout: 244 seconds)
22:20:57kaenawesome. suddenly some player's shots aren't registering -.-
22:21:08kaenplayers'
22:22:00raptor has joined
22:22:00ChanServ sets mode +o raptor
22:31:29raptor28 changes!
23:13:51raptori'm sorry... i'm ripping out the ogl console from android
23:14:01raptor(and I can't seem to fix the errors...)
23:16:03sam686 has joined
23:16:03ChanServ sets mode +v sam686
23:30:09koda Quit (Quit: you can't say 'hello' without saying 'hell')

Index Search ←Prev date Next date→

These logs were automatically created by BFLogBot on irc.freenode.net.