Search Unity

[WIP]CGCar - Car Physics, and maybe GTA-style game kit.

Discussion in 'Works In Progress - Archive' started by alinhaidu, Aug 2, 2013.

  1. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    Hello guys, i have been recently working on a project, (this is my first Unity project), and i think i need some advices, opinions, critics, and maybe asset store buyers.



    Depending on how many views, comments, suggestions, requests and other reactions the Thread will have, i'll do my best not to keep you waiting for answers / improvements, etc.
    Thanks for not throwing rocks at me (i`m kinda new) - all programming and set up was made in less than 3 months, and when i started i had no ideea how to make a script that prints a line.
    And here is a link to a webplayer,that i will continuosly update.

    Updates Log:


    09/08/2013
    * Added a new webplayer demo / started to model a city (updated)
    * Added a breakable traffic light thing
    07/08/2013
    * Updated the cars behaviorus - No more auto-reverse when holding brake key. You will now have to re-press the key while completely stopped.
    * Update to the 3rd person view camera behaviour. Beta.

    06/08/2013
    * Some fixes to the enter/exit system.
     

    Attached Files:

    Last edited: Aug 9, 2013
  2. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    How can I get in the cars?
     
  3. JerksOfAmerica

    JerksOfAmerica

    Joined:
    Mar 20, 2013
    Posts:
    18
    its fun and basic, lost all the cars off the edge of the map and had to quit. maybe update the webplayer with colliders or walls that don't allow you to fall off the edge. Throw in some rigidbodys and physics to crash into other than the buildings that you bounce off of. Plus some on screen hotkeys will help so you don't have to try every keystroke to see what happens. You have them when you enter the vehicle but not in first person camera mode. Still fun to play with, good job.
     
  4. Ecocide

    Ecocide

    Joined:
    Aug 4, 2011
    Posts:
    293
    It is just a webplayer DEMO to demonstrate the ability of his (maybe) upcoming asset. Therefore you guys should give an advice about the system itself, not about how to improve the webplayer demo. nobody cares about missing colliders on the edges or whatever.

    As I said before - great job, alinhaidu! Especially with an experience of only a few months.
     
  5. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    Thanks, Rattlehead, and thank you too, JerksOfAmerica, i`ll improve my demo right away, you might wanna check it out again in one hour after i post this.
     
  6. The Ghost

    The Ghost

    Joined:
    Jul 7, 2012
    Posts:
    188
    Press F.


    The demo is pretty good, nice believable driving.
     
  7. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    (2x very small) updates are on. Clear your browser`s cache and refresh the demo page
     
  8. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    Suggestions:
    Add support for game controllers
    Driver's seat view
    Gear shifting - F, N, R
     
  9. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    I will work on the Driver's seat view tonight. I need to write a small camera changing script, and some script that will rotate my steering wheel. For this i will have to change my car models with some that will have something that at least looks like a car's interior.
    For the game controllers i have no ideea how to do that, but i will learn, if is requested.
    For gear shifting, i dont get the ideea, you mean i should implement the option of the gearbox to be Automatic / Manual ?

    Thank you very muck for the feedback and sorry for my bad english, i`m from Romania.
     
  10. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    Unity has Input Manager that can be used for setting up game controllers. I don't like car games in which the car stops and goes into reverse while you're holding the brake pedal (or key). In real life, you stop the car, put the car in reverse gear, use the gas pedal to move the car backwards, stop the car, put the car in forward gear, and use the gas pedal to move the car. You can give the player a choice of automatic or manual transmission but the Input Manager doesn't have enough slots for additional buttons needed for manual transmission.
     
  11. carl010010

    carl010010

    Joined:
    Jul 14, 2010
    Posts:
    140
    You really should have a look at this new Realistic Vehicle Physics called BeamNG DRIVE.



    Also have realistic do you plan on makeing your car physics? Because if you could get that ^ in unity, You would literally be a god amongst men. Also great work so far man.
     
  12. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    some small updates to the map. not finished yet with the other scripts
     
  13. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    Or maybe i should make it like this:

    you are going forward - you press and hold brake key - it will brake, it will stop, and while you hold the brake, it will stay braked. While stopped, if you release and press once more the brake key, it will go in reverse - will this work for you ?
     
  14. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    you are going forward - you press and hold brake key - it will brake, it will stop, and while you hold the brake, it will stay braked. While stopped, if you release and press once more the brake key, it will go in reverse - will this work for you ? <- This will not work. That will confuse players because once the car runs backwards, you have to hit the gas pedal to make the car stop.
     
  15. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    That is right, sir. What do you suggest ? i cant imagine playing a GTA-like game and while trying to make my escape trought heavy traffic and with some cops on my *ss, having to think about shifting gears. I think we should make a poll out of this thing hehe

    ** thinked about it, and, it is right, because - while going reverse, you CAN'T hit the brake/reverse key in order to brake, because you might want to hit that key in order to accelerate while going reverse, and you don't want to brake. And yes, it is funny to accelerate in order to brake. Should i think about a separate key for going in reverse ?
     
    Last edited: Aug 6, 2013
  16. carl010010

    carl010010

    Joined:
    Jul 14, 2010
    Posts:
    140
    You should really keep it as automatic transmission.
     
  17. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    yes, and maybe, if you really need to hold it braked (maybe on a hill) you might want to hodl the Handbrake key ([SPACE])
     
  18. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    I had an old version of "18 Wheels of Steel" game which is a tractor-trailer rig driving game. In "automatic" mode, I always crash the trailer while backing the trailer to the loading dock because if I keep holding the brake pedal down, the truck moves backwards.
     
  19. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    Do you use a steering wheel to play ?
    If so, and assuming nobody will play gta using a steering wheel and pedals, i will leave the developer`s option to choose weather the car will act as automatic or manual. Damn, i have to rewrite the whole Car Controller script.

    **later edi**

    made some small modifications to the driving script...
     
    Last edited: Aug 6, 2013
  20. jeffmorris1956

    jeffmorris1956

    Joined:
    Jul 3, 2012
    Posts:
    276
    You can't play GTA and similar games with steering wheel and pedals because you also have to control the character. A gamepad with two thumbsticks would work better. When in car, a thumbstick acts as steering wheel and the triggers act as pedals. When not in car, the left thumbstick moves the character and the right thumbstick controls the camera (eye view), turning the character to follow the camera.
     
  21. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    very nice job.
     
  22. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    Thank you. You might wanna check again in few minutes, i have updated the camera script.
     
  23. Aspiring_Failure

    Aspiring_Failure

    Joined:
    Jan 21, 2013
    Posts:
    42
    Not bad. I got into the game and drove around in some random cars. Immediately, the audio came up as pretty horrendous to me. It's too abrupt and has a glitchiness about it that I really don't like. The driving mechanics, however? They felt pretty good. I also liked the skid marks that the vehicles left and the way they interacted with the ramp and hills.
     
  24. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    You were right. I now updated the terrain, made it smoother. I hope you like the road (Thanks to a license of EasyRoads3D buyed from AssetStore)
    What do you guys think about the camera ? Is it better with the old Mouse Orbit script or the new one ? Thanks
     
  25. alinhaidu

    alinhaidu

    Joined:
    Jul 27, 2013
    Posts:
    15
    i have uploaded a new demo, witch features a city (under construction). Check the webplayer3 on the website, or click here (direct link)
    Note: It is recommended to play in fullscreen
     
    Last edited: Aug 9, 2013
  26. dmi3ich

    dmi3ich

    Joined:
    Mar 30, 2013
    Posts:
    4
    Hi, your script looks good, because many car's scripts have problem with 'realistic' road movement: car in real life don't drift always when you press gas pedal, even if gas key press long time. Your car have mass, it's look like. Can you some share about tutorial with witch you start learning?