17,589 reputation
23672
bio website sam.zoy.org
location Paris, France
age 36
visits member for 4 years, 2 months
seen 17 hours ago

I live in Paris, France.

I work on video games (computers and consoles) for a living. I write free software and all kind of crazy shit for fun. My interests: image processing, video coding, rendering, game development, maths, physics, compression, cryptography.


Dec
12
answered Simple speed deceleration with variable time step?
Dec
12
answered How do you calculate if 2 lines are facing toward or away?
Dec
12
comment How do you calculate if 2 lines are facing toward or away?
You should split your question in two. The part with line segments is very easy. The part with bezier curves is extremely complex and only has an approximate numerical solution.
Dec
12
comment How do you calculate the nearest point on 2 curves?
I believe this question is a good start.
Dec
12
comment Chessboard colors with VBO
I would only render one large quad, with four vertices and four texture coordinates (0,1) (0,0) (1,0) and (1,1) passed as varyings to the fragment shader. Then in the fragment shader I would compute vec2 tmp = step(0.125, mod(texcoord.st, 0.25)) and float moo = mod(tmp.x + tmp.y, 2.0). The value moo is then 0 or 1 depending on whether you need to render a black or a white pixel, so in the end gl_FragColor = vec4(moo, moo, moo, 1.0). If I'm correct, that's all you need.
Dec
12
comment Chessboard colors with VBO
Also, it is a real waste to send two VBOs. Just send the 81 vertices once and for all, and play with the index buffer to select which ones to draw in each call.
Dec
12
comment Chessboard colors with VBO
You need 79 vertices to display the 32 black squares or the 32 white squares of a chessboard: 4 vertices for each of the 32 quads = 128, minus 7×7 = 49 for each vertex that belongs diagonally to two quads, equals 79.
Dec
12
comment Chessboard colors with VBO
Are you going to use a fragment shader for the rendering later on?
Dec
12
comment How to compute tile offset for different isometric angles?
Are you aware of the tangent function and, incidentally, the inverse tangent?
Dec
12
comment Objective-C or C++ of game engine header file for iOS developers?
Yes, that wasn't intended as criticism. Or at least, I hoped to be constructive :-)
Dec
12
comment Should I write my own physics engine, because of networking integration?
@MadPumpkin: your overconfidence reflects badly on your answer; you are talking about detecting collisions, yet you don't mention sweep collision detection which is at the absolute core of proper bullet handling in a 2D shooter. Also, even with sweeping, resolution is about as important as detection since you need to decide which collision happened first, resolve potential conflicts, and maybe start the whole resolution again in case of removed entities. Certainly not the trivial matter you appear to be implying it is.
Dec
12
comment Objective-C or C++ of game engine header file for iOS developers?
This is not strictly true; you still need to instruct the compiler to build all files that use C++ headers as Objective-C++ rather than Objective-C.
Dec
12
revised How to create adjustable formula for RPG level up requirements?
tweak code and add explanations
Dec
12
answered How to create adjustable formula for RPG level up requirements?
Dec
12
comment Should I write my own physics engine, because of networking integration?
Also note that if you use JBox2D, you will need to use strictfp everywhere, which will seriously impact performance. Otherwise the server and the client may not get exactly the same results. I would recommend using fixed point instead.
Dec
12
comment Simple noise generation
@Xenon06: if you are after performance, I really think you will need native code; thankfully you can write Node.js extensions in C++.
Dec
12
comment Handling random with unique chance in Python
+1 then, and nice improvements to the partialsums building.
Dec
12
revised What kind of environment is expected in elevated, hot areas?
spelling in title
Dec
11
comment How do I find the point of impact with 2D per-pixel collision detection?
If you haven’t yet, add “sweep” to your search queries. Dynamic collision detection algorithms often use a sweep parameter to get the earliest collision point.
Dec
11
comment Handling random with unique chance in Python
Just FTR, the asker is talking about “stupid amounts of code ”, which means it’s not really an optimisation question he’s asking. He actually needs guidance with understanding what a loop invariant is and finding the one he needs.