Tokamak + Irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Tokamak + Irrlicht

Post by powerpop »

I integrated Tokamak into my Ping.net project by creating separate TokamakObject and TokamakSim. The TokamakObject gets associated with each Scenenode in whatever Game Object class you use. The TokamakSim object sits in your main loop and updates the physics simulation and object data. There are some issues I need to resolve that will help me clean up the code so I can release it.

1. I want to set up the Tokamak Sim on a timer so it is not called every render loop BUT I cannot do that until there is a way to update the transform of the SceneNode so it stays in position between simulation updates (right now it flashes if i try to make the sim not update every frame)

2. I need to make the simulation happen at around the same time that animators get updated - but right now the animator update is buried in drawAll on scenemanager - the prerender and postrender need to be separated so things like physics can insert themselves without having to become animators themselves

---
here is the screenshot:
Image

and the binary download - you can change the test.3dml file to add more objects
http://www.ping.net/snapshots/ping2.zip

additions in the works after i do a cleanup:
- breakable objects
- animatedbodies (which are things that dont move - go figure - but i need to make a tokamakobject for them
- joints[/url]
Last edited by powerpop on Fri Jan 30, 2004 7:57 pm, edited 1 time in total.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

looks really cool PP. keep up the good work.

maybe I can recruit u to do the physics for Erring Light :wink:
a screen cap is worth 0x100000 DWORDS
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Post by powerpop »

Apologies to those who tried to run the download - i had the link posted incorrectly - the correct download to see the physics in action is:

http://www.ping.net/snapshots/ping2.zip

keless - now you have to really try to run it ;) - and i will release the tokomak objects as soon as i unwrinkle them - you can easily add them to your project as well
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

it runs well, though i think the blocks move too bouncy and slow-- like there is low gravity-- im sure this is just a setting. also, i'd like to see the avatar incorperated in the collision detection as well.

(i dont like the camera control >.< ..but, im just picky)
a screen cap is worth 0x100000 DWORDS
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Post by powerpop »

the camera control was borrowed - i want to change that soon - and i am working on the character now - its tricky - i think i am going to move ALL my collision checking to tokamak (so my world is 100% physical) - the trick is how to stop the player from tumbling and tipping over! i have some ideas ...

and gravity is set at -10 which is realistic supposedly - but the way it is now you are tethered to frame rate - and i have not discovered the right balance in tokamak between gravity, mass, simulation call frequency and elapsed time - ugh - i want it to look realistic
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Fourfold frame rate increase!

Post by powerpop »

i moved the physics update code to a separate object that is triggered in the main loop (i set it for every 10 milliseconds) - and the simulation is set up so that every call has the same elapsed time - this smooths out the animation and makes it more stable

it also has the AMAZING side effect of a fourfold increase in framerate - from 40fps to 150fps on my mobile ati

http://www.ping.net/snapshots/ping6.zip for the latest binaries

i am still having a problem with converting tokamak rotation matrix values to the proper euler - i think i have the right conversion now but there is still an error in one of the cubes - i am working with people on the tokamak forums to figure out if its a problem with my ground or with the sim settings i use
powerpop
Posts: 171
Joined: Thu Jan 08, 2004 1:39 am
Location: san francisco

Fourfold frame rate increase!

Post by powerpop »

i moved the physics update code to a separate object that is triggered in the main loop (i set it for every 10 milliseconds) - and the simulation is set up so that every call has the same elapsed time - this smooths out the animation and makes it more stable

it also has the AMAZING side effect of a fourfold increase in framerate - from 40fps to 150fps on my mobile ati

http://www.ping.net/snapshots/ping6.zip for the latest binaries

i am still having a problem with converting tokamak rotation matrix values to the proper euler - i think i have the right conversion now but there is still an error in one of the cubes - i am working with people on the tokamak forums to figure out if its a problem with my ground or with the sim settings i use

** as a side note - the skeletal character motion updates should also be moved to a centralized timer because its eating up unecessary bandwidth - really, the only animators that should be called along with the scenenode render pass are those that effect the visual display of objects - anything that deals with motion should be a timeranimator - that is what i will build next and i will move all animation to it **
Post Reply