Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (491)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  (ODEJava) Ideas for car simulation?  (Read 1833 times)
0 Members and 1 Guest are viewing this topic.
Offline harryk

Senior Newbie




Stone golems rock!


« Posted 2005-06-15 08:17:42 »

Hi,

I'm about to try and create a car in ode with a good arcade feel to it, and I'm interested to hear if you guys have any good ideas. The goal is to create something with a nfs-underground feel, with suspension, gears and a handbrake.

What type of joints would you use, hinge2 with suspension or a slider joint with cfm and erp set or perhaps using raycasting? How about gears, using a AMotor or setting torques/velocities manually to the wheel bodies?
Spheres for wheels or capped cylinders? A simple box for chassis, or multiple geoms?

I've looked at the car example, but it is quite limited I think.

Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #1 - Posted 2005-06-15 11:18:45 »

Quote
What type of joints would you use, hinge2 with suspension or a slider joint with cfm and erp set or perhaps using raycasting? How about gears, using a AMotor or setting torques/velocities manually to the wheel bodies?
Spheres for wheels or capped cylinders? A simple box for chassis, or multiple geoms?
Hinge2 already has suspension CFM and ERM. No need for sliders and whatnot...

Capped Cylinder for wheels, however, spheres work fine and are cheaper IIRC. Chassis, you definetly need to have multiple bodies there. Because, sometimes if you hit a little 15 degree slope, the front bottom edge will hit it and if the car is moving fast enough, it will send the car flying! The hardest part will be keeping the car on the ground IMO because ODE doesn't let you set the centre of gravity for the chassis. The centre is always in the middle. This means that the car will be unstable during turning. There are definetly ways around it as you will probably find out when you create your car.

Hope that helps.
DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline harryk

Senior Newbie




Stone golems rock!


« Reply #2 - Posted 2005-06-15 11:54:53 »

thx for the reply,

are hinge2 as fast and as stable as sliders and "whatnot"? Wink
Chassis could perhaps be a box with capped cylinders as bumpers.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #3 - Posted 2005-06-15 12:24:28 »

Hinge2 are fast and stable from experience. There are obviously with any thing, stress tests to see where it break. But i definetly haven't go there with a car! (or multiple cars for that matter).

You are right about the chassis, but your going to have the graphics sometimes intersecting the terrain/road without any response...

In the Ode car example, there is something called "softCFM" which allows further penetration. Ive twiddled with the idea in my head for a while, but i never did any implementation to see how useful it is. Maybe this is what we need...maybe not...

Anyways, looking forward to seeing what you come up with!

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline harryk

Senior Newbie




Stone golems rock!


« Reply #4 - Posted 2005-06-29 20:15:28 »

well, I've modified the car example, but came across the "12.9. I've made a car, but the wheels don't stay on properly!"-problem as noted in the ODE-docs. The wheels are unstable at high speeds. I can't seem to solve this, using the method described in the docs. Anyone else had this problem?
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #5 - Posted 2005-06-29 20:27:21 »

How are you rotating the wheels? Are you doing "setDesiredVelocityAroundAxis2()" ? Or are you applying a torque to move that tyre? AMotor?

If your going down the velocity route, i suggest you consider another one. Direct velocity setting is not recommended as ODE is a force engine, thus it will calculate the force required for the wheel to spin at that velocity. Now imagine a tyre at 0 angular momentum and in the next step, its going 40, its not going to be stable...

Whats your ERP? Setting that to 1.0 will usually solve the joint violation in the next step. But again, if the joint has been severly violated, any quick change in state is not ideal for ODE. I am yet to come across this problem and when I do, i'l definetly chime in and post some code...

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline harryk

Senior Newbie




Stone golems rock!


« Reply #6 - Posted 2005-07-02 22:16:59 »

I'm setting the desired velocity parameter on the hinge2 (2-axis) as well as max force on that axis. It's my understanding that ODE will accel up to that velocity using the max force, so its not like I'm manually setting the velocity of the wheel. I've so far used the default ERP (0.8?). I'm playing around with FDir and slip parameters, but I haven't really done anything useful yet.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (29 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (39 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (36 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!