Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  3D Vehicle Dynamics Engine Demo (New Version)  (Read 10559 times)
0 Members and 1 Guest are viewing this topic.
Offline gholdys

Junior Member


Projects: 1



« Posted 2008-12-20 11:44:04 »

Hello all

I have just joined JavaGaming.org, so I'll briefly introduce myself. My name is Grzegorz Holdys. I run a small company called Insight Machines, that creates simulation games mainly for education and training purposes. Some time ago I started developing a physics engine for 3D car games. The engine is not complete, but in my opinion it works well enough to show it to the World :-). You can find the demo here. It requires Java 6.0 to work. Please take a look at it a tell me what you think. I have tested the demo on three different machines running Windows XP, Linux and Windows Vista, so it should work, but if it doesn't please let me know.

Cheers,
Grzegorz

P.S
I include a screenshot:

Offline irreversible_kev

Junior Member





« Reply #1 - Posted 2008-12-20 14:07:30 »

Very very cool - worked perfectly.

However the FPS is alot lower than I would like at 21FPS on Intel Q6600, Geforce 8800GTS, WindowsXP. You seem to be using JOGL so is it the physics slowing it down?

Would love to see a game made out of this.
Offline gholdys

Junior Member


Projects: 1



« Reply #2 - Posted 2008-12-20 14:27:37 »

However the FPS is alot lower than I would like at 21FPS on Intel Q6600, Geforce 8800GTS, WindowsXP. You seem to be using JOGL so is it the physics slowing it down?

Can you check your CPU usage? The demo does not use continues rendering - it uses a special Animator thing from JOGL to keep FPS at around 25. On Linux, this is 25, but on WindowsXP it's a little less (thanks to the precision of the system timer on Windows)

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline irreversible_kev

Junior Member





« Reply #3 - Posted 2008-12-20 14:42:48 »

it uses a special Animator thing from JOGL to keep FPS at around 25.

Oh that explains it Grin

It seems to run at below 2% CPU when driving around and about 6% when I push a cylinder around by driving into it continuously. I managed to get it to 11% when trying to hit all 4 cylinders at the same time.
Offline gholdys

Junior Member


Projects: 1



« Reply #4 - Posted 2008-12-20 14:54:13 »

I have increased the target FPS to 30, so it should run a little smoother now. I can't increase it much more, because I won't be able to play Tongue - I have a 2.1GHz AthlonX2 CPU and an integrated GeForce 6150.

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #5 - Posted 2008-12-20 15:33:20 »

This is a very very cool demo! Smiley I managed to get stuck inside a cylinder at one point tho!

Really great car physics.

Kev

Offline bienator

Senior Member




OutOfCoffeeException


« Reply #6 - Posted 2008-12-20 15:37:10 »

thats really cool gholdys!

FPSAnimatuor usually does not produce smooth framerates try to switch to the normal Animator and enable vsynch (gl.setSwapInterval(1)). This should produce much better results on most systems (except old intel cards).

...and implement a handbrake  Grin

Offline gholdys

Junior Member


Projects: 1



« Reply #7 - Posted 2008-12-20 15:43:11 »

This is a very very cool demo! Smiley I managed to get stuck inside a cylinder at one point tho!

Really great car physics.

Kev

The collision response code does need some work yet  Undecided

Offline gholdys

Junior Member


Projects: 1



« Reply #8 - Posted 2008-12-20 15:46:46 »

FPSAnimatuor usually does not produce smooth framerates try to switch to the normal Animator and enable vsynch (gl.setSwapInterval(1)). This should produce much better results on most systems (except old intel cards).

I will try to implement this ASAP. Thanks for the hint bienator!

Offline Xyle
« Reply #9 - Posted 2008-12-21 08:47:50 »

Ok, that was very nice. Thats one of the best demos I've seen so far. I am very impressed. I've been working with Visual Basic, DarkBasic, Blitz3d and recently went to Java due to deployment issues. I have looked at alot demos and purchased a few physics engines and I will say that this worked a heck of alot smoother that the engines I purchased. Thank you for the view.


Well done.

Life is just a game, learn to play!
------------------------------------------
╬-YellzBellz Games!-╬ Cheesy
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gholdys

Junior Member


Projects: 1



« Reply #10 - Posted 2008-12-21 10:22:56 »

Ok, that was very nice. Thats one of the best demos I've seen so far. I am very impressed. I've been working with Visual Basic, DarkBasic, Blitz3d and recently went to Java due to deployment issues. I have looked at alot demos and purchased a few physics engines and I will say that this worked a heck of alot smoother that the engines I purchased. Thank you for the view.


Well done.

Well then. Next time, you will consider buying a physics engine for a Java game, leave me a note Wink

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #11 - Posted 2008-12-21 11:03:18 »

Any chance you can get this demo into Java 1.5? Many of us Apple users are still without Java 6 because Steve Jobs's turtleneck is too tight.

See my work:
OTC Software
Offline gholdys

Junior Member


Projects: 1



« Reply #12 - Posted 2008-12-21 11:09:46 »

Any chance you can get this demo into Java 1.5? Many of us Apple users are still without Java 6 because Steve Jobs's turtleneck is too tight.

Certainly. I'll get on it right away.

Offline gouessej
« Reply #13 - Posted 2008-12-21 12:01:24 »

Excellent!!! It works fine under Linux. I like this demo very much. You have made a very good job. I think I will quote your demo Cheesy But why is the frame rate so low on my machine? Only 11 FPS. It is not very important as it is quite playable. I'm under Mandriva Linux 2007, AMD Sempron 2600+, ATI Radeon 9250 Pro, open source driver. Other 3D Java games using JOGL rarely get a frame rate lower than 20 FPS on my machine. What do you use for your physics engine?

Offline gholdys

Junior Member


Projects: 1



« Reply #14 - Posted 2008-12-21 12:10:41 »

Excellent!!! It works fine under Linux. I like this demo very much. You have made a very good job. I think I will quote your demo Cheesy But why is the frame rate so low on my machine? Only 11 FPS. It is not very important as it is quite playable. I'm under Mandriva Linux 2007, AMD Sempron 2600+, ATI Radeon 9250 Pro, open source driver. Other 3D Java games using JOGL rarely get a frame rate lower than 20 FPS on my machine. What do you use for your physics engine?

I have written the physics engine myself basing on the Marco Monster's tutorial of vehicle dynamics. I've also used some equations from "Physics for game developers" by David M. Bourg.
I'm a little disappointed that you get only 11 FPS. Can you check your CPU usage?

Offline gouessej
« Reply #15 - Posted 2008-12-21 12:24:20 »

I have written the physics engine myself basing on the Marco Monster's tutorial of vehicle dynamics. I've also used some equations from "Physics for game developers" by David M. Bourg.
I'm a little disappointed that you get only 11 FPS. Can you check your CPU usage?
You use almost 100% of my CPU. Do you use VBO? How do you draw your car? Do you use NURBS?

Offline gholdys

Junior Member


Projects: 1



« Reply #16 - Posted 2008-12-21 17:12:30 »

You use almost 100% of my CPU. Do you use VBO? How do you draw your car? Do you use NURBS?

I use the good old display lists, no VBO. The reason why rendering takes so much time, is that the car model is quite detailed. Too detailed for this kind of demo, but that was the only model I could use.
Nevertheless I have found a small bug that has quite significantly increased the CPU load during rendering. I have removed it, so the demo should work a little faster now.


Offline irreversible_kev

Junior Member





« Reply #17 - Posted 2008-12-21 20:07:54 »

It's still on 21FPS for me on WindowsXP. I think im playing the latest version as the shape of the grey block has changed.

It's a shame that the FPS is locked to the same on every computer regardless of it's power. There has to be a way of letting the engine work out what is acceptable in terms of balancing physics and rendering.

Just out of interest, is the rendering's FPS independant of the physics' FPS?

Can't wait to see additions&improvements  Grin
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #18 - Posted 2008-12-21 21:08:57 »

Certainly. I'll get on it right away.
Hey gholdys -

I just tried it out on my Mac with 1.5 and I get:
Quote
java.lang.NoSuchMethodError: java.util.Arrays.copyOf()

I think that's a 1.6 only method.

See my work:
OTC Software
Offline gholdys

Junior Member


Projects: 1



« Reply #19 - Posted 2008-12-21 22:35:11 »

I guess I have to get myself a JRE 1.5. Darn it  Tongue

Offline Corvinex

Senior Member


Projects: 1


Work Hard, Go Pro.


« Reply #20 - Posted 2008-12-21 23:01:14 »

Not really, you just put "-target 1.5" on the compile line as a parameter.

"Do what you love and you'll never work a day in your life."
Android: Pac-Ball
Web Applet: Virus Effect
Old Games
Offline gouessej
« Reply #21 - Posted 2008-12-21 23:24:19 »

What have you done??? It is worse!!! 5 FPS and it is flickering!!

Offline phu004

JGO Coder


Medals: 4
Projects: 9
Exp: 10 years


NoSuchPersonException


« Reply #22 - Posted 2008-12-22 01:44:39 »

works fine here, nice physics.  I got ~16 fps on my intel E8400 with integrated graphic card.
It seems you are performing some really accurate shadow mapping here,  it might be the reason
that i got such low frame rate.
Offline Ranger
« Reply #23 - Posted 2008-12-22 02:12:10 »

What have you done??? It is worse!!! 5 FPS and it is flickering!!

Mine too.  Java 1.6.  Vista.  Dell Inspiron 9400.  Core Duo 2Ghz. GeForce 9700 GS.
Offline gholdys

Junior Member


Projects: 1



« Reply #24 - Posted 2008-12-22 08:46:06 »

Ooups! Sorry guys. I'll fix it right away.

Offline CommanderKeith
« Reply #25 - Posted 2008-12-22 08:57:06 »

Wow that worked well, ran at 21 fps even on this machine which has an intel integrated video card.

The physics is very good. nice job  Cool

Offline gholdys

Junior Member


Projects: 1



« Reply #26 - Posted 2008-12-22 09:49:49 »

OK. I have made a few changes.

1. I have recompiled the code to work with JRE 1.5 using JDK 1.5. Simply changing "target" to 1.5 is not enough. This does not check for API compatibility, but only marks the code as compatible with Java 1.5

2. I have removed the FPS limit, so it should run smoother on Windows.

3. I have included a simple profiler type of thing. When you run the demo with the console open and press ESC to restart, you will see a printout in the console similar to the one below. This is an analysis of an average simulation time step, that tells you how much time was required to complete each phase of a time step. There are four phases: physics, shapes, shadows and overlay. There is also an entry for the whole time step. The "Potential FPS" value means, that if some phase were processed alone (without other phases) it should reach such a frame-rate.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
Time measurement "JOGLRenderingManager: physics"
Minimum time = 0.93ms
Maximum time = 26.69ms
Average time = 2.18ms
Potential FPS = 458.60

Time measurement "JOGLRenderingManager: shadows"
Minimum time = 0.93ms
Maximum time = 9.10ms
Average time = 1.24ms
Potential FPS = 804.70

Time measurement "JOGLRenderingManager: shapes"
Minimum time = 2.35ms
Maximum time = 11.25ms
Average time = 2.87ms
Potential FPS = 348.61

Time measurement "JOGLRenderingManager: time step"
Minimum time = 4.76ms
Maximum time = 190.89ms
Average time = 9.34ms
Potential FPS = 107.08

Time measurement "JOGLRenderingManager: overlay"
Minimum time = 0.17ms
Maximum time = 169.41ms
Average time = 2.75ms
Potential FPS = 363.73

Offline irreversible_kev

Junior Member





« Reply #27 - Posted 2008-12-22 13:45:31 »

Awesome - its so much smoother @ 390FPS+

It seems to be using about 90% of one core and 60% of another core for an overall CPU usage of about 36% over 4 cores.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
Time measurement "JOGLRenderingManager: physics"
Minimum time = 0.20ms
Maximum time = 10.40ms
Average time = 0.27ms
Potential FPS = 3681.57

Time measurement "JOGLRenderingManager: shapes"
Minimum time = 0.13ms
Maximum time = 2.79ms
Average time = 0.16ms
Potential FPS = 6249.57

Time measurement "JOGLRenderingManager: overlay"
Minimum time = 0.01ms
Maximum time = 87.81ms
Average time = 0.30ms
Potential FPS = 3367.42

Time measurement "JOGLRenderingManager: time step"
Minimum time = 1.11ms
Maximum time = 96.48ms
Average time = 1.67ms
Potential FPS = 598.87

Time measurement "JOGLRenderingManager: shadows"
Minimum time = 0.27ms
Maximum time = 29.04ms
Average time = 1.06ms
Potential FPS = 941.99

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #28 - Posted 2008-12-22 19:21:26 »

Works great now on my Mac! Very cool demo. I was getting 60 fps and using 50% of my CPU. So, totally acceptable.

See my work:
OTC Software
Offline gholdys

Junior Member


Projects: 1



« Reply #29 - Posted 2008-12-22 19:26:52 »

Works great now on my Mac! Very cool demo. I was getting 60 fps and using 50% of my CPU. So, totally acceptable.

Glad to hear that.
Cheers!

Pages: [1] 2
  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.

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (20 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (57 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!