Newton + Ogre

Share with us how are you using the powerrrr of the force

Moderator: Alain

Postby walaber » Sun Jan 16, 2005 9:06 pm

by the way the demo01 project uses stencil shadows, and the car demo uses texture shadows. if you look close in the car demo, the shadow is also being projected on the ceiling :shock: , an afterproduct of using texture shadows. if I broke up the world into 2 pieces (ground+walls / ceiling), I could fix it. but the game I'm planning on making will be outdoors anyway, so... eh. :lol:

[edit] I'm not sure about the km/h thing, I must be calculating it wrong. I'm taking the rigid body's velocity (should be in m/s as my units are in meters), and multiplying by (1000/360) which should give me km/h right?
m * 1000 = km, s * 60 * 60 = hrs...

oh wait, I think I could just be multiplying by 3.6, according to an online converter :shock: I'll fix it.
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby walaber » Fri Jan 21, 2005 12:45 am

I've added the basic joints to my OgreNewt project now... and I'm pretty happy with how they work...

Image
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby The unProfessional » Fri Jan 21, 2005 4:52 pm

that reminds me of katamari damacy :)
The unProfessional
 
Posts: 131
Joined: Sun May 02, 2004 9:08 pm
Location: Southern California

Postby walaber » Sun Jan 23, 2005 9:32 pm

working on my first OgreNewt game... "Stunt Playground"

WIP screenshots, I have 4 cars basic mesh complete:

Image Image
Image Image

any ideas for other vehicles?

also any ideas for interesting obstacles / jump designs welcome :lol: :lol:
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby GrimReapa » Mon Jan 24, 2005 11:29 am

Any chance to see a tractor trailer?
GrimReapa
 
Posts: 4
Joined: Mon Jan 24, 2005 12:55 am

Postby kjelle69 » Mon Jan 24, 2005 2:14 pm

Feel free tu Use My Fiero used in the DarkBasic Demo :D

Image
User avatar
kjelle69
 
Posts: 60
Joined: Fri Aug 27, 2004 9:08 am
Location: Koskullskulle, Sweden

Postby walaber » Sun Jan 30, 2005 9:04 pm

progress is slow but steady on my game, still mostly modelling...

Image
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby GrimReapa » Mon Jan 31, 2005 6:50 pm

Think you could add an 18 wheeler w/ a detachable trailer?
GrimReapa
 
Posts: 4
Joined: Mon Jan 24, 2005 12:55 am

Postby Slick » Mon Jan 31, 2005 11:14 pm

For material callbacks I should only get a callback when a material pair collides right?

I am adding an object and immediately it collides. I'm fairly sure it is in the air above the terrain when it is added because if I don't use the material callback it drops to the ground and bounces correctly.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Postby walaber » Mon Jan 31, 2005 11:25 pm

remember, the first material callback (ContactStart) doesn't mean the bodies have actually collided yet. it means that the bodies Bounding Boxes are overlapping, and a collision "might" occur. it's only if the ContactProcess callback gets called that you know a true collision has occured.
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby Slick » Mon Jan 31, 2005 11:44 pm

OK - i have been reading the samples and the help files. I must have missed that they might collide.

What's interesting is the bodies reported appear to have the same newtonbody* as in it might be the object itself. Is this by design and should be ignored?
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Postby Slick » Mon Jan 31, 2005 11:49 pm

Thanks for your help Walaber. I spent a ton of time trying to work out why contactbegin was being called :wink: At least for now it appears to me that it might be called on the object itself.

I placed a breakpoint in contactprocess and it broke as expected.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Postby walaber » Wed Feb 02, 2005 1:52 am

I'm making a new "Rigid Body Designer", tool with Ogre now, like the one I made for Dark Basic Pro a while back.

this time I'm making it more general, it will save it's Rigid Body files in .xml format. I still have several parts to build (like saving/loading, setting object Mass / inertia), but I'm happy with my progress so far:

Image

the grey object is the visual object, and the green/red primitives are the collision elements used to approximate the object. you can add primitives, move, rotate, and size them...

I still need to add ConvexHull support, as well as saving/loading, and a Body Properties dialog box.


Think you could add an 18 wheeler w/ a detachable trailer?

unfortunately my vehicle system is built on a single-chassis system, so a tractor-trailor combo isn't in the mix... would be really cool though :)
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby Julio Jerez » Wed Feb 02, 2005 9:11 am

Hey walaber I see you as many people are very excited about the xml files.
Can you tell me what is the benefic of that and why?

I am an old school programmer that they that never used XML
I had not been able to find any documentation explaining why XML are so wonderful,
I had not found a grammar explaining the file either.

All I have found a large number of incomplete and contradicting opinions as how they should be written and whey features they have should have.

As far as I see XMLs is just and text file decorated why a bunch of tags that make them humanly unreadable and slower to parce programmatically, and do not produce any kind of standardization as there is not grammar for them.

I am just trying to understand why is this so popular; and it is been used more and more.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby tomek » Wed Feb 02, 2005 9:40 am

it's example of one of my script files:

Code: Select all
<?xml version="1.0" standalone="no" ?>
<car>

    <model name="war1.tm" shadow="war1-cien.tm">
   <hull name="war1_karos" />
   <hull name="war1_fr" />
   <hull name="war1_bck" />
    </model>

    <wheels left_mesh_name="war1_kolo_l" right_mesh_name="war1_kolo_r"  shadow_box_adjustX=0.05  shadow_box_adjustY=0.1  >
   <wheel  mass=50.0   sshock=1.0   sspring=0.65   slen=0.15   origX=-0.677  origY=1.787    origZ=0.10 />
   <wheel  mass=50.0   sshock=1.0   sspring=0.65   slen=0.20   origX=-0.677  origY=-1.121   origZ=0.15 />
   <wheel  mass=50.0   sshock=1.0   sspring=0.65   slen=0.15   origX=0.677   origY=1.787    origZ=0.10 />
   <wheel  mass=50.0   sshock=1.0   sspring=0.65   slen=0.20   origX=0.677   origY=-1.121   origZ=0.15 />
    </wheels>   

    <mass weight=1200  gravity=-30   balance_gravity=-60 transferY=-0.25 transferZ=-0.35 inertia_scaleX=3.0 inertia_scaleY=3.0 inertia_scaleZ=0.5 />

    <low_damping linear=0.24  angularX=0.9 angularY=0.9 angularZ=1.5 />
    <high_damping linear=1.2  angularX=2.5 angularY=2.5 angularZ=1.5 />

    <low_level stiffness=0.9>
   <rear high_damping_frm=10 brake_friction=0.1 nobrake_friction=2.0 />
   <front high_damping_frm=10 brake_friction=2.0 nobrake_friction=1.5 />
   <chassis high_damping_frm=6 static_friction=1.0 kinetic_friction=0.1 softness=1.0 elasticity=0.425  />
    </low_level>

    <engine start_torque=2500 torque_linear_add=145 max_torque=6000 rear_torque=-2500 torque_damping=0.1 max_brake_torque=10000 handbrake_vel_threshold=3.0 burn_tires_coeff=1.5 burn_tire_max_vel=17.5 />

    <steering max_turn_angle=35 steer_turn_factor=6.0 steer_return_factor=6.0 />

    <moment_fix  vel_start=0.0  vel_end=60.0  scale=0.0003 />

    <gearbox>
   <gear vel=8 />
   <gear vel=15 />
   <gear vel=23 />
   <gear vel=35 />
   <gear vel=42 />
    </gearbox>

    <tire_dynamics lateral_coeff=0.01  lateral_speed=0.25  long_coeff=0.1  long_speed=0.8 />

    <sfx>
   <engine sample="war1_engine" base_freq=11000 freq_alfa=300 />
   <burnout front="burnout_front1" rear="burnout_rear1" />   
    </sfx>


    <rend steeringWheel="war1_kierownica" velPtr="war1_licznik_wskaz" alien="alien" />

</car>



XML it's just a tool, it's not powerful itself but very helpful in organizing
you data.
I'm using wonderfully simple TinyXML library that parses XML's
and allows to save back modified one.

Befor I was using my own text format, but why bother to invent syntax
when you have standarized one, handled by numerous libraries and editors.

Nice thing is that there are a lot o viewers and editors out there so you can give your users a chance to directly influence contents of your game -
these editors shows not the text but a structure

But of course XML is not a must - it's just a tool to save your time.
tomek
 
Posts: 102
Joined: Wed Jun 23, 2004 12:34 pm

PreviousNext

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 17 guests

cron