All Questions
Tagged with software-engineering mathematics
22 questions
0
votes
0
answers
27
views
Formula to calculate Level and Current Experience from Total Xp [duplicate]
So I'm building a mobile game where I have simple XP progression system that goes like this:
Level1: 0-399 Total XP
Level2: 400-1199 Total XP
Level3: 1200-2399 Total XP
So basically for the first ...
1
vote
1
answer
397
views
Calculate speed vehicle physics 2d racegame
I am currently working on a 2d racegame where I am using physics to move a vehicle. On my form I would like to add a label containing the speed on the vehicle.
My physics knowledge is a little rusty, ...
2
votes
1
answer
587
views
How can I move and rotate an object in an “infinity” or “figure 8” trajectory?
I know that the easiest way to move an object with the figure 8 trajectory is:
x = cos(t);
y = sin(2*t) / 2;
But I just don't know how to rotate it. Lets says with ...
2
votes
1
answer
341
views
Implementing time step in main game loop
So ive read both http://gameprogrammingpatterns.com/game-loop.html and http://gafferongames.com/game-physics/fix-your-timestep/ and I kind of understand how I'm supposed to do it, but some parts are ...
3
votes
1
answer
5k
views
How to find if an object is facing another object given position and direction as separate vectors
I found a very helpful post about exactly what I need here. It uses dot products to which is what I'm specifically looking for.
It talks about players facing monsters basically. They give a helpful ...
4
votes
1
answer
118
views
Cram search results into viewport (of a search minimap)?
I'm no coder, nor do I try to be. I just had one of those "it's impossible" arguments with folks who love to argue with me before they even understand what the argument is about :)
So I need to know ...
10
votes
2
answers
960
views
Rotating a 3rd person camera toward a target
I have a 3rd person camera that doesn't look directly at the player but somewhere in front of him.
When the user enter shooting mode, I want the camera to turn around the player to face the target.
...
0
votes
1
answer
227
views
Gravity: Slow down on ground approach
I'm looking for some math, nothing language dependant.
"Standard" gravity for a character in a 2D game would go something like this:
...
18
votes
3
answers
1k
views
How can I maintain a rectangular formation when units are added or removed?
I've got bots in a rectangular formation with rows and columns. A problem arises when a bot is added or removed from the formation. When this happens, the bots have to rearrange themselves so that the ...
-1
votes
2
answers
227
views
adding space between each bricks in breakOut [closed]
i am trying to create breakout. code below loop though my 2d array(map) and creates bricks. the problem is that i want to add 10 pixels space between each bricks. i was thinking to add x*titleWidth+x+...
5
votes
2
answers
6k
views
Catmull Rom Spline - Constant Speed
Given the equations found in the answer here:
Determine arc-length of a Catmull-Rom spline to move at a constant speed
How would one A) Apply this to a 3D Catmull-Rom Spline, and B) write A out ...
-1
votes
2
answers
351
views
What kind of math should I be expecting in advanced programming? [duplicate]
Possible Duplicate:
What math should all game programmers know?
And I don't mean just space shooters and such, because in non-3D environments it's obvious that not much beyond elementary math is ...
2
votes
1
answer
518
views
Recreating Doodle Jump in Canvas - Platforms spawning out of reach
I have started to recreate Doodle Jump in HTML using Canvas. Here's my current progress. As you can see, if you play it for a few seconds, some platforms will be out of the player's reach. I don't ...
4
votes
4
answers
660
views
What should be taken into consideration when choosing a math library for games?
I'm currently selecting a C++ math library to use for a project. There are several questions here and on SO concerning the 'best' library available and many answers with different suggestions, but I ...
3
votes
1
answer
241
views
Make an object slide around an obstacle
I have path areas set up in a game I'm making for canvas/html5 and have got it working to keep the player within these areas. I have a function isOut(boundary, x, y) that returns true if the point is ...