Reputation
2,358
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
5 13
Newest
 Yearling
Impact
~75k people reached

  • 0 posts edited
  • 0 helpful flags
  • 30 votes cast
Jul
30
comment per pixel based collision detection
Quadtree, not octree. Octree is for 3D. I don't think you really need a bounding circle for this, as the first level of the quadtree will discard the whole thing if they don't overlap at all.
Jul
30
answered Android Bitmap: Collision Detecting
Jul
30
answered Networking gampeplay - Sending controller inputs vs. sending game actions
Jul
29
answered Effort of impementing interpolation in networked Asteroids
Jul
29
answered Realtime multi-player game design principles for Node.js
Jul
29
answered Interpolating positions in a multiplayer game
Jul
29
answered Multiplayer Network Game - Interpolation and Frame Rate
Jul
12
comment How does client-side prediction work?
Thanks for the suggestion and your kind words :)
May
6
awarded  Nice Answer
Mar
12
awarded  Nice Answer
Dec
19
awarded  Yearling
Dec
13
comment How do I create a curved line or filled circle or generally a circle using C++/SDL?
I approve this message. Start with something you understand (like what Ken suggests for circles, or y = Ax+B for straight line segments), and then learn the "real" algorithms (e.g. Bresenham)
Oct
21
comment Vector transform equation explanation
Exactly. In general, x*(a,b) + y*(c,d) == (xa + yc, xb + yd). With multiplications and additions you never mix the different components of the vectors.
Oct
21
answered Vector transform equation explanation
Oct
4
comment Depth interpolation for z-buffer, with scanline
Glad to hear that. I did, in fact, teach Computer Graphics in a previous life :)
Oct
4
comment Depth interpolation for z-buffer, with scanline
And finally, why. A plane (where the triangle is embedded) is Ax + By + Cz + D = 0. z is clearly linear function of (x, y). You project so x'=x/z and y'=y/z. From there, x=x'z and y=y'z. If you replace these in the original equation you get Ax'z + By'x + Cz + D = 0. Now z = -D / (Ax' + By' + C), where it's clear that z is not a linear function of (x', y'). But 1/z is therefore (Ax' + By' + C) / -D, which is a linear function of (x', y').
Oct
4
comment Depth interpolation for z-buffer, with scanline
Oh, and regarding "when": compute the 1/Z values before starting to rasterize the triangle (e.g. just before the vertical loop), so you get interpolated 1/Z at the left and right of the scanline. Interpolate these linearly (do NOT do 1/Z again - the interpolated values are already 1/Z!), and undo the transform just before checking the zbuffer.
Oct
4
answered Depth interpolation for z-buffer, with scanline
Sep
4
awarded  Nice Answer
Feb
7
awarded  Nice Answer