Timeline for Drawing game objects that are bigger than tiles
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 30, 2013 at 5:35 | vote | accept | dØd | ||
Jul 30, 2013 at 5:35 | vote | accept | dØd | ||
Jul 30, 2013 at 5:35 | |||||
Jul 30, 2013 at 5:33 | vote | accept | dØd | ||
Jul 30, 2013 at 5:35 | |||||
Jul 29, 2013 at 18:18 | comment | added | Joseph Mansfield |
Your for loops seem pretty unnecessary. Can't you just have if (object.visible(firstX, lastX, firstY, lastY)) which then just does if (x >= firstX && x <= lastX && y >= firstY && y <= lastY) ? In addition, your visible function could just be return <condition here>; .
|
|
Jul 29, 2013 at 17:13 | answer | added | Vaughan Hilts | timeline score: 1 | |
Jul 29, 2013 at 16:22 | answer | added | Sean Middleditch | timeline score: 1 | |
Jul 29, 2013 at 16:09 | history | edited | Sean Middleditch | CC BY-SA 3.0 |
pedantic grammar fix to title
|
Jul 29, 2013 at 16:04 | answer | added | Quonux | timeline score: 0 | |
Jul 29, 2013 at 13:52 | comment | added | Vaughan Hilts | Is it really a big performance hit? If there's only a few of these objects, it's probably fine. Go make the rest of your game and come back if it's a big deal. | |
Jul 29, 2013 at 12:32 | history | asked | dØd | CC BY-SA 3.0 |