Tank physics.

Discussion in 'Game Play' started by Chris0132', May 17, 2008.

  1. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    This is sort of part suggestion, but it's also a gameplay thing and there's no point suggesting it if it turns out that nobody else wants it in or that it isn't possible, so I put it here.

    As I understand it, Source vehicles operate based on the same physical constraints available to the rest of the havok system, things like sliders, elastic, length and positional constraints, along with motors and thrusters. I also know that the tanks in empires use wheels to run, not tracks, but one thing that really bugs me about them is that they don't feel heavy.

    I know they turn slowly and have accleration, but they don't lean when you do a corner and they don't rock when you stop, or when you take a hit from a tank shell. I realise that modern tanks might not do this but it is fun to have vehicles that do. So I propose reworking the handling to make the vehicles have more responsive suspension, and to increase the tilt when you turn corners, as one tread takes more strain than the other, and also making it so that when you get hit by a rocket or shell, the tank will rock from the hit, this would probably require some code in the rocket or shell itself because I know vehicles don't really do that when you shoot them in HL2, but I'm going to have a go at doing some mockups in gmod to see if I can produce the effect I'm after, it might take a while because I've never done it before, but what the hell.

    I'm curious to know if anyone else is after this sort of thing.
     
    Last edited: May 17, 2008
  2. Cyber-Kun

    Cyber-Kun Member

    Messages:
    1,200
    Likes Received:
    0
    Trophy Points:
    0
    Each weapon has a force. It effects how much physics is pushed on what it hits.
    I made a cannon that could keep the NF comm in the air as long as you didn't miss.
    This is easy to add in, and if the push wasn't that bad, I would want it in.

    The tanks tilting, I am not a fan off. Tilting + Cannon force means you would be flipped since Hammers physics isn't that advanced.
    Well if the tilt was that little, it could work. You can feel a tilt on the NF light though.
     
  3. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    I know there would obviously need to be a lot of work put into keeping the tanks from flipping, but for that you could just add in some keepuprights of varying force which kick in when you turn, or even just make the thing like an actual tank and give it a low centre of mass. As long as you cap the suspension you'd eventually have the tank body more or less on the floor on one side, so you'd get a nice lean but you wouldn't flip the tank. You can feel a slight lean on the NF light but it's too responsive, it's very fast and as soon as you stop turning slightly it goes straight again, which is understandable for the light tank, but should be much slower to begin and end on a heavier tank.

    I made a basic four wheeled thing and ran it over some rough terrain and you can see the suspension working, to keep the central body more or less stable and smooth in its movements, while the wheels bounce around a lot.

    I'll get a video of it once I free space for rendering the frames off.
     
    Last edited: May 17, 2008
  4. Cyber-Kun

    Cyber-Kun Member

    Messages:
    1,200
    Likes Received:
    0
    Trophy Points:
    0
    Everything you just said about the tilt thing is already know.
    Could work, just need lots of work. Part of that could be tilting and cannon makes spinout.

    With the suspension, yeah. It is there, no real need to show us unless it is really cool.
     
  5. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    Well it just demonstrates smooth movement, you can see more or less the same thing by driving an abrams in BF2.
     
  6. Cyber-Kun

    Cyber-Kun Member

    Messages:
    1,200
    Likes Received:
    0
    Trophy Points:
    0
    Cool, so well this thread was resolved really quickly.
    No flame wars or the like... so rare.

    Just needs to be added in.
     
  7. Demented

    Demented Member

    Messages:
    2,337
    Likes Received:
    0
    Trophy Points:
    0
    A. Will the extra calculations make vehicles more expensive? (I.e. Older versions of Empires.)
    a1. Would a simpler version be worth the effort?​

    B. Will this make driving a tank more difficult?

    C. What are the consequences? Would tanks spin out more?
     
  8. arklansman

    arklansman Member

    Messages:
    5,365
    Likes Received:
    0
    Trophy Points:
    0
    Chris: Empires doesn't use HL2's vehicle physics.
    Cyber: Hammer is a map editor.

    Vehicle physics are probably going to be reworked soon anyway, to stop jeep pushing and that type of crap.
     
  9. Vessboy

    Vessboy Member

    Messages:
    1,519
    Likes Received:
    0
    Trophy Points:
    0
    Oh yeah... the jeeps... That should be fixed.
     
  10. Demented

    Demented Member

    Messages:
    2,337
    Likes Received:
    0
    Trophy Points:
    0
    Isn't it ironic that a jeep with 400 horsepower can tow around the NF commander (wheel friction notwithstanding) yet it can barely climb an incline?
     
  11. Vessboy

    Vessboy Member

    Messages:
    1,519
    Likes Received:
    0
    Trophy Points:
    0
    Wha if we made the tanks realisticly heavy and took away the runnover kill. and jus maki it so the tank actualy starts "climbing" over infantry and they get killed by that crush force you get with elivaters and doors?
     
  12. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0

    Lol misconception about how Source Vehicles work.

    Source vehicles don't use normal constraints, they are very basic compared to most other stuff. They are made of:

    Wheels
    Basic Suspension Constraints
    Chassis

    The wheels don't actually turn to move it forward, that would waste resources, so instead the thrust is applied to the wheels and the wheels animate turning [weird eh?] the basic suspension constraints allow them to feel more fluid and look natural by having bouncy wheels that move around [and deformable treads] and the chassis is a solid physics box you may enter and leave, the suspension comes off the chassis and onto the wheels.

    All in all, a very terrible system if you plan on using vehicles other than a dune buggy.

    The NF tanks [as far as I know] don't even use wheels, but the airboat as a base, just with higher friction and higher forward thrust.

    That asside, your ideas are all perfectly doable, and I think they're great. :D

    EDIT: At vess, NO. The current system is foolproof, adding the crush damage will mean infantry will slow down tanks a ton, and you'll often get infantry surviving a direct smash froma tank. Current system is good.
     
  13. Vessboy

    Vessboy Member

    Messages:
    1,519
    Likes Received:
    0
    Trophy Points:
    0
    keep going men We'll slow them down eventualy!
     
  14. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    Haha, the best strat ever.
    WE'LL US THE HUMAN WALL-- CRUNCH
     
  15. -Mayama-

    -Mayama- MANLY MAN BITCH

    Messages:
    6,487
    Likes Received:
    0
    Trophy Points:
    0
    Yes tanks behave like little toy cars and add fall damage :D :D :D
     
  16. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    Yes it does.

    The vehicles are set up differently, but it uses the same system as the jeeps do, all source vehicles do that, that's how the vehicle system works.
    Ok so they use thrusters, a sort of conjoined elastic and slider, and some sort of weird wheel, my point was that they used a physics system which was akin to the ones already used in the engine.
     
    Last edited: May 18, 2008
  17. [KM] The Corpse

    [KM] The Corpse Member

    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    0
    One thing that bugs me about tanks, hitting a 9 mine and flying the equivalent of 100ft in the air. The tank ceases to be of any use when it's wedged in the scenery beyond the bounds of the map (still with full health and armor?!).
     
  18. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    The tank acts like all physics objects, so when a large explosion occurs, it can be pushed away. By adding mass, you reduce the amount it's pushed.

    For comparisation:
    The imperial jeep, medium tank, and heavy tank all weigh 1800, and the CV weighs 2800. Not much of a difference for such different vehicles. Added gravity for all vehicles is 0.33. The NF variants have the same amounts.

    I see a problem here, if a CV weighs only a bit more than a jeep, then jeeps can push them around much more. The amount of gravity added seems to be too little. If the weight is modified to be enough in comparisation to the actual model, and if the amount of added gravity is balanced, then tanks should no longer push everything around, and fly around because of explosions.
     
    Last edited: May 18, 2008
  19. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    The higher mass is the higher friction and bigger problems with climbing hills. Also above some mass value physics system goes to hell and vehicle starts randomly flying all over the map.
     
  20. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    Looks like we need to invent our own gravity setting for vehicles then.
     

Share This Page