Cygnus Car Engine Alpha download

Community Forums/Showcase/Cygnus Car Engine Alpha download

Damien Sturdy(Posted 2005) [#1]
[edit]
updated file GMT 4:24pm; 21/2/05.
You only need to download if your file is older than 2 days :)

Hello people! Ive been promising alot for a while now with no action.

Well, its been very slow progress (ive not worked on it since just after the last topic i created.) I played with it again a bit earlier and thought i would let out a VERY early ALPHA version. Its fun to play, and thats about it. Roof collision is disabled (caused problems with repositioning because of my c***py modeling skills and bad track design!)
Realtime damage is also disabled as it did cause jamming up that i wasnt aware was so bad on my LCD screen. On this CRT its quite a nasty jolt.....

So yeah, Its buggy for now, But let me know what you think so far...!

By the way, The track included isnt the one in the screenshot either. The track was buggy (not badly modeled but with a blitz update, it went see-through and i couldnt fix it even with vertex alpha command stuff :/)
http://damiensturdy.pwp.blueyonder.co.uk/IDr%20release.zip











Jeremy Alessi(Posted 2005) [#2]
Very nice ... it appears ODE has come along way. The cars are a bit sluggish and handle like SUV's but it appears to be very realistic and the collisions are awesome! Which ODE wrapper are you using ... is it the recent one listed on the homepage?


Dazman(Posted 2005) [#3]
Looking very promising, nice work.


Damien Sturdy(Posted 2005) [#4]
It is the original one (this is an old project, of about a year now.)
I began rewriting using Arkons wrapper but it caused problems with joltyness

I will be using Jedives next as it is showing way more promising features.


The cars are a bit sluggish and handle like SUV's



Does it seem to be running slow? i should add an FPS counter in there.... i slowed it down before zipping it up, ran perfect here, but then, my xp2600 does rate above an xp3200 using Sisoft at the moment :/

Il do that tomorow if i get 5 minutes. If youre enjoying playing, Try and get it to crash ;) Remember that the original ODE had problems. 99.9% of the time ive overcome it and the worst youl get is the computer repositioning your car :)

ALso, how are the "realtime damage" collisions working, do you get much of a slowdown with them? I can normally have 12 cars but ive had it at 6 for compatibility.


Jeremy Alessi(Posted 2005) [#5]
I turned them on and it seemed to be ok ... I'm getting about 20fps here on a 1GHz Athlon, 512MB, and Radeon 9600XT card.


Erroneouss(Posted 2005) [#6]
Pretty cool!


AdrianT(Posted 2005) [#7]
Hey Cygnus, thats pretty cool I get a constant 43 - 45 FPS on my athlon 1200, Geforce 3 combo.

Needs a bit more friction on the tires really (depending on what you intended it to drive like) I think, but overall its good and the intercollision between the cars and the sliding is good. Something you can't really do well in blitz allthough Fredborg did a good job in his little RC racer style demo he posted a while ago.


Matty(Posted 2005) [#8]
I like playing it, quite fun. I love the way the wheels move around and the way the car spins out on the grass sometimes. Doubt it would run on my system but on my housemate's it runs at about 40 FPS - Intel P4 3.0 Ghz, Geforce 6600 GT AGP.

At one point when the car flipped over and the wheels kept turning it kind of slid along the ground backwards as if the wheels were still moving the car.

Edit : I tried it on my own system - very easy to play when it runs at 5-7 frames per second. (500 Mhz AMD K-6, Geforce2MX, 256MB Ram)


RiverRatt(Posted 2005) [#9]
Nice game. I don't tend to like racing games but I like the way this lets you smash other cars. Thats fun.
Only problem is 16 fps.


Damien Sturdy(Posted 2005) [#10]
Right.. As i suspected, Im getting an FPS problem... This is a right shame. On my system i had to include a "vwait" command to stop it being stupidly fast. I will add a manual timer in now instead and reupload to see what it feels like

By the way, you can select different cars in the INI. Dont change the class, but change the car. the range is 0-7 but only 3 work in this alpha (to cut size down.)


Th physics are pretty much what i was looking for. if its running full speed you will notice it changes through gears reqly quite fast. (Edit; 35FPS)


Anyway, i will get back to coding it now. Update later!


AdrianT(Posted 2005) [#11]
seems pretty fast on my 4 year old system. Look forward to seeing your update :)


Damien Sturdy(Posted 2005) [#12]
I just TRIPPLED the framerate. Must have been a bug in my render function somewhere!

i will upload shortly.

Has anyone got a better track model I could borrow for this? I feel the level models are letting it down :/


xlsior(Posted 2005) [#13]
Getting about 39 FPS on Athlon 2800+, Radeon 9600Pro.

The controls seem a little overly sensitive though -- a very short tap on one of the side cursor keys is sometimes enough to go straight in a 90 degree skid.

Also noticed that when the card lands on its roof, half the car consistently disappears into the road or other objects.

looks nice though!


Damien Sturdy(Posted 2005) [#14]

Also noticed that when the card lands on its roof, half the car consistently disappears into the road or other objects.



Yer.. i said above, ive had to disable roof collisions as the collision object gets trapped under bridges leaving the car suspended in the air.. (i need some better tracks.)


Also, the controls via keyboard are primitive, i realy should smooth them a bit :)

[edit]

I hate nvidia

The Text command with a single line is enough to drop my framerate from 60 to 30.. no, im not framesyncing.....


Oddball(Posted 2005) [#15]
I hate nvidia

The Text command with a single line is enough to drop my framerate from 60 to 30.. no, im not framesyncing.....

I had the same problem with the text command and my nvidia card. Try downloading the latest drivers. I have no slowdown with the newer drivers.


Craig H. Nisbet(Posted 2005) [#16]
very cool!


Damien Sturdy(Posted 2005) [#17]

I have no slowdown with the newer drivers.



I'm using the newest drivers..... :S


AdrianT(Posted 2005) [#18]
I emailed you about tracks and stuff Cygnus, Might be interested in helping you out there. Didn't get much sleep in the end :(

I emailed your proper account from our previous correspondence, don't know if its current, not the hotmail one in your profile


Dirk Krause(Posted 2005) [#19]
Cool ...


Foppy(Posted 2005) [#20]
Very nice... I like the looks of the cars (with their big wheels) and the engine sounds too.


Damien Sturdy(Posted 2005) [#21]
Damn you Foppy. Thank Psychicparrot for those! :D

I just uploaded a new version.. Better AI, and i used some code i got a while back for generating the track. Sorry, i forgot your name! Drop a note here let me know!

When i say better AI, its better as in it makes its own way round the track without falling off, BUT... they try to avoid each other so they actually do fall off. I updated this but havent uploaded. Enjoy whats here for now though!

Also, post FPS. There should be a huge improvement.!


Picklesworth(Posted 2005) [#22]
Very nice.
The car feels a bit light - and the spinning when I stop is a bit over the top, but it's very nice!


AdrianT(Posted 2005) [#23]
yeah I get a steady 70 - 97fps on mine :) as opposed to about 40 before :)


Jeremy Alessi(Posted 2005) [#24]
Very nice! It controls better and I'm getting between 50 - 70 fps with the damage on. The crashes are the best part ... just great inter vehicle collisions ... makes me want to ditch my own custom collision set up and use ODE. This is the first demo I've seen that makes me feel that way.


Picklesworth(Posted 2005) [#25]
Oh right,
I have about 120-150 fps :)
(minor slowdowns with damage on)

It seems that when the car is flipped it will go into the ground except for its wheels.


Red Ocktober(Posted 2005) [#26]
great fun... screachin' all around the track...

25fps on a radeon9200 1.7gHz machine...

--Mike


Damien Sturdy(Posted 2005) [#27]
@Picklesworth..... Read the original post about the roof going into the ground ;)


so were still getting slowdown, Red... did you download the newest version from yesterday? 25fps seems well slow.....


Foppy(Posted 2005) [#28]
>> Damn you Foppy. Thank Psychicparrot for those! :D

Thanks, Psychicparrot! ;)

Of course I also like the driving itself, and the car wobbling physics!

One point though, maybe it has been made before, but... if I steer even just a little bit, the front wheels start to skid (and there's some smoke). Or is this because I use the keyboard and pressing the key means steering to the full extend at once, instead of smooth analog steering as could be achieved with the mouse.


Damien Sturdy(Posted 2005) [#29]
The new ones steering is better. the original one had OTT keyboard controls :) just redownload the zip if you didnt already. Thanks for your input :D


Red Ocktober(Posted 2005) [#30]
yes... the steering is improved in the latest version... and the jam cars seem a lil more aggressive... they seem to purposely slam you...

but it's now easier to fight back with the improved steering response, and send them off the road...

fps has about doubled... 51 to 69 fps on the same machine... 80 and higher on the 2.5GHz GForce5200fx...

--Mike


Damien Sturdy(Posted 2005) [#31]
I do quite like my AI. its not perfect, but if you want realism, you dont want perfect :)
Glad to see the fps has improved. about a 20% speed increase was found just by cutting out the text command...:S
Also glad you lke the new steernig. Poor ol keyboard control got a bit neglected once i got my dual analogue pad!


BlitzSupport(Posted 2005) [#32]
The last version was cool, but this one is miles better! And you can do the Knight Rider turn -- the true test of a cool car engine!


Damien Sturdy(Posted 2005) [#33]
cool.! Looks like a few minor tweaks goes a long way!!!
...Okay, so i did sit at my computer all day saturday doing it....!


Zmatrix(Posted 2005) [#34]
120-150 fps with damage on
good stuff :)

Geforce 5900/128meg
Athlon 2400+ 512 meg


Zmatrix


Damien Sturdy(Posted 2005) [#35]
Zmatrix... WOAH. that just proves that the gfx cards are slowing things down :/. It's actually run on an athlon 1200 at 90fps too...!


VIP3R(Posted 2005) [#36]
Looks very promising Cygnus, good work so far :)

I got 174 fps (damage on) here.


Chad(Posted 2005) [#37]
Hey Cygnus,

Later in production are you going to release the source? I've been looking at some physics for cars and stuff, but I like yours the best. Though I haven't tried Vorderman's demo yet..

Keep up the good work either way.


Picklesworth(Posted 2005) [#38]
The damage system may need a bit of work btw, though it may already be adjustable and it's just turned down because this is a physics demo:

Idea: Vertex damage weights :) Each car with damage enabled could possibly have an array containing a value for each vertice which is how easily affected it is by damage. This way, parts could be harder to damage, which may make a realistic effect.


Damien Sturdy(Posted 2005) [#39]
Mr Piclesworth; Your idea of Vertex Damage weights Is excelent. I already half-coded such a system,so it is disabled.. There is a max damage to each vertice too. This isnt disabled and you cant crush your car up into a ball :)


Chad, This project just got Comercial interest.

I will write a new simple car physics "engine" though perhaps with JV ODE so it would be faster and more stable. and to that i will release source.

I wont be adding gears and such... just the simple car handling stuff.


Simple car physics with commands such as
car=createcar(bodymesh,wheelxwidth,wheelywidth...)
Updatecar(car,steerx,break,handbreak)


And leaving it down to you to do the controls, I wont mind releasing free.

So, people.. What do i need to do next? Any suggestions are quite likely to find it to the free version said above.


Also, Chad; To get handling similar to what i have, use the ORIGINAL ODE, have only 4-8 cars (stability issues) and instead of using forces to steer wheels, directly manipulate them using the lo and hi parameters of "setcarwheeljointparameters" or whatsonamed function. This gave me a huge stability increase and handlings hundreds of times better than previous ODE demo's.
That is, if you dnot want to wait a couple of months for me to get the new one started.


I will start planning in my spare time and post about whats required in such an engine. Something built with the community in mind would help more of us here :) Just bare in mind it could be a while.


Vorderman(Posted 2005) [#40]

directly manipulate them using the lo and hi parameters



that's a novel approach - I never even thought to try that. Does it solve the ODE rear-wheel-steering bug?


Damien Sturdy(Posted 2005) [#41]

Does it solve the ODE rear-wheel-steering bug?



no, but you can cut it down by having small ode steps but iterate them... like,

instead of a single "Ode_update(.2)" do two "ode_update(.1)"

All attempts to fix the rear wheel steering issue other than iterating ODE failed. The best bet was always to keep ode values smaller by only updating it in smaller amounts but more times.
And because you update in small amounts and force the steering, you dont get any odd steering happening or rear end sliding without skid. Its a much better simulation for it.

The down side is that if you change the iterations, you have to multiply weight and modify suspention values. Personally, i just found the perfect value and designed my cars to that.


Chad(Posted 2005) [#42]
I tried using your code that you listed above for me, but I want something more..

Maybe I'm asking in the wrong place, or whatever, but if you've played Need For Speed Underground, 1 or 2, then when they're doing drag races, thats kind of what I want to do. I want an rpm meter that you have to "shift" within a certain RPM range to be able to acellerate your car faster.

I currently just want this and simple AI just to have something to race, and then expand with it later. But having no previous knowledge of physics or all this "car racing stuff" idk what I'm doing..

Could you help, or point me in some direction to find a solution to my problem?

Thanks,
Chad


Damien Sturdy(Posted 2005) [#43]
The shif thing is a simple maths solution:
Note; These will not be true simulation, just whats in my code. It works quite well. You may have to tweak this code.

divisor#=6000
Actual_RPM=7000
Best_RPM=8000
extra_torque=abs(best_rpm-actual_rpm)/divisor

then, just add Extra_torque to your base torque for each wheel necesary.
Using this technique, you can tell where your optimum "torque" will be and therefore get your best RPM to change at.

please, not this is not a true simulation , so no psts saying how its wrong :P

To get rpm, its trial and error. Get the speed of rotation of the wheels that are being powered by the engine. :)


Vorderman(Posted 2005) [#44]
check out Racer's technical pages for loads of physics and car related info -
http://www.racer.nl/links.htm
and
http://www.racer.nl/prgusers.htm


Damien Sturdy(Posted 2005) [#45]
There was that "Masked Coder" guy too. he knew lots and even had a racer started using pure blitz.... :/ wonder who he is....where he went....


Vorderman(Posted 2005) [#46]
...where he got his code from.... >:( thieving git...


Damien Sturdy(Posted 2005) [#47]
O.O you what? what did he do? man that sucks... Never realised!!!!!


Vorderman(Posted 2005) [#48]
Well (deep breath), I posted a conversion of Marco Monster's car physics code in the archives here not too long after B3D was released (it's still there, right near the bottom) - soon after, a Darkbasic car physics program turns up, claiming to be the Masked Coder's conversion of Marco's code.

Checking through it, I noticed that every single variable name and in fact the entire program have been copied from my program - no attempt to conceal it at all - and if you read my code, you'll notice some pretty long-winded variable names that you're not likely to duplicate by accident.

I don't mind my code being copied (which is why I posted it), but to claim it as your own is pretty low. Still, I'm not releasing my current car physics code so let's see if he can ever produce any improvements on 'his' code :)


Damien Sturdy(Posted 2005) [#49]
Man dude im sorry to hear someone sank that low. I suppose his name fits then.. masked "coder".... :/

On another note,that code formed the base of the original quad game until i lost flow and started with my own stuff trying to do it myself... Excelent work :/


Clarks(Posted 2005) [#50]

Still, I'm not releasing my current car physics code so let's see if he can ever produce any improvements on 'his' code :)



Got a point there but actually its quite easy to make improvements on car physics. Once you understand rigid body dynamics, you can do a lot. I played your demo and i have to say it has potential. Did you use vector cross products for the calculation torque around the cars axis. If you didnt then you really need to consider using as it can open up many new possiblies. Bottom line is that a physics engine is the best way to go but im not even going to get started with the current physics engines available for use with blitz because they all have problems.


Damien Sturdy(Posted 2005) [#51]
Thanks Clarks... but.

Bottom line is that a physics engine is the best way to go but im not even going to get started with the current physics engines available for use with blitz because they all have problems.



Didnt you see the ODE.DLL file? ;)

Most of my work has gone into using what was available with the original ODE wrapper, and looking at ways to get other information, followed by adding more functions.. For instance, getting the RPM. tis a cheat, but works nicely!!!


Did you use vector cross products for the calculation torque around the cars axis. If you didnt then you really need to consider using as it can open up many new possiblies.



If i ever finish a car physics lib (most of the time, i struggle at the point of getting the suspentions working properly, though ive learnt alot since then. I already have torque done by cross-products by the time i get to the suspention.) Then thats exactly how it will work.

For now, that isnt how im doing stuff as ODE does it, but it IS how i figure out if a wheel is skidding or what-not :D

[edit] Oh, you weren't talking to me!