210 reputation
19
bio website
location
age
visits member for 1 year, 4 months
seen 38 mins ago

Programmer by day, sleeper by night


Sep
11
awarded  Informed
Sep
8
comment Can the different computation power in a multi-player game affect each player's performance?
Not directly relevant, but tangentially related.
Aug
14
comment SFML: Monster following player on a straight line
Ah, okay, by "straight" you mean "horizontal and vertical only" (a diagonal line is still straight).
Aug
13
comment SFML: Monster following player on a straight line
Normalization alone will get you a unit vector, it's true, but you can multiply the resulting vector by a scalar (number) to scale it. If you want your monster to move 50 units at a time, just multiply the normalized vector by 50.
Aug
13
comment SFML: Monster following player on a straight line
The normalize function is essentially just v = v/magnitude(v), and magnitude(v) = sqrt(v.x*v.x + v.y*v.y). You can implement these yourself; they're not specific to any library.
Aug
5
awarded  Yearling
Jul
14
awarded  Critic
Jul
8
answered How to check for collisions in “diagonal” tiles?
Jun
25
comment How can I simplify this code to compute the shortest rotation between two angles?
std::min(std::max(from, to) - std::min(from,to), std::min(from,to) + 2*pi - std::max(from,to));?
Jun
12
comment Predicted target location
"I'm having an issue with calculating the predicted linear angle..." But the algorithm in the article doesn't return an angle, and if it wants a velocity in components, it's implied you already know the angle of the velocity. What exactly are you trying to calculate?
Jun
12
awarded  Commentator
Jun
12
comment How to implement a simple bullet trajectory
For a searchable term, try polar coordinates - very useful in general for things in game programming.
Jun
10
revised OpenGL - have object follow mouse
added 1252 characters in body
Jun
10
comment OpenGL - have object follow mouse
Gotcha. Does this post help? " ...the 'z' coordinate you usually retrieve by reading your depth buffer at (x,y)."
Jun
9
answered OpenGL - have object follow mouse
May
20
answered SDL2 - Ignoring repeated key input until key is released
May
14
revised How can I Intercept object with a circular motion
added 31 characters in body
May
14
revised How can I Intercept object with a circular motion
corrected link; added 87 characters in body
May
14
revised How can I Intercept object with a circular motion
corrected everything; added 86 characters in body
May
14
revised How can I Intercept object with a circular motion
added 112 characters in body