IPhysics - Newton/Irrlicht framework
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
IPhysics - Newton/Irrlicht framework
I've just released the first version of IPhysics, which is a set of classes for using Newton and Irrlicht together. It is also the spiritual successor to the 'Newton Vehicles in Irrlicht tutorial' which I wrote, oooh, two years ago? (For Irrlicht 0.6! Back in the day...)
There have been and indeed still are a few Newton / Irrlicht things around, but here's what I'm designing for with IPhysics:
- Designed wholly for Irrlicht use - everything uses native Irrlicht classes like vector3df.
- Really easy to use - no need to wrestle with Newton callbacks.
- Seamless integration into your project - the interface design is inspired by Irrlicht's: you have one root object through which all calls are made, and you are returned pointers to abstract interface classes so you can only call the functions that you need.
- Supports all the usual functionality that everyone's always trying to implement - terrain, collision tree, vehicles...
So that's the plan, anyway. The current release supports:
- cubes
- spheres
- terrain
- static meshes (levels etc)
- (simple) vehicles
Screenshot:
The download package contains the full source, documentation, some examples and example code, and a precompiled static library so you can use it in your own projects.
Clickys:
Website | Direct Download
The next big things on my to-do list are:
- character controller
- timing / update fix
To all Newton users: how do you run Newton with a correct timestep? From what I can see, passing Newton a 'correct' timestep makes it run in slow-motion, and passing it a stupidly big value just makes it decide for itself what the timestep should be (you can check with NewtonGetTimeStep() what it actually used), based on what minimum frame rate you specified with NewtonSetMinimumFrameRate().
To everyone else: the above is why I'm creating IPhysics - so we don't have to go through all that ever again!
There have been and indeed still are a few Newton / Irrlicht things around, but here's what I'm designing for with IPhysics:
- Designed wholly for Irrlicht use - everything uses native Irrlicht classes like vector3df.
- Really easy to use - no need to wrestle with Newton callbacks.
- Seamless integration into your project - the interface design is inspired by Irrlicht's: you have one root object through which all calls are made, and you are returned pointers to abstract interface classes so you can only call the functions that you need.
- Supports all the usual functionality that everyone's always trying to implement - terrain, collision tree, vehicles...
So that's the plan, anyway. The current release supports:
- cubes
- spheres
- terrain
- static meshes (levels etc)
- (simple) vehicles
Screenshot:
The download package contains the full source, documentation, some examples and example code, and a precompiled static library so you can use it in your own projects.
Clickys:
Website | Direct Download
The next big things on my to-do list are:
- character controller
- timing / update fix
To all Newton users: how do you run Newton with a correct timestep? From what I can see, passing Newton a 'correct' timestep makes it run in slow-motion, and passing it a stupidly big value just makes it decide for itself what the timestep should be (you can check with NewtonGetTimeStep() what it actually used), based on what minimum frame rate you specified with NewtonSetMinimumFrameRate().
To everyone else: the above is why I'm creating IPhysics - so we don't have to go through all that ever again!
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
I have everything linked properly and the DLLs are in the same folder etc. however when I try to compile example 1 in my project...
[Linker error] undefined reference to `CPhysics::CPhysics()'
[Linker error] undefined reference to `CPhysics::init()'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
I also have all the Newton libs linked. I use Irrlicht 1.1 and Newton 1.53
[Linker error] undefined reference to `CPhysics::CPhysics()'
[Linker error] undefined reference to `CPhysics::init()'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
I also have all the Newton libs linked. I use Irrlicht 1.1 and Newton 1.53
-
- Posts: 34
- Joined: Tue Aug 22, 2006 2:48 pm
- Location: Malaysia
This will come in very handy for a lot of people, good work, and good luck on future updates.
As far as your timestep question, a lot of questions asked about how to update newton with a correct timestep get responces linking to http://www.gaffer.org/fix-your-timestep
No doubt you have seen it if you have scoured around the Newton forums. I've glanced over it a few times, haven't tried implementing it though.
As far as your timestep question, a lot of questions asked about how to update newton with a correct timestep get responces linking to http://www.gaffer.org/fix-your-timestep
No doubt you have seen it if you have scoured around the Newton forums. I've glanced over it a few times, haven't tried implementing it though.
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
@zeno60: Nice one - thanks for the link. Hadn't seen that one - I found lots of things on the Newton forum about time splicing, which looked a bit odd because from what I could tell you ended up calling NewtonUpdate several times per frame.
@monkeycracks: do you have the line:
in your header?
@monkeycracks: do you have the line:
Code: Select all
#pragma comment(lib, "IPhysics.lib")
-
- Posts: 275
- Joined: Fri May 12, 2006 6:37 pm
- Location: Germany
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
@gfxstyler: No plans for ODE.
@TheGameMaker: No constraints yet - my plan is to go through and implement all the Newton basic types first, and then a character controller. The main reason for this is that a lot of this stuff is floating around already - Mercior's original tutorial, my vehicle stuff, and then people like dhenton have made some great FPS character controllers, so hopefully it should all come together quite quickly.
@TheGameMaker: No constraints yet - my plan is to go through and implement all the Newton basic types first, and then a character controller. The main reason for this is that a lot of this stuff is floating around already - Mercior's original tutorial, my vehicle stuff, and then people like dhenton have made some great FPS character controllers, so hopefully it should all come together quite quickly.
-
- Posts: 518
- Joined: Tue Mar 29, 2005 9:02 pm
- Location: Alex,Egypt
- Contact:
i did not use Newton from befor but this make me want to start that way.
Nick it is very easy , so keep up that good work.
have small question, i sow you impliment Cube Sphere and Car Objects, so could it be a bit more general , i.e. the Car Object has child Objects those built in the Library , and i want it to allow us to Make the hirarrchy system .
thanks
Bey.
Nick it is very easy , so keep up that good work.
have small question, i sow you impliment Cube Sphere and Car Objects, so could it be a bit more general , i.e. the Car Object has child Objects those built in the Library , and i want it to allow us to Make the hirarrchy system .
thanks
Bey.
Magic 2d Library For Irrlicht : http://www.freewebs.com/bcxgl/index.htm
http://www.freewebs.com/bcxdx/index.htm
http://groups.yahoo.com/group/bcxdxc/
http://www.freewebs.com/bcxdx/index.htm
http://groups.yahoo.com/group/bcxdxc/
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
I've just updated IPhysics to 1.1 - the only real fix is the timing issues, which now work properly. Everything now moves a little bit slowly, and at the moment I'm still working out why, but it's definitely more correct than it was
Also a couple of interface tweaks: firstly, the IPhysics constructor now needs a pointer to the ITimer in your IrrlichtDevice. Secondly, update() doesn't take any arguments any more - it works out the timestep itself!
@Emil_halim: At the moment each entity is considered seperate - when I start adding the rest of the Newton primitives, of course I'll also add the ability to have compound primitives. More complex hierarchies are a little way off though!
Also a couple of interface tweaks: firstly, the IPhysics constructor now needs a pointer to the ITimer in your IrrlichtDevice. Secondly, update() doesn't take any arguments any more - it works out the timestep itself!
@Emil_halim: At the moment each entity is considered seperate - when I start adding the rest of the Newton primitives, of course I'll also add the ability to have compound primitives. More complex hierarchies are a little way off though!
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan