Playing with car physic & 3DzzD Update 11

[quote]Yah, too easy to get too good at your own game!
[/quote]
hehe sure it is

[quote]Don’t change the frame rate, change the turn delta for steering
[/quote]
nono, this is just the logic rate this wont affect the framerate (framerate is not really controled in this version, it just run as fast as it can)

[quote]I’d love to play around with the source code - uh, where is it?
[/quote]
there is a link to the zip just below the applet

K, got it working!

In Car.java I changed

if(this.turnRight) this.turn+=0.01; // was: 0.03
if(this.speed<=0) this.speed=maxSpeed*0.03; // was: 0.1;

And it was much better, but still quite hard…

The physics is a little strange; even with my changes, if you try going round the course slowly (like you were driving a real car) you’ll see it behaves oddly, like there’s no friction with the road?

Also, when I go upside down I have to restart the applet! :-\

[quote]The physics is a little strange; even with my changes, if you try going round the course slowly (like you were driving a real car) you’ll see it behaves oddly, like there’s no friction with the road?
[/quote]
there are some kind of friction with road, it is the grip attribute : 1.0 means no grip ( try this it can be fun you will drive like on ice ) and lesser value mean more grip

with the initial setting the controls act like an old racing game on PSP but I cant remember its name… basically you only have to turn a lot at the start of the turn and release the direction key before the end of the turn (the car then should slowly stop turning)

seems that there can be some issue with blender 3ds exported model, so if you plan to use this software to modify some object or create new tracks you may have a look to the following thread and download the fixed 3ds loader (to rebuild the dzzd.jat) or the lastest build of the 3DzzD API jar using the new loader (both are available in the zipped file on the thread) http://forum.dzzd.net/viewtopic.php?f=11&t=358&start=15

I’ve just been tinkering with the physics to try and get a ‘nice’ driving experience and boy is it difficult! You get the acceleration feeling good & the cornering gets awkward, fix the cornering & the acceleration goes sluggish…
Good bit of software - ideal for testing these things!

thanks,

NB about the physics : the physic engine come from a very basic idea (kind of constrained sphere) but seems to magically respect a lot of physics law that I really never tought it will be able to, one interresting law it respect is the giroscopic effect of an object rotating in the air.

a new update, just for fun :), improved physics, still a cupple of bugs but now you should be able to get up when car is up side down


http://demo.dzzd.net/SIMCA1000/fond.jpg

Click here to start

( note that unfortunatly, this demo and further one sources code wont be release )

software version works great, smooth and fast. Enjoyable controls and do like the shine on the car. Could be turned into a cool little game with a bit more effort and some goals.

hardware version had problems running on my system, it starts but the car just flashes alot with missing polygons.

thanks for testing

I got other report of the bug you mentionned, seems that the hardware opengl states are not well handled and this make it work on some computer and not on other, i will investigate more on this

I really like it.
I tested the software version, and it works fast and smooth. The “game” reminds me of my old favorite game revolt. =)

Ran the hardware version. Extremely smooth even though I’m running it on my work laptop. I like the physics even though the car might be a bit too agile, there is no feel of weight in it.

thanks, I did not knew this game looks cool

I’ve made some test with a more realistic setting for physic (higher gravity center for the car and stronger gravity) but it was not that fun for example it is impossiple to reach the top of the ramp cause the car would fall back before reaching it, also you cannot turn at high speed because car would “roll over”, so the non-realistic physic is wanted to make the game more fun as with something more realistic it become fastly boring.

suprisingly I found that the hardware version did not ask anymore for a the certificat, no securoity popup , did you get one ??? if no this may be a big security hole in the lastest JVM release, but I guess I have this certificat somewhere in my computer… but let me know if you got a security popup please ?

I still got the security popup.

thanks, I manaed to finally get it back too :), this would have been very surprising anyway…

the hardware really cost no cpu (only 3% CPU usage on my computer)

Really fun, as usual!

These don’t seem to be working any more (both software and hardware).

[quote]java.lang.SecurityException: trusted loader attempted to load sandboxed resource from http://demo.dzzd.net/SIMCA1000/
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.check(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ParentCallback.access$1500(Unknown Source)
at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.checkResource(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[/quote]

hum no both works (with u19 u20 u21), but it depend what you answer to security popup :’(

I could remove all popup for software (and let only one for hardware) but unfotunatly lack free time to do this

Tried it on my old and tired laptop, runs smooth, works fine!
Impressive!

[quote]hum no both works (with u19 u20 u21), but it depend what you answer to security popup
[/quote]
Ah I wasn’t reading the popup correctly. I was pressing yes, for yes to start the applet :stuck_out_tongue:
But after you press yes you will never get the option to select again…

Edit: got it working, love the latest version.