Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Esa Salminen, posted on August 10, 2000

Image Description, by Esa Salminen

This time we demonstrates not only terrain engine, but also physics engine part of our 3D engine. Car physics is implemented with rigid body physics and this is our first physics implementation on it in real 3D enviroment. Engine does not care all physical laws at least not yet, but it's quite fun driving around the world. Demo found to our homepage, hopefully you enjoy too.

Esa Salminen

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

August 10, 2000, 01:12 AM

Demo looks GREAT!! Although, the physics are a tad loose.. Did you intend for the car to spin so wildly? I had trouble looking around because the car turned and slid so easily..
but other than that the demo is killer!!! The trees look 10x better this time around.. Good job!!

RJ West

August 10, 2000, 01:41 AM

You gotta change your setup so that you can select a Secondary Device(ie Voodoo2's:)) It really looks like crap on my Primary Device. Though Engine LOOKS GREAT, from the Screen shots.

Tim Auld

August 10, 2000, 04:27 AM

Very nice. Windowed mode works ok for me, but fullscreen (any res) flickers like crazy. I have a viper 550 (TNT). Also the camera is way too loose, it can't keep up with the car. Driving on the water is fun :)


Albert Sandberg

August 10, 2000, 07:21 AM

Way cool!

Driving around with that car took 20 minutes of my time :)

With lesser slipping, somewhat higher speed, collition detection to trees and (more) correct camera movement, you're got yourself a game :)

Tell us when you've worked more on it, it rocked dude!

Albert "thec" Sandberg


August 10, 2000, 07:32 AM

Looks great.

You are demo-ing your physics code, but I really like the smooth movement/behavior of your camera, could quickly explain your technique for camera movement (realtive to the car)?

Esa Salminen

August 10, 2000, 08:28 AM

This is a first attempt to use rigid body physics implement car movement and this is only a test version. I gonna write physics system again and implement friction influence also. This version donsen't use real friction incluence, so this is one reason why it's so slippery. I'm not math wizard, so it's not very easy to do that, but I get that to work soon or later. I don't have a clue what kind of system others uses, but I'll try to improve this one.

I know camera follows little too slow, purpose was change that, but nobody is perfect =).

Does anyone else had troubles to select secondary device? Setup program purpose is to show all hardware choices.

Do this TNT card nightmare ever stops :(, PLEASE report all bugs that you find.


David Frey

August 10, 2000, 10:34 AM

Good work.

David Frey

August 10, 2000, 10:38 AM

Forgot to mention, I have a TNT with latest reference drivers, and I get this blue flashing and tearing. It sort of looks like the program is rendering to the front buffer rather than a back buffer. Looks fine on my Voodoo card though.

David Frey

August 10, 2000, 11:05 AM

Ok, I noticed a couple other things, on my Voodoo2, the car is not reflected in the water whereas the terrain and trees are, and I am seeing some polygons popping in and out on the car itself. Though these two things are just minor details. I would look into adding friction and better collision detection first. Keep up the good work.

Esa Salminen

August 10, 2000, 12:15 PM

Camera movement it's quite simple. I calculate position to behind the car and use this and earlier camera position to give direction of camera movement, then I multiply this by tick of time. I do same to lookat point. Next code shows what I meaning, fX, fY and fZ values is position where you put your camera depent on car position and orientation. Also it's have to check that camera don't go under ground.

new_pos.x = car_mat(0,0) * fX + car_mat(1,0) * fY + car_mat(2,0) * fZ + car_mat(3,0);
new_pos.y = car_mat(0,1) * fX + car_mat(1,1) * fY + car_mat(2,2) * fZ + car_mat(3,1);
new_pos.z = car_mat(0,2) * fX + car_mat(1,2) * fY + car_mat(2,2) * fZ + car_mat(3,2);

cam_pos = cam_pos + (new_pos - cam_pos) * m_fTimeTick;
cam_look = cam_look + (car_pos - cam_look) * m_fTimeTick;

m_pCamera->LookAt(cam_pos, cam_look);

Tim Auld send me message that Detonator 2 drivers fix problem with TNT cards. Thanks:)

If you don't see car reflection, this is not a bug, we don't put car to reflection list yet:)


Anders Haglund

August 10, 2000, 12:20 PM

That demo was excelent!
Except for the car physics you might want to change the camera movement code, even if it isn't going to be such a big problem when the car don't spinn around so much. =)
Also the car goes crazy when you come close to the edge of the landscape but I guess you know that...
Excelent work guys! Just excelent!



August 10, 2000, 12:41 PM

I've seen the screen shots of the demo, and I fully intend on downloading it when I get home from work. From what I've seen the engine would make a Great Real-Time Strategy environment. :o}

Hard work pays off later. Lazyness pays off now.

David Frey

August 10, 2000, 02:40 PM

I have the latest official Detonator 2 drivers v5.22, so apparently it does not fix the problem on all TNT configurations. 3DMark 2000 use to do the exact same thing with previous Detonator drivers on my computer. And the 5.22 drivers did fix 3DMark 2000, but apparently not your demo. I can tell it is clearly rendering in the front buffer, since near the edge of the lake I can see upside down trees below the terrain, before the terrain overwrites the trees.


August 10, 2000, 02:44 PM

I haven't run the demo, so I don't know if it's OpenGL or Direct3D (but I'm assuming the latter). I know I have the same flicker problem with my nvidia card. It comes from the page flipping (possibly the way you initialize fullscreen). I use the new Detonator drivers and under the OpenGL settings I use block transfer instead of page flipping. That eliminates the flicker. I can only assume there's something similar for Direct3D, either in the driver settings or in a function call. Hopefully that's a clue to a solution for all of you with the problem.

Esa Salminen

August 10, 2000, 02:50 PM

Edge of the landscape is twilight zone=). Exactly this is a last minute addition and it throw car little too near to check point. If you drive this situtation back car further away edge of the landscape.


August 10, 2000, 03:35 PM

You guys are making me realize how much I SUCK!


Michael Edey

August 10, 2000, 03:53 PM

we certainly have seen some impressive iotd's lately, no? :)
keep up the good, no, *excellent* work guys!

"Sprint 'fly rocks.", M.E.

"Sanity is not statistical", George Orwell - "1984"


August 10, 2000, 05:09 PM

That has to be one of the funenst dmoes from the iitd that I have ever used. My whole reason to exist was trying to roll that car :)
total roll count: 3

Nice work!

RJ West

August 10, 2000, 06:00 PM

1. Doesnt Display My secondary Device(Voodoo2's).
2. In Window or Fullscreen, half of the time, the car is not drawn.
Then it will show up for a second, then it disapeers.
3. TONS of pop up, fullscreen or not.

OS: Windows 2000 Proffesional
CPU: Athlon 700
RAM: 128mg
Video: Permedia 2


August 14, 2000, 06:06 AM

Car physics is good, but it's impossible to drive the car. It's like I'm driving on ice. You should fix that factor.
Camera sometimes doesn't show the car. It's bad.
Set that camera follows car and it's always pointed at it.
Put better grip on tires so I could drive. Everytime I start, car starts to turning around it and I can't stop him.
Fix that errors.
I didn't hear any sound also.

Esa Salminen

August 14, 2000, 11:59 AM

Beros: We are changed forces that acting to car so it's not spinning that easily, but not do real friction calculation yet.
Camera follow little bit faster and it not lose car so easily, it's better.
Don't worry, also I didn't hear any sounds=)

RJ West: Did you get selected secondary device for my tip that I send to you. I have to fix that setup program. Do these bugs happend with Permedia2 card?

I don't have a mutch time changing things lately, but next I do LOD system for terrain data.

This thread contains 21 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.