Jump to content

Game physics

Featured Replies

You'll have to be more specific. The answer to your question is "via keyboard"...

 

First you have to know which physical law you want to implement. Then, depending on the program, you implement it. For example, here is the pseudocode of a way to introduce gravitation movement in a number of objects:

 

For every Object 0 to x
 For every object ahead of CurObject //In the list of objects
   Acceleration = NewtGravConst * NxtObject.mass / DistanceBetween[CurObject, NxtObject[math]]^2[/math]
   Velocity = Acceleration * DeltaTime
    Displacement = Velocity * DeltaTime
 EndLoop
EndLoop

  • Author

Ok, thanks for the info. But I have another question: If I created a three-dimensional object with photoshop, how do I add that object or image into the program code?

I can't tell you that, but I can tell you that Photoshop is not a modeling program... 3DSMax, or Maya are.

Archived

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.