Verlet Car Physics Engine Demo v2

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
STEVIE G
Baaa!
Baaa!
Posts: 211
Joined: Sun Oct 31, 2004 10:00 am 0

Verlet Car Physics Engine Demo v2

Post by STEVIE G »

http://www.steviegoodwin.plus.com/images/LB1.PNG
http://www.steviegoodwin.plus.com/images/LB2.PNG
http://www.steviegoodwin.plus.com/images/LB3.PNG

Just a quick update of my Verlet Physics engine. Quite a lot has changed but it’s now in a better structure so that I can actually make something out of it!!

CONTROLS
=========

SPACE = reset simulation
BACKSPACE = Swap between playground & racetrack
CURSORS = Throttle / Steering
F1 = Change Car
F2 = Change Camera
F2 = Reverse Camera View
ENTER = Special Action

JOYPAD ( Analogue only / Current setup is for PS2 but can be altered via JOYPAD.exe)

Left Stick = Steer
Right Stick = Throttle
Button1 = SELECT = Change Car
Button2 = TRIANGLE = Change Camera
Button3 = R2 = Reverse Camera View
Button4 = R1 = Special Action ( Tank fires / cop car siren / knightrider turbo )

CONFIGURATION ( see CONFIG folder )
=================================

JOYPAD.exe
Change sticks / buttons / deadspots etc..

SETUP.cfg
Can change screen settings / shadows onoff / number of vehicles / no of objects / CameraRange multiplier / Players ( 1 or 2 ).

CHANGES
========

Train removed ( temporarily ) until I get it working better. Sorry :(
Knightrider car
Transit Van
Slight update on overall vehicle graphics
Barrier Object

New Camera … very similar to GFA’s. Works better IMHO
Simple Shadow system ( can be turned off in Setup.cfg )
Tiling system demo .. still in the works ( graphics unfinished too ) but you get the general idea of how I see it working.

KNOWN ISSUES
=============

Shadows are naff but serve their purpose
Sometimes cars can’t selfright … fix in the works ( just press space )

Hope you like. Feedback welcome and please quote FPS if you can be arsed.

Cheers
Stevie

http://www.steviegoodwin.plus.com/Engine_Test2.zip

Oh, and for a bit of fun, test your machine to it’s limit by increasing the vehicles in the setup.cfg file … I can get 100 + 12 objects running at 30fps :)))
Last edited by STEVIE G on Sat Feb 25, 2006 2:21 pm 0, edited 1 time in total.
User avatar
Dvorak
Baaaaaa!
Baaaaaa!
Posts: 4560
Joined: Wed May 08, 2002 7:37 am 0
Yahoo Messenger: d3dxquaternion
Location: Germany

Post by Dvorak »

Man, that's fun, especially the tank with special action... :)
Physics are very slick. Love it.

On this machine here I touch the 30 fps mark with 75 cars.
That would be:
CPU: AMD Sempron 2400+
RAM: 786 MB
GFX: GeForce 6600 GT
>take off sunglasses
Seamen and fishermen alike swear to have heard voices in the rising tide. Inhuman screams, some of them say.
User avatar
rowan
Baaaaaaa!
Baaaaaaa!
Posts: 7965
Joined: Tue Nov 25, 2003 11:53 pm 0
Location: Notts.

Post by rowan »

Nice job :)

Getting mostly 40fps, XP2600, 9800pro, 75 cars, 12 objects, any res, 32bit.
Getting 56-60fps with 50 cars, 12 objects.
matt
Sheepie Whore
Sheepie Whore
Posts: 14826
Joined: Mon Apr 22, 2002 4:07 pm 0
XBL Gamertag: gingerbeardman
PSN: wirehang
Location: here && there
Contact:

Post by matt »

Excellent work Stevie
User avatar
failrate
Baaaaaa!
Baaaaaa!
Posts: 2354
Joined: Sun May 23, 2004 6:54 am 0
Location: Sandy Eggo
Contact:

Post by failrate »

Mad and Beautiful!

I just ran it with defaults, but even on my goddamned Dell Dimension (which has a shite built-in gfx card), it ran very well.

There's a real game in there, too. If you kept the art style, it could be an excellent stealth game in the sense that a dad could buy it for his kid and play it, too, without being in edutainment hell.

That said, steering is a bit sluggish and difficult, but after a while, I got used to the controls and was able to steer much better.

:D:D:D
User avatar
PaulCunningham
Baaaaa!
Baaaaa!
Posts: 1218
Joined: Sun Jan 18, 2004 11:47 pm 0
Location: Walsall, England
Contact:

Post by PaulCunningham »

That's ace.

Love the art style, keep it!

What's it modelled with? Is it easy enough to change the track?

Athlon 3000, 6600 GT, 1 Gig Ram, XP SP2 - 60 FPS with defaults.
Cheers,
Paul Cunningham
Pumpkin Games
STEVIE G
Baaa!
Baaa!
Posts: 211
Joined: Sun Oct 31, 2004 10:00 am 0

Post by STEVIE G »

What's it modelled with? Is it easy enough to change the track?
I modelled everything in code with primitives and various culling / welding methods. Not really any good at modelling and never tried using any apps.

The track is easily changed ... it's just a list of control points and bezier interpolation to create the mesh.

Appreciate the comments guys.

Cheers
Stevie
User avatar
sdetoni
Baaaaa!
Baaaaa!
Posts: 1368
Joined: Tue Jun 18, 2002 4:14 am 0
Location: New Sheepland

Post by sdetoni »

Hey your demo is way cool, I like the knight rider car :-) had to laugh at that.

S.
Trufun101
Baa!
Baa!
Posts: 40
Joined: Mon Sep 19, 2005 6:44 am 0
Contact:

Post by Trufun101 »

Great stuff. I lol'd on the Knight Rider car. :lol:

It runs about 30 fps with 128 vehicles and 12 objects. For fun I cranked it up to 256 vehicles, and got 14 fps.

My machine:
Athlon XP 3200+
1 Gig Ram
Radeon 9600
-Chris B.
Post Reply