1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Basic Car

Discussion in 'HTML, Graphics & Programming' started by FredFlint, May 16, 2018.

  1. FredFlint

    Wise Guy

    Joined: Feb 1, 2006

    Posts: 1,813

    Hi, I was board so I coded a basic car:



    It's coded in c++ using OpenGL for graphics.
    Link to test App:here
     
    Last edited: May 24, 2018 at 1:57 AM
  2. AHarvey

    Sgarrista

    Joined: Mar 6, 2008

    Posts: 8,598

    Location: Stoke area

    now make it self-driving ;)

    Looks impressive. Wouldn't even know where to start with this!
     
  3. jsmoke

    Suspended

    Joined: Jun 17, 2012

    Posts: 4,940

    Source or fake.
     
  4. FredFlint

    Wise Guy

    Joined: Feb 1, 2006

    Posts: 1,813

    I would not know how to do AI driving but I am thinking of adding some obstacles and basic collision. The hardest part so far was the steering, making it go forward and backwards was easy but the steering took some work, ended up implementing Ackerman steering to make it look correct. It still has a few miner issues but overall it looks and drives OK.
     
  5. touch

    Capodecina

    Joined: Oct 28, 2006

    Posts: 10,278

    Location: Sufferlandria

    Very impressive. Are you controlling the movement (with arrow keys or something)? Or is it pre-set animation?


    I think it's fake. If you look closely at 0:27 you can see the model turns to wireframe - real cars dont do that!
     
  6. Mynight

    Soldato

    Joined: Jun 16, 2013

    Posts: 5,146

    That's pretty cool.

    Any chance you're sharing source I would love to see how that's achieved.
     
  7. FredFlint

    Wise Guy

    Joined: Feb 1, 2006

    Posts: 1,813

    I use the up/down for throttle/brake and left/right to turn. @0:27 I hit the wireframe key, I added it as it can help with debugging. I might upload the code at some point but its a bit of a mess as not used c++ in over 10 years and I used a lot of classes I did back when I first started coding in c++. It's a real nightmare to drive, like a remote control car. I added code to lock the camera at the back of the car but it looks bad(easier to drive through), need to play a car game to work out where to put the camera:)
     
  8. FredFlint

    Wise Guy

    Joined: Feb 1, 2006

    Posts: 1,813

    If anyone wants to give the app a try, I have added a link to the first post.
     
    Last edited: May 24, 2018 at 1:56 AM