Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


clanston

Member Since 15 Nov 2012
Offline Last Active Private

Posts I've Made

In Topic: Which physics library can also step backwards in time?

18 December 2012 - 05:45 PM

Thank you for your reply.


b)Save snapshots at some interval, then either interpolate or simulate forward/backward from closest point (whichever works the best)

So I'm going to do this. Set the position, rotation, velocity and angular velocity at the earlier of the two frames next to the desired time. Then advance physics by the difference between the desired time and the frame time.
This should be better than interpolating between two frames myself, because a collision might happen in the meantime.


Hi Vaclav,

I'm not sure what your specific use case is here, but be aware that physics systems don't like 'teleporting' collision geometry around. It is a slow process. Consider it (some what) equivalent to setting up the initial scene... more specially, when you teleport an object its potential collision lists will need to be re-updated entirely, rather than the presumably more optimized process used when moving an object with velocity. (Obviously every system/engine is different and this may or may not be applicable).

With the snapshot approach, while 're-winding' you don't need to move all the collision geometry around (only the visual geometry)... only once you go to re-start time do you need to move the collision geometry to the new location (and probably best to do this with a completely re-load of the physics world). This will only result in a performance spike when restarting the simulation which you can hide behind a transition effect.

Cheers,
Brad

In Topic: What side skills are essential / noteable plusses for becoming a game physics...

15 November 2012 - 10:02 PM

Hi Xcrypt,

I worked as game physics programmer for a number of years during the xbox/ps2 -> 360/ps3 transition.

From the sound of things, you want to do physics simulation programming? Games being one application of this?

If it is the mathematics of physics simulation that interests you then graphics programming is not that important. It will depend on how visual you want your simulations to be...

If your actually interested in making physics games, then I would say graphics are important. My understanding of graphics was pretty minimal when I started but when your physics simulation starts to interact with skeletons/geometry (such as with ragdolls or cloth) you'll need to have a decent understanding of how skeletons work and local/parent spaces and translating worldspace simulation data into changes in local position and orientation of bones of the skeleton. Cloth/hair simulation is harder again dealing with vertex and geometry formats (i.e. as your simulation manipulates the cloth the vertex normals and uv coordinates might need adjusting).

But, game physics is made easier by all the popular engines (bullet, havok, physX to name the most popular). These all provide a foundation from which to implement the physics of your game.

Bullet is also great if you want to get involved in the mathematical side as all the source is included. You could implement your own solver and take advantage of all other scaffolding that is already setup. Or create your own system for what ever you want to simulate.

Also, physics programming (from a game perspective) is significantly more about providing a efficient and easy interface to the physics engine being used. I spent most of my time implementing wrappers around different underlying engines and providing features to artists (e.g. configurations so artists could add physics functionality to their art assets).

I should also note that physics programming is a specialty of programming... I'd suggest developing your general programming skills (shell scripting/operating systems/ C++ (and other languages)/ algorithms/ etc) as well so that you make yourself as attractive as possible to potential employers. Getting started in the industry as a physics programmer is pretty hard, most juniors would start off learning many different aspects of game programming (graphics/ai/ gameplay/ asset pipline/ etc) before choosing a specialty... And in this day and age where AAA titles are on the decline and mobile games on the rise, a jack of all trades is much more useful :)

But, if your at the bleeding edge of mathematics, with good concurrent/vector programming skills, companies developing physics engines need employee too (albeit jobs are few and far between).

I hope that helps.

Cheers,
Brad

PARTNERS