Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Perfect Newton Car Physics

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 16th May 2005 20:06
Well, maybe almost perfect
see attachment file.
use WASD and mouse for Camera,
use Arrow Keys for car and SPACE key for brakes.
use F12 key for debug info.
All the font images and Truck object is free to use, as long as you give me credits. I have few more cars to work with this if you need, just ask nicely and i may consider.
Aaaand i need comments on, if this car is perfect? or almost perfect?

Attachments

Login to view attachments
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 16th May 2005 21:25
By the way, i have to tell you this is not all about newton vehicle, indeed its about whole newton, most of the code, you dont need just to run the car around, however i shared the code as a whole so you can do more than cars.
even there are no REMS in the code, buoyancy, collisions are already set for immediate usage.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 16th May 2005 23:07 Edited at: 16th May 2005 23:50
attached is another car model (LandRover - PathFinder)
extract the files in the "carModels" directory.
use the following variables for driving code:


use the following for the creation code in levels.DBA:



EDIT:
Bug Fix;
Correct the below part in the Main.Dba at Sub NewtonVehicleDrive

Attachments

Login to view attachments
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th May 2005 04:02
Sorry man, but this doesn't work with DBC. We can't use globals...
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 17th May 2005 05:21
This is for DBPro, with Newton Physics wrapper 1.32 by walaber and kjelle.
http://walaber.com
Movey
19
Years of Service
User Offline
Joined: 13th Apr 2005
Location:
Posted: 17th May 2005 18:39
Car performs well.Very impressed. Have you tried it with advanced terrain?
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 17th May 2005 18:44 Edited at: 17th May 2005 18:45
no comments so far, and i need some to improve this ( i dont even have a driving licence )
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 17th May 2005 20:12
I'll take a look when I get home. The example that came with Newton was pretty hopeless and hard to control.

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.tk
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 17th May 2005 23:18
Sure it works with advanced terrain perfectly, its fun to jump around
Kjelle69
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 18th May 2005 00:19 Edited at: 18th May 2005 00:20
Very nice app !!
This can really be something good !

The demo that came with newton is not supposed to be driveable, rather show what is possible and trig your own imagination, just like Cucumber apparently did !

I guess you spend some time tuning the vehicle right ?



Great work !

-==The tame birds yearn, the wild ones dare to fly.==-
http://Mtec.hostname.nu
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 18th May 2005 00:24 Edited at: 18th May 2005 00:33
Thanks Kjelle69, you are the man
i found a way to make realistic cars the easy way, and yes Kjelle after wasting a full day tuning the car..and still needs some more as i said its 99% yet.
ill post many cars for you to try tonight.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 18th May 2005 01:35 Edited at: 18th May 2005 06:35
Here is a Bmw Serie6 to try out
Variables for driving code:

use the following for the creation code in levels.DBA:

Attachments

Login to view attachments
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 18th May 2005 06:34
Here is a Chevrolet Van to try out
Variables for driving code:


use the following for the creation code in levels.DBA:

Attachments

Login to view attachments
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 19th May 2005 01:51
Well, can anybody spare some web space to load new cars and example games made with this?
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 19th May 2005 07:59
I can host the web space if you can tell me what's wrong with this line:

72:NDB_NewtonUpdateTires nVehicleJoint

-This...is my boomstick!
ALPHA ZERO PRODUCTIONS
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 19th May 2005 11:04
it doesn't work 4 me.

Web designer for hire. $5-50 dollars per page
For more info please e-mail me.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 19th May 2005 17:21
CellBloc:
Because you dont have wrapper 1.32 (the newest one)
Alpha:
Because you dont have whether dbp 5.8 or newton wrapper 1.32
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 19th May 2005 20:16 Edited at: 19th May 2005 20:20
As i dont have a place to upload huge files, ill try to explain some little stuff here.

for first person camera without the need for ezrotate, the easiest way is editing the car mesh and adding a limb forexample a small box, to where the drivers eyes should be and adding the following code somewhere in the loop:
(you have to define gameCamera variable)


for making a speed-o-meter, load the attached image outside of the loop as follows:


and loop it as follows:


Comments or questions please.

Attachments

Login to view attachments
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 19th May 2005 23:55 Edited at: 20th May 2005 00:18
Yeap. Forgot I got a new Alienware notebook and out of all the things I didn't install, Newton was the one.

This really is a nice piece of work you got here. My only disappointment is that I cannot "roll" the truck, and I can tell you from personal experience that it is "quite" easy to do with a truck. I will fool around with the acceleration to see if I can get it to roll.

A promise is a promise. Please email me at quoteland [at] cellbloc [punto] com and I will email you the FTP info.

[EDIT]
Nevermind. I got it to roll. I did it the "Atlanta" way. Drive too fast, turn right hard, panic, turn left hard. Worked like a charm!

-This...is my boomstick!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 20th May 2005 00:55
increase the tires = 4 for the Ford and you will roll even without steering:p

try the Pathfinder, for race style
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 20th May 2005 01:15
Thanks!

I sent the info to the email you have displayed. Let me know if you got it.

-This...is my boomstick!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 23rd May 2005 22:37
cellbloc, ive uploaded the files into the account you gave me, but i couldnt find the adress for it
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 23rd May 2005 23:56 Edited at: 23rd May 2005 23:59
http://www.cellbloc.com/CuCuMBeR/

Case Sensitive!

Same goes for your filename. You had "Driver.rar" and in your HTML you had "driver.rar". I went ahead and fix it for you.

Ah, the magic of unix.....

-This...is my boomstick!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 24th May 2005 00:36 Edited at: 24th May 2005 00:40
okay then, you can find in the following zip a cool driving sort of thing with all cars available above.
http://www.cellbloc.com/CuCuMBeR/Drive.rar

press C key to cycle through cameras(doesnt work for all cars)
use arrow keys and space to control car
wasd keys and mouse for free camera
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 24th May 2005 04:36
CuCuMBer:

Can you post an example of the car(s) working with the Advanced Terrain plugin please?

-This...is my boomstick!
Baggers
19
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 24th May 2005 04:36
Thats brilliant !...a very impressive demo there, would be cool to see a more complete track but never-the-less very nice.
If you can gradualy build up a show case of cars and the assosiated stats it would make creating the driving element of a racing game a doddle !
Great work, keep it up.

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 24th May 2005 05:32
CellBloc:
Change level.dba as follows, you already have the media if you downloaded the last file;



Baggers: its already so easy to implement new cars, all you have to do is making your own 3d car, making the collision bod file and put them in the appropriate folder.
if you examine the code, you have to change the menu only then.

about the track, building tracks is easy with 3dmax, all you have to do is loft a spline through another spline, and then paint it.
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 24th May 2005 05:59 Edited at: 24th May 2005 06:07
Slient Crash. I will look into it.

(and yes I have the plugin installed because it works with the example that comes with the Advance Terrain)

[EDIT]
I take that back. It *ONLY* crashes on Land Rover (figures, first one I try). The other three work fine.

-This...is my boomstick!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 25th May 2005 01:12
Thats strange,does it give an error code?
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 25th May 2005 01:34
Nope, silent crash. I will try and use the "debugger" in a little bit and see if I can locate the issue.

-This...is my boomstick!
Professor
19
Years of Service
User Offline
Joined: 7th Oct 2004
Location: USA
Posted: 2nd Jun 2005 02:08
CuCuMBeR, Can you post a exe file for the ones (Including myself) that dont have dbpro?

Sorry if this has been brought up before i dont realy have time to read through all of this.. Sounds great though hope i can try it some time!


Prodigy Games : Comunity FPS : 3ds Artist : Uvw Mapper
http://forum.thegamecreators.com/?m=forum_view&t=41284&b=8
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 2nd Jun 2005 02:39
Unfortunately, i cant because im on 56k modem. But maybe some other nice guy would do it for you.
Professor
19
Years of Service
User Offline
Joined: 7th Oct 2004
Location: USA
Posted: 2nd Jun 2005 07:46
Oh ok . Hope fully... well thanks anyways


Prodigy Games : Comunity FPS : 3ds Artist : Uvw Mapper
http://forum.thegamecreators.com/?m=forum_view&t=41284&b=8
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 2nd Jun 2005 12:19
HAHAHAHA, I'm on a 14.4k!

-This...is my boomstick!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 5th Jun 2005 01:58
Sorry to bump this up, but i was wondering if anybody managed or atleast try to make a computer controlled car on this scene?
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 5th Jun 2005 02:34
I have one. It drives to waypoints.

-This...is my boomstick!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 5th Jun 2005 02:42
can i see it?
Olli
19
Years of Service
User Offline
Joined: 11th Mar 2005
Location: Finland
Posted: 16th Aug 2005 10:48
Have anyone tried to make a vehicle with more than 4 wheels? I'm trying to make a militar vehicle with 8 turning wheels (2 in the front turning the opposite way related to 2 in the back).

Any help would be more than welcome...

Olli
RaceGT
18
Years of Service
User Offline
Joined: 15th Aug 2005
Location:
Posted: 8th Sep 2005 12:37
Great demo, i found i could indeed roll the truck by driving it very far away and gathering speed, twitching to the right then hard left...I rolled it.

But I'm having a problem with the Newton wrapper, in that I just installed the DB 5.8 upgrade (on a fresh install of DB Pro), and the Newton plugin 1.32, both the first time I've installed either one, so they're both fresh. But each of the demos in Newton 1.32 crashes on exit, as well as this good driving demo here.

I'm very impressed with Newton and would like to get started (try) using it, and started looking at the demos, but I noticed each app using Newton crashes after quitting the program, causing an "illegal operation" dialog. I suspect it would be somewhere in the "NewtonDestroy" area since this might be global to all the apps, but can anyone confirm this? I can run the demos and see how they work fine, but each crashes after the program is ended.

I figured since Kjelle was involved on this thread he might be able to shed some light on the subject since I'm still waiting for approval at the Newton forums, and haven't been able to post about it yet.

I was very impressed with 'demo02' in the demos, the falling shapes and throwing them around. Very impressive! The way they interact could be exactly what I need in a program I'm developing, and I was hoping to start with demo02 and start tinkering towards my needs, but the crash on each exit made me have to pause. I still love it, just don't know if I'll be able to use it if it's just crashing all the time. If I can get it to work without crashing every time I'd be happy, I could probably use it as-is with what I've seen so far.

However, I would like to see this project go as far as to be the best physics implementation possible! It's already way more than I would have expected, I just need to get this kink worked out before I can start working with it.

http://www.geocities.com/crmnlelmnt/

Login to post a reply

Server time is: 2024-04-25 17:47:12
Your offset time is: 2024-04-25 17:47:12