Game physics programming.

Discussion in 'Console & PC Gaming' started by Sa!!yz~Rage, Jun 22, 2008.

  1. Sa!!yz~Rage

    Toronto
    PSN:GTP_Sa11yz-Rage

    Game physics PDF's

    I'm not sure if this has been posted here before, but I found it interesting in my quest to try and get a better understanding of what exactly goes into coding this stuff.

    A while ago I read a thread on a programming forum by a programmer who was commenting on one of the new racing games, he didn't actually say which one. What was interesting and what started me searching for this stuff again, was that he stated that, and I'm paraphrasing here, 'once again they've got it wrong. When are these guys gonna get it through their heads that cars don't turn on a pole inserted through the roof.' Then he said something like, ' yes but they are not translating the weight transfer as it applies to the four points of adhesion and the tires.'

    This wasn't on a gaming forum, it was an animation forum so it wasn't about gaming.

    There are times when it does indeed seem like your car is not turning so much as it is 'rotating' in the corner.
     
  2. Kryz11

    Premium
    Philadelphia PA
    PSN:NoxNoctisUmbra

    Nice find with link. Al tho I'm not a coder, but I know its damn hard to make a SIM racing game. But hey, what game is perfect?
     
  3. the Interceptor

    Premium
    Germany Germany
    PSN:theInterceptor77

    Wouldn't this belong in the "Gaming in general"-forum, as it's not directly related to Prologue?

    On another note, I sometimes do ask myself if programmers like PD take the approach to program proper physics models of racing for the game, or if they just make a step by step physics model "by hand" and then try to tweak it to come close to reality.
     
  4. Sa!!yz~Rage

    Toronto
    PSN:GTP_Sa11yz-Rage

    I guess perhaps, this is the only part of the forum I'm on these days it seems. Most definitely move it if it should be. :tup:

    Sort of on the topic of physics, I think this is why the car sometimes doesn't 'fishtail' so much as it rotates in a 'yawing' fashion, like flying. I've complained of the 'snap back' effect when you swing the rear end out and try and power your way through something and how the car just seems to unrealistically snap the front-end around as the rear-end comes back on you. That's not right.
     
  5. Kryz11

    Premium
    Philadelphia PA
    PSN:NoxNoctisUmbra

    I think PD needs to release a video on how they made the game. Like what steps they took to achieve simulation.
     
  6. bevo

    Online Now!
    Premium
    OH-IO
    PSN:GTP_bevofrancis

    It seems to me that anytime you make a racing game where the car is always in the center of the screen, The car will feel like it's on a pole. That pretty much involves almost every racing game made in the last 15 years. If the cars don't have any side to side motion it's gonna be hard to get a looser look. But I think gt5p did a pretty good job. It's the best handling car game I have ever played. (I have mac computers, so I can't play the pc sims.)
     
  7. Sa!!yz~Rage

    Toronto
    PSN:GTP_Sa11yz-Rage

    I can see that on your follow views for sure, but on the bumper or cockpit it shouldn't, I don't think anyway. On the roof view it really seems noticeable, that you're rotating on an axis or something.

    What I do notice it that on your replays it seems fine. You don't notice it. Only when driving it seems like.
     
  8. Ardius

    United Kingdom Manchester
    PSN:Ardius_

    Interesting.
    Well, as a rookie games developer myself, I have to firstly say that it's very difficult to work out and get working ideas when programming your games physics. In fact, it's one of the hardest aspects of making the game engine (if not THE hardest aspect, depends on how good you want you're AI to be).

    Now, I will partially agree with you here, because if you think of the car and then the relation of its movement to the atmosphere around it (as in, watch the "true" background, the sky, while you drive around), you quickly realise that, yes almost all games use the pivot on a point physics.
    Now, you may think that this is horrible and lazy physics, but then you factor in how this relates to what the player sees, and it's a different story.

    I think the key thing with computer games is that they are not real, everything that goes on in them is "trickery" of some kind to give the impression that it is like reality. With this in mind, you quickly realise that the track, car, actual movement on screen, lights, etc, are used to give the impression that the car is physically moving in the exact same way as a real car would and should.

    I suppose, in conclusion, what I'm getting at, is that you are noticing the trickey that is being used to give the impressions of reality in a place where there is none. All computer games use this and Gran Turismo is no exception, you are noticing that the sky you are driving under is rotating or the car is rotating under the sky.

    Oh, and a last note: Animators/Modellers/Programmers don't get on with each other. What a modeller will say can be done, a programmer will not. (programmers know the best ;) )
     
  9. Sa!!yz~Rage

    Toronto
    PSN:GTP_Sa11yz-Rage

    This is what someone else said, not me. I do know a friend of a friend that works for one of the bigger companies here in Canada, he's more on the graphics side of things though. :)

    It would seem to me, and maybe you can shed some light on this, but with the processing power of the PS3 say for instance. Shouldn't the 'trickery' be pretty much undetectable now? With video being such a huge reference base now in game development, the sky had better be following my car correctly. :tup:

    As a graphic designer yes I bet there are some 'battles'...:lol:
     
  10. Ardius

    United Kingdom Manchester
    PSN:Ardius_

    Well, to be fair to PD, they have done a extremely good job with the sky in GT5P, it is a lot, lot, lot less noticable than many other games even nowadays.
    The thing is, they don't really count on people staring at the sky while they walk/drive about the virtual worlds, and therefore they use the ground objects to distract them. This works fine till some clever twit goes and tells people about the magic act, then everyone notices. That or a keen eye will notice it.

    To really get rid of it, they'd have to completely re-think the way they build virtual enviroments.
     
  11. Dave A

    Premium
    West Didsbury, Manchester

    As far as I'm aware GT is one of the few racing games where car turns on 4 axis' ie the 4 wheels as opposed to a single central axis. As a result this has nothing to do with GT5:p and unless I'm really missreading you Sa!!yz~Rage the majority of your posts that I've seen all seem to be highly negative or implied negativity towards both PD and GT5:p.

    As far as I'm concerned, aware and knowedgable engough to make my own conclusions, GT5:p is a damn fine efford at a simulation. It's not perfect, but compared to what else we have on offer, it's very good.
     
  12. Scaff

    Moderator
    United Kingdom Behind you
    PSN:ScaffUK

    Difficult to comment on as you are paraphrasing what was said, but the reason why its so damn difficult is because both things are happening.

    Cars DO rotate around a point (yaw), its just not a fixed point and its not the only factor involved. A good physics model needs to account for the transfer of load in three dimensions, the modeling of grip levels at each tyres (and strictly speaking at different points across the contact patch - which itself changes shape) and how all of this effects how the car is rotating.

    Cars move about three axis (pitch, roll and yaw)....

    [​IMG]

    ...based around the COG. With the cars overal yaw being determined by the yaw enountered at each tyre combined with the forces (PMI) working on the car...

    [​IMG]

    ...overall quite a complex interaction of forces.

    So to say that cars do not rotate (if that is what was claimed) is simply not correct, if however he was saying that its not the only factor then I would quite agree.

    Its always been Codemaster's big mistake to have a fixed rotation point as the dominating factor in the handling model they use (and the vehicles yaw strongly dominating the tyres yaw rate).


    The link you provided is not to an article on physics in games, its real world racing physics from a physicist that races cars. It also contradicts any claim that cars do not rotate, this part in particular...

    http://www.miata.net/sport/Physics/Part20.html

    ...my source of the article is different to yours, this is the link I've used for this series for years. Well worth taking the time to read and take in.


    Regards

    Scaff


    BTW - Moving this to the gaming in general section.
     
  13. Wolfe

    Premium
    United States Wisconsin

    I know of three games (maybe more) that actually do base the movement and weight transfer of the cars on four contact patches. Live for Speed, Enthusia Professional Racing, and Need for Speed: Porsche Unleashed.

    Porsche Unleashed is the interesting one, and I remember EA touted their new "4-point physics engine." It was definitely an improvement over their earlier games and almost feels like a sim with its noticable weight transfer, but is limited by poor power oversteer modelling and a primitive tire model. Everything from the 914 to the 993 GT2 simply slows down until it stops sliding and regains grip. I don't know if EA held onto that engine and kept evolving it, but Hot Pursuit 2 felt like it, and the rest of the Need for Speed series, though unrealistic, has usually felt more "dynamic" than the average arcade racer.

    Live for Speed easily demonstrates this method of physics programming, even without the togglable graphic display showing you the friction forces in the XY dimensions and the weight load on each tire in the form of colored bars. You can tell just from the way the cars behave. :) :tup:

    Enthusia offers a similar feel to Live for Speed, but is much more vague and has a simpler tire model. There are other limitations, including the inability of any car to lift a wheel from cornering. Still, the difference is clear when compared to Gran Turismo 3 or 4, which both seemed to use a point-and-pivot physics engine with traction and weight load variables at each corner of the car.

    Konami themselves highlighted the difference with a section of Enthusia's website, including a useful diagram for this thread:

    [​IMG]

    I'm not sure of any other examples, but I bet there are more. Grand Prix Legends could be one.
     
  14. Tornado

    Premium
    Lyons, New York

    I wouldn't think so. While PU was very sim like comparatively speaking, one could still feel somewhat similar sensations to driving in High Stakes. The games coming after PU feel a lot more weightless and tossable than they did before or during, and honestly less sim like. On thing I always liked about the earlier NFS games was that it felt like there was a pretty good engine underneath the games that was hidden by the tire grip being way too high in order to make it arcadey. Furthermore, it seems like there was a big change in between HPII and Underground regarding how planted the cars are in normal driving.
     
  15. CoolColJ

    Australia
    PSN:CoolColJ, GTP_CoolColJ