Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Feb 2003 05:22
Someone please deliver me from physics hell... I'm getting getting something to move realisticly... anyone done anything like this involving gravity... you know going up slopes... down slopes... heres my equations...

acceleration=change of velocity/time interval
instantaneous speed= acceleration x elapsed time
gravitational potential = weight x height
momentum = mass x speed

except giving this to an object is not hell... just confusing...
AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Feb 2003 05:37
acceleration = change of velocity/time interval
instantaneous speed = acceleration x elapsed time
gravitational potential = weight x height
momentum = mass x speed
force = mass x acceleration
acceleration = net force/mass

ARGGGG

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Feb 2003 05:39
http://home.hockaday.org/HockadayNet/academic/physics/physeqns.html

WHYYYYYYYYYYYYYYYY

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Shadow
22
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 10th Feb 2003 11:53
Don't make it more difficult than it needs to be. Are you using an object on a matrix?
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 10th Feb 2003 12:18
make an array
put into this array the informations about your object ( mass, speed, orientation, ..... )

and then, in every loop, modify thoses values ( e=mc2, p=m*g, 1ab7ac, 6co2+6h2o=c6h12o6+6o2, ..... ) and move/turn/... your object with the news values

and for the speed, you juste have sqrt() with the actuals positions and the ones from the last loop 8)

I'm following John, but I'm not john.
Lol, it is funnier in french
trager
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United Kingdom
Posted: 10th Feb 2003 14:20
try this


x_plane = cos(angle)
y_plane = cos(angle)

while y_pos < SCREEN_BOTTOM
inc x_pos, x_vel
inc y_pos, y_vel

x_vel = x_vel + x_plane * G *(sin(angle)) - F * cos(angle))
y_vel = y_vel + y_plane * G *(sin(angle)) - F * cos(angle))

endwhile

angle is kinda tricky to explain
imagine a line from the centre of your object on the slope straight down
perpendicular with the botttom of the screen well "angle" is the angle between that and
a line perpendicular with the objects velocity vector.

G is gravity best set this to 1
F is frictional value this value you have to decide for yourself
life is just too short to acutally try and calculate this for every object you create
against every other object you create, start with trying a low value like 0.1

x_vel and y_vel are speed

hope this helps

Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Feb 2003 19:54
O_O Yes its a matrix... with an object...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 11th Feb 2003 00:15
Attreid, is it me or did you suggest implementing special relativity and photosynthesis? What are the other equations you mention, I haven't seen them before.

Anyway, I've already explained about physics somewhere, it's a fairly hard topic for beginners to get to grips with, but do some research on the Internet and you should be fine. You don't even need to be accurate with the equations, as long as it looks right in the game, as far as anyone is concerned it is right.

Once I was but the learner,
now, I am the Master.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 11th Feb 2003 00:48
Check out here:
http://www.engin.umd.umich.edu/CIS/course.des/cis587/lectures/physics_files/frame.htm

Also, by browsing back to the parent directories there are interesting lectures about game creation
cheers
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 11th Feb 2003 01:04
Attreid, is it me or did you suggest implementing special relativity and photosynthesis? What are the other equations you mention, I haven't seen them before.

Anyway, I've already explained about physics somewhere, it's a fairly hard topic for beginners to get to grips with, but do some research on the Internet and you should be fine. You don't even need to be accurate with the equations, as long as it looks right in the game, as far as anyone is concerned it is right.


I'm not a beginner o_O...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Redsun
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: United States
Posted: 11th Feb 2003 08:52
well, I am and yall just confused me with Physic stuff...LOL

Michael
Director and Site Admin of Red Sun Studio's
trager
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United Kingdom
Posted: 11th Feb 2003 11:23
Is my post like invisible to everyone except me?

Redsun
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: United States
Posted: 11th Feb 2003 12:38
I see it ok

Michael
Director and Site Admin of Red Sun Studio's
Shadow
22
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 11th Feb 2003 17:35
You need to check the x and z gradients of the matrix square your on (i.e. the difference in height from where you are to just ahead in x direction and then the z direction)
Keep the x stuff separate from the z stuff as much as possible.
The greater the height difference, the faster you should slide (you should be able to get it to go in the right direction).
2 questions for you:
1. Is this good enough or do you want code?
2. Do you need jumping/falling help as well?
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Feb 2003 22:50
Puff- have you taken physics in school yet?

instantaneous speed= acceleration x elapsed time

velocity, not speed man VELOCITY!!! LOL!!! Teachers drove that into our heads

Yea for every noobs future reference, puffy is NOT a noob

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
kfoong
21
Years of Service
User Offline
Joined: 28th Jan 2003
Location: Australia
Posted: 11th Feb 2003 23:20
darbpuff i dont see reason why you are making topincs in the newb section.

--------
I HAVE NO IDEA HOW TO PROGRAM DARK BASIC!
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 12th Feb 2003 03:44
"darbpuff i dont see reason why you are making topincs in the newb section."

Because the new commers corner is where you go to get help...

Puff- have you taken physics in school yet?

I just started it... o_O this semester... I've been in it for ... 3 weeks ... =P and I figured it out... ^_^ I jacked equations out of the book and modified them...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 12th Feb 2003 03:45
^_^ I jacked equations out of the book and modified them...

physics book for class...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
trager
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United Kingdom
Posted: 12th Feb 2003 11:31
x_plane = cos(angle)
y_plane = cos(angle)

while y_pos < SCREEN_BOTTOM
inc x_pos, x_vel
inc y_pos, y_vel

x_vel = x_vel + x_plane * G *(sin(angle)) - F * cos(angle))
y_vel = y_vel + y_plane * G *(sin(angle)) - F * cos(angle))

endwhile

Is that just too complex or something?
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 13th Feb 2003 03:24
o_O right... -_- i used a more complex way...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
Yskonyn
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: Netherlands
Posted: 14th Feb 2003 13:22
Puff, I am back from being off a while, but hey what's this man? Your reputation is on the line here?!
Anyway I have made a little project (which is still WIP) which has thrust settings included already, if you think it could help you I can send it.

Yskonyn -
"It's better to wish down here you were up, then to wish up there you were down."
"The ONLY time you have too much fuel on board is when you are on fire."
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 14th Feb 2003 15:29
Attreid, is it me or did you suggest implementing special relativity and photosynthesis? What are the other equations you mention, I haven't seen them before.
hmm, lol.. I gave just a few examples to explain that I think that you have to make an array and put all informations about your object if you really want to use physics. Thoses examples are just there to ... to give an example ^^
and "1ab7ac" is a little jock ; if you say it, a french can understand "Un abbé c'est assez." => "An abbot is enough."

I'm having some physics at school ( we have several options when we start the lycée and I choosed "math + physics" ), so, when I will understand the rules, and be able to calculate the move of objects in the 3d space, I will make you a snippet
but it isn't for soon, because it's hard the physics

I'm following John, but I'm not john.
Lol, it is funnier in french
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 15th Feb 2003 07:32
Puff, I am back from being off a while, but hey what's this man? Your reputation is on the line here?!
Anyway I have made a little project (which is still WIP) which has thrust settings included already, if you think it could help you I can send it.


I know... but at least I'm a mod now...

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
large_nostril
21
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 15th Feb 2003 10:21
"velocity, not speed man VELOCITY!!! LOL!!! Teachers drove that into our heads"

RPGamer, this is true but please leave the technicalities out of the discussion. Big deal, it's a vector instead of a scalar. I hate physics. Kinematics, conservation of energy, projectile motion, it's all worthless. I mean, is my employer ever gonna ask me one day find the coefficient of friction between his butt and the chair? I sure hope not. I HATE PHYSICS!!!

(Don't take this personally RPGamer, I just really hate physics and this is in no way directed towards you)

If you want fresh underwear in the morning, take it off the night before.

Login to post a reply

Server time is: 2024-11-24 01:36:13
Your offset time is: 2024-11-24 01:36:13