| bio | website | gabrielgambetta.com |
|---|---|---|
| location | ||
| age | 32 | |
| visits | member for | 2 years, 5 months |
| seen | May 5 at 12:49 | |
| stats | profile views | 65 |
Software Engineer at Google Zürich.
Former Founder, Director and CTO of Mystery Studio, a small independent game developer.
|
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) == (x*a + y*c, x*b + y*d). With multiplications and additions you never mix the different components of the vectors. |
|
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. |
|
May 7 |
comment |
Curved movement between two points +1 for Bezier curves. For the use described, it's probably the easiest and the most controllable. |
|
Mar 13 |
comment |
Is flash game development not considered 'proper' game development? @AttackingHobo Now I'll actually answer your question :) Alchemy was my first choice, it didn't work, so I wrote the C++ to AS3 converter. |
|
Mar 13 |
comment |
Is flash game development not considered 'proper' game development? @AttackingHobo Yes, that was my first idea. It worked with small tests, but the compiler choked and died with a real project. Besides, I was getting all kinds of weird runtime errors seemingly for no reason at all (see forums.adobe.com/thread/590648 for example) so it wasn't a viable option in the end. |
|
Mar 8 |
comment |
Is flash game development not considered 'proper' game development? The key is "semi automated". The code produced by this tool mostly compiled, but not all the time. I had to manually tweak quite a bit of code. And of course I had to write an AS3 "renderer" to replace the OpenGL/Direct3D ones, rewriting the event handling code, and so on. But it definitely worked! There were very interesting challenges, such as how to handle overloaded methods (which AS3 doesn't support) |
|
Feb 16 |
comment |
Indie devs working with publishers That pretty much matches our experience. A few differences in our case: Code Quality: irrelevant to the publisher as long as the game works. IP: see "ideas are dime a dozen". Source: depends on the agreement, for distribution they usually don't, for co-development they usually do, depends on who owns the IP when the game is done. Flaky publishers: never happened to us in 9 years, but I've heard stories, as everyone else :) |
|
Feb 12 |
comment |
Good practices in screen states management? +1 for stack of states, it's the core of our framework too. It does cause some trouble when a non-top mode wants to finish (especially when upper modes need to save to a savegame, for example) but it's a very powerful idea in general. |
|
Feb 11 |
comment |
How to change the sprite colors BTW, I'm sorry, I hadn't seen the "probably simpler approach" in your answer. |
|
Feb 11 |
comment |
How to change the sprite colors Not sure what you mean. Black or very dark grey in the greyscale image multiplied by very bright yellow is still black or very dark yellow. |
|
Feb 4 |
comment |
Career in Game Development I understand that. What "worries" me is that you're doing it as an "assignment", my question is why you haven't done it yet, long before someone asked you to do it. In any case, if you know deep inside you really want to do games, go ahead and best of luck :) |
|
Feb 1 |
comment |
Wikipedia A* pathfinding algorithm takes a lot of time +1, I focused on algorithmic complexity and completely missed the wrong use of the heuristic! |
|
Jan 17 |
comment |
Is there any difference between storing textures and baked lighting for environment meshes? +1 for low-res lightmaps. Lightmaps can be surprisingly low-res while providing acceptable appearance, as long as the base texture looks good. |
|
Dec 24 |
comment |
STL for games, yea or nay? @Simon: with all due respect, the last example is a sign of extreme cluelessness, and has nothing to do with STL... that person would do the same in any other language with lists that can be sorted. It's his thinking that is broken. |
|
Dec 24 |
comment |
Lag compensation with networked 2D games @Vish: Oh :) I meant what happens in many online FPSs when your connection drops - you can move a bit but your character is then pulled back, as if tied by a rubber band, when the client figures out the server hasn't ACKed its inputs after a while. |
|
Dec 22 |
comment |
Lag compensation with networked 2D games @Vish: It's only half done. It's my pet project, unlike the rest of the games we make for a living, so it doesn't have a very clear "release" date :( |
|
Dec 19 |
comment |
Creating non-rectangular hotspots and detecting clicks Depends on the details. We usually reuse the button images as the masks so this method ends up using less memory than jpaver's method. |