anyone know where i can learn t do this...thx
(i know i spelled it wrong..sorry)
Printable View
anyone know where i can learn t do this...thx
(i know i spelled it wrong..sorry)
Physics. :)
Game physics vary wildly depending on the environment (FPS, flight sim, space sim, etc.). What environment specifically?
Fox webpage have something about Gravity and stuff like that but I do not remember the link :(
Here is the link : http://fox.acky.net/
thx DaoK
and filburt, im making a Motocross Game and i have to make the motorcycle come of the ground when it hits the jumps and go up the hills right and stuff like that
Have you taken Calculus yet?
Yes I used some code for my game, the gravity one is nice :)
im in middle schoolQuote:
Originally posted by filburt1
Have you taken Calculus yet?
Here's some Pseudo-Code. Remember that ALL VARIABLES SHOULD BE DOUBLES AND NOT INTEGERS OR LONGS OR WHATEVER!!! :)
Gravity = 0.1 'Or some other small number, you might have to experiment with this
TerminalVelocity = 0.5 'Experiment with this too, it's the amximum falling speed
'The following code is supposed to be ran EVERY FRAME
1) If SpeedZ > TerminalVelocity And Player is not touching the gground Then SpeedZ = SpeedZ - Gravity
2) PlayerZ (the player's height) = PlayerZ + SpeedZ
3) If the player touches the ground, then
3a) SpeedZ = 0.5*SpeedZ
3b) If SpeedZ < 0.1 Then SpeedZ = 0
That should do it :)
(I might have forgotten some important stuff so tell me if it doesn't work)
that's pseudoballistics jotaf (something you have in old super mario bros games), for real ballistics the friction is proportional to the velocity
We don't need friction, it's a motorcycles game and not a science project :rolleyes: :D
without friction there would be no terminal velocity :rolleyes:Quote:
Originally posted by Jotaf98
We don't need friction, it's a motorcycles game and not a science project :rolleyes: :D
I'm studying computer science and physics is a very vital part.
I have a motorcross game called action cross somewhere which includes nonelastic collision with 2d spring dynamics and rotation momentum. If you don't want physics, try archanoid ;)
Quote:
Gravity = 0.1
should be 9.8
9.8 would be for m/sec
0.1 would be 5/48m/sec
for light-years/sec, it would be one very small number.
What I am attempting to point out is that it matters what system you are using.
kedaman, you have action cross? :eek:
Isn't that the DOS game where you drive a very flat looking motorcycle and you have to get the apples or something? :)
If it isn't, ignore this post, if it is, can you send it to me? Been looking for it for three years (lost the disk :()
Yep! I have two versions of it, while the later contains an level editor :D I used to make levels where the motorcycle would fall and do all kinds of loops and tricks without you touching any key at all, hehe that was fun. I'll see if i can find it.
Cool, I only had about 8 levels and no editor at all.... if you find it can you send it to [email protected] ? :)
....sorry for the interruption, you may now continue rambling about stuff I don't understand :)
I found the earlier version (1.1) with no level editor and 24 levels, I'll search for the other one if you want.
If it's not a problem for you....
Just send all you can find :)
It's 3.4M rared, should i send it in parts?
I've got an average of 400 kb/sec download, I don't mind the 3.4 MB :)
ok just asked in case you wouldn't have space in your mailbox
(sent)
DaoK: I know that, but we're talking about pixels here and not meters :) It will depend a lot on the speed of the game and the size of the motorcycle.