Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Metus

Raw, Baldur's Gate, Physics And Collision

This topic is 6038 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, pretty interesting topic huh =) Let''s explain: I''m working on a Baldur''s Gate clone in OpenGL using MD3 models and I''ve got some questions about the RAW format and some basic collision (don''t know where the physics came from) I''ve thinking a little bit about the implementation of the terrain engine, the physics about it (there were the lost physics ) and some collision between a MD3 model and the terrain. Let''s begin with the collision questions, shall we? To detect sollision between the player and the terrain, I thought that a virtual sphere would be the best way. Am I right or am I not? If you know the answer to the quesiton above, lets continue to the next question: physics! The G-Force around this planet (earth) is somewhere around 9.8 I think. Should i press all the moveable objects with a constant of 9.8 against the Y-Axis? (stupid question it''s general physics) And finally the last question: (nice ) The RAW format has no header at all, just the color information, but WHAT do I use to create the RAW''s? no program I''ve tested has support for the RAW file...

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
quote:

To detect sollision between the player and the terrain, I thought that a virtual sphere would be the best way. Am I right or am I not?



Objects bound by spheres are bound to have less accurately detected collision detection/s than various other algorithms. To handle collison between the player and the terrain you can simply do a height compare between the two.
ex. if (player.y < GetHeight(terrain.x, terrain.z) { // collison detected! }
I am not sure how pleasing this would be to you though.

quote:

Should i press all the moveable objects with a constant of 9.8 against the Y-Axis? (stupid question it''s general physics)


I really don''t think it would be necessary to do this to all objects. However, for some things such as particle effects you should probably have a weight value based on the gravity.

quote:

the RAW format has no header at all, just the color information, but WHAT do I use to create the RAW''s? no program I''ve tested has support for the RAW file...


Adobe Photoshop.

Share this post


Link to post
Share on other sites
quote:

To detect sollision between the player and the terrain, I thought that a virtual sphere would be the best way. Am I right or am I not?



Objects bound by spheres are bound to have less accurately detected collision detection/s than various other algorithms. To handle collison between the player and the terrain you can simply do a height compare between the two.
ex. if (player.y < GetHeight(terrain.x, terrain.z) { // collison detected! }
I am not sure how pleasing this would be to you though.

quote:

Should i press all the moveable objects with a constant of 9.8 against the Y-Axis? (stupid question it''s general physics)


I really don''t think it would be necessary to do this to all objects. However, for some things such as particle effects you should probably have a weight value based on the gravity.

quote:

the RAW format has no header at all, just the color information, but WHAT do I use to create the RAW''s? no program I''ve tested has support for the RAW file...


Adobe Photoshop.

Share this post


Link to post
Share on other sites
quote:
Original post by Metus
Should i press all the moveable objects with a constant of 9.8 against the Y-Axis? (stupid question it''s general physics)



no, you shouldn''t. Firstly, only do this for objects that can move. secondly, only do it for object that are moving. put a damping factor on the hits floor, goes up, goes down, goes up, and stop it when it goes under a certain threshold.
When it reaches this threshold just treat it as a static object until it is interacted with again.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!