|
Car racing - Physics
#382105
09/04/11 15:01
09/04/11 15:01
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Hello. I readed a lot yesterday in the forums, and I see there is a lot of topics about it, and some very confusing information. I would like to ask you experts, considering the actual situation of the engine today, what would be the best choice to make car racing physics ? How is the actual situation of Newton Dynamics ? And how is working the "embedded" 3dgs physics ? Basically, what I have in mind is, a racing game, using some sort of physics Engine, but, also multiplayer. I´m willing to offer a job to someone whit the knowledge ( and time ) to work on it to me, but, as I dont have too much money, maybe I would do it by myself. I wrote, in the past, my self "physics" to race cars, and, with more or less sucess, it worked. I also worked with newton a bit, and got interesting results, but the speed achieved was not that great. My last results with Newton, at that time were this : Kart Racing - Newton Player + Newton AI And the result of my attempt to write car physics was this one ( I made it a lil better after this video, but didnt have videos ) My own "car physics" in c-script I would appreciate any suggest or comments. Thankyou.
|
|
|
Re: Car racing - Physics
[Re: Progger]
#382215
09/05/11 22:07
09/05/11 22:07
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Thankyou, Progger.
You´re being very very generous in your reply.
In fact, I got happy at that time with my c_script physics, and I think I would get something nice if I got more time to keep working on it.
But, due to my lack of knowledge about collision and math, I stuck with collision at walls and other cars, then I gave up.
I wish I could made it complete, would be nice to achieve it, but its really very difficult to programm physics that way.
The nice part was, being the physics only calculated to the car movement, nothing else, it was very fast.
Now I need something reliable and fast enough to make something commercially able, and dont have so much time to do it.
I just bought an update to commercial, to make use of features like shadows and minimal shaders like reflection, and I´m hungry to get something showable fast.
One more time, thankyou for your very generous cumpliments.
Cya,
Carlos
|
|
|
Re: Car racing - Physics
[Re: Carloos]
#382258
09/06/11 17:05
09/06/11 17:05
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
The amount of users which are using advanced physics (other than boxes and spheres) in their applications was always relative low. Since A8 introduced PhysX, I believe there are less people who try to work out car physics. Given a physics engine, especially a realistic simulation can be achieved, while it is super hard to have full control over the vehicle from a programmers point of view - you have always sort of indirect control with a physics engine. Especially when you try to code AI opponents. If done sophisticated and with some experience you will get a robust vehicle (meaning that it doesn't flip all the time in curves) and last but not least, if you it well, due to the physics-approach it might be fun for the player, too. If you do a script-based "physics"-simulation (with the c_) instructions, you have full control, but making a realistic simulation is a lot of work. Due to the full control, it is also very robust and programming becomes easier, just rethink about AI But in all cases I doubt that a script based approach will be ever realistic and as long as you want to achieve that, you will better use a native physics-implentation for a vehicle, I suppose. I am currently working on a PhysX-driven vehicle simulation, but 1) It deals only with one vehicle 2) It is a heavy vehicle and 3) It is a slow vehicle. But nevertheless, I am confronted with much issues as well. One of the requirements is that the vehicle will brake and will stand still automatically, when no gas is used. That was more work for me to figure out how I should do this compared to build the whole physics setup and make it work (it is a vehicle with several constraints, an attached trailer and a different way of steering). Nevertheless: especially on high speeds things become tricky. In commercial productions, like those F1 games (you showed a video of a F1 racing sim of your own), there is a lot of work put into making those physics simulations... in the end it is ALL ABOUT that physics simulation of the F1 cars. So, you might guess how much work is put into that and I suppose you need to do lots of work in order to achieve nearly the same with PhysX. Not because PhysX is bad, but because it is always hard work to achieve good & stable physics and physics, which are at the end fun as well. So, short answer: Yes, I believe you can do modern, advanced car racing physics with PhysX in A8, but you will have to invest large amounts of blood, sweat and tears ...like in every game dev project
Last edited by HeelX; 09/06/11 17:07.
|
|
|
Re: Car racing - Physics
[Re: HeelX]
#382260
09/06/11 17:33
09/06/11 17:33
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Hi HeelX Thankyou for your considerations. I´m really losted... if I think only in satisfaction as a "programmer", I would stick with rewriting my physics again in lite-C, and try to go on with that, because, in fact, I had the total control over what was happening in the car... when something really happened By other side, I dont have too much time to spend on it. Using Newton, I remember also that the simulation was something slow, and my physics runs very very fast, because it was only that.... racing car physics.. nothing else. I already invested blood, sweat and tears a lot in this type of thing. And life goes on very fast also, much more then 3DGS. Maybe we can exchange info in the near future when I get more advanced on it ? Cya, thankyou a lot.
|
|
|
Re: Car racing - Physics
[Re: Carloos]
#382263
09/06/11 17:54
09/06/11 17:54
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
I'm working on proper car physics ATM, I'm trying to get proper movement like this: UDK Car I can recreate almost everything, but not the handling... It's really hard to get proper steering at least for me.
|
|
|
Re: Car racing - Physics
[Re: 3run]
#382266
09/06/11 18:10
09/06/11 18:10
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
I have worked on a -fun- kart racing sim years ago and wrote everything with C-Script and in the first place it is really the easier route to go. But even though it had simplified physics, I didn't got it right and had problems everywhere: on the one side I tried to make it more realistic, but on the other side I always had trouble with the car alignment on the floor and the behaviour in mid air (like driving over ramps). But if you things like "whirling on bananas" and bombs and such stuff, it could be tricky do do it well with a physics-driven vehicle setup, yes.
Well, I guess it all depends on the requirements you have and how you want your physics simulation in the end.
If you advanced, sure, call me, why not.
Here is already one best practice I can give you from what I learned from my PhysX coding sessions: when defining positions and hinge axis directions and so on, try to place bones in your model and access them via their names. This is much more convenient and customizable than defining offsets and such via skills, like in the current vehicle templates.
[EDIT]
@3run: I wonder if the turret is an attached physics object (reacting on vehicle momentum and crashes and so on) or if it is attached as a seperate model (or via bone animation?). If the former, I wonder how they translate the crosshair direction into runtime constraint-parameters?
Last edited by HeelX; 09/06/11 18:13.
|
|
|
|