Programming Racing Lines

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 51

  • @chriswinslow
    @chriswinslow 6 лет назад +8

    Your videos are simply put, inspirational! I currently only code in PHP and some JS, but I'm trying hard to get my head around OOP and MVC while totally brushing up my maths skills, so I can move down to lower level languages like C++, Java and C# to make games.
    I've already just said this on twitter but I'll repeat it here: I would pay for programming and maths tutorial videos from you. You explain yourself very well while coding and drawing diagrams, like in your Programming Balls #2 Circles V Edges Collisions C++.
    Keep up the good work mate.

    • @javidx9
      @javidx9  6 лет назад +5

      Hi Chris, thanks for this, and thanks for your very supportive tweet too! I Lol, I dont want payment, I just want people to learn, and help each other code! Maybe I should write a book?!

    • @chriswinslow
      @chriswinslow 6 лет назад

      Books are ok but I personally find videos much more insightful especially how you present them anyway. You talk at a good pace and you are clear in what you're saying, plus I think it's important to see any animations or movements of an object and its good to listen to what you're saying at the same time.
      With videos, we can watch how you build up each mini project/module which could be implemented in our own games or even raspberry pi devices by grabbing snippets of your excellent code & learning or expanding upon it.
      There are lots of tutorials on there and places like Udemy, but not are as good as yours. You explain the maths behind what you're doing. Being able to put pen to paper to explain for example how an object on the can move from A to B is tricky and almost soul-destroyingly difficult. In one of your videos said something about "tangential", I had to look that up.
      It may be difficult creating videos on teaching programmer and maths from beginner level to say your level. But I think you'd be onto something good due to your teaching style. You could release some sample/preview videos so that students can see what they would be paying for and if they like it they could pay to be given the RUclips URL's to access the full unlisted videos or to get a password to download the videos from your website or even DVD's. You have the equipment why not earn from it? There is nothing wrong with that!
      You have a lot of talent and you should profit from it. Becuase if you succeed we would too, you'd get money which would allow you more time to make tutorials on difficult subjects and we'd get your valuable knowledge. I hope you think about it anyway.

  • @CykPykMyk
    @CykPykMyk 6 лет назад +15

    THIS IS SOMETHING I WAS WONDERING SOOOOOOOO LOOOOOOOOONG, THANK YOU, OH MY GOD YOU ARE SO AWESOME

    • @javidx9
      @javidx9  6 лет назад +1

      lol, glad I could help Xavery, thanks!

  • @higgins007
    @higgins007 6 лет назад +7

    Recently found your channel and have been binging on your vids. Brilliant stuff. You're motivating me to get back to my own personal projects! Keep 'er lit!

    • @javidx9
      @javidx9  6 лет назад +1

      Thanks Paul, I really appreciate that, the whole aim of all this was to motivate people to fall in love with coding again, so great stuff!

  • @Ochenter
    @Ochenter 6 лет назад +1

    I remember being in UK during these dates, Holiday bank two years ago. I booked a room in a hotel in Leeds.
    Nice tutorial as always.

    • @javidx9
      @javidx9  6 лет назад +1

      Thanks Daniel! I have a love/hate relationship with Leeds XD

    • @Ochenter
      @Ochenter 6 лет назад +1

      I really stayed in Rotherham David, just made a mistake of around half and a hour drive away.
      I Spent two days in there (pretty lovely memories of that trip); day before I had booked in the Sheffield Mercure hotel parkway precisely on that very day.
      First stop was Leeds Bradford airport and from there to Blackpool, then the mentioned hotels up above.
      I felt like wanting to visit all the midlands area. This was the second UK journey I did in 2016.
      To me It was Nottingham during my first UK journey in 2016 the most beautiful town that I stepped into, then Liverpool.
      I probably do It again after summer, love your pop artists from the 80'S and much more Level 42, concert coming up by then.
      Glad you liked my comment.

    • @javidx9
      @javidx9  6 лет назад +1

      It sounds like you thoroughly explored the north of England when you visited then! (North's the best bit by the way ;-) ) Sheffield is a very nice city, and Blackpool, well, it's Blackpool, but it has a tower...
      Yeah, the UK did alright for bands in the past, lots of great and influential ones. Not sure about today though, lol, im probably just getting old :D

  • @Rraccd
    @Rraccd 6 лет назад +2

    Great vid! Always on point with spline and demand.

    • @javidx9
      @javidx9  6 лет назад

      ba boom tish :D

  • @eugenetswong
    @eugenetswong Год назад

    Thank you. Knowing which path is shortest isn't necessary for racing, but it is interesting.

  • @seebaastian
    @seebaastian 6 лет назад +1

    men, it's sad your videos doesn't have the amount of views that you deserve. I hope that time will improve this and your subscriber base grows too.

    • @javidx9
      @javidx9  6 лет назад +2

      Hi Sebastian, as long as some people are finding the material useful or entertaining then I'm happy.

  • @FuZZbaLLbee
    @FuZZbaLLbee 4 года назад +5

    2:57 Scandinavian flick

  • @zbynekriha
    @zbynekriha 6 лет назад +3

    happy to see this

    • @javidx9
      @javidx9  6 лет назад

      Thanks zbynek!

    • @zbynekriha
      @zbynekriha 6 лет назад

      wish i saw something like this at my 13-14age, at 1994-5

  • @colepeterson5392
    @colepeterson5392 6 лет назад +3

    this is awesome

  • @Triumph263
    @Triumph263 6 лет назад +16

    Now that it supports triangles I think it's clearly time to port Doom to it.

    • @javidx9
      @javidx9  6 лет назад +6

      Lol, definitely some fun videos to come!

  • @lupinedreamexpress
    @lupinedreamexpress 6 лет назад +1

    I love cathmul roms, they are polynomials so scalar to any dimension. They work in 3D rather nicely for camera paths. It will do a lot more in smoothing a camera path in 3D than a Bezier spline, though calculating the gradient and the normal vector for proper smooth radian rotation is something rollercoaster simulators have been trying to get right for years. Extrusion gets a lot more computationally intensive when you are involving polys or nurbs. At high tesselations this lags horribly with accurate calculations.
    In making an observation with your code perhaps forward checking the distance vector between the next node, and the previous, can help you to calculate a normalized width that will make the outer curves a bit smoother. It seems like you are encountering kinks when the nodes are placed close together. So may want a gradient track width instead of a static value as you've defined here to smooth things over calculated via the distance between the previous and the next node as a 1D vector.

    • @javidx9
      @javidx9  6 лет назад +1

      Hi Lupine, yes I do get kinks predominantly from the high frequency components of the spline. I can certainly improve how I extrude the track width, but the most obvious way is to allocate more information to those components. I like catmull roms because they go through the points predictably, that makes life so much easier!

  • @my_temporary_name
    @my_temporary_name 6 лет назад +1

    Great video! Great channel!

    • @javidx9
      @javidx9  6 лет назад

      lol thanks temporary name!

  • @samirsuleymanov2099
    @samirsuleymanov2099 4 года назад

    Great video! Currently working on a top-down racing game in GDscript (Godot game engine) where I managed to make the car slow down before the corners automatically. The player can manipulate the spline and the car follows. Can't figure out how to visualize and control bezier handles though (handle-in, handle-out). Sadly, non-existent information on how it can be achieved.

  • @meanmole3212
    @meanmole3212 6 лет назад +1

    I am not an expert, but couldn't you add a controllable tangent for each point in the curve to finetune the steepness of the road? Or I suppose it would be just as same as adding these "regular points" in larger quantities to ease the steepness?

    • @javidx9
      @javidx9  6 лет назад

      Hi mean mole - with this particular spline, you can't add tangents, but you are quite correct. Being able to manipulate the tangent through a node would be most helpful in this instance. Right now, I can only influence the tangent by positioning the neighbour nodes. On the whole the algorithms are information starved in this regard, so as you suggest more nodes will help. I might follow up this video with sub-nodes later.

    • @meanmole3212
      @meanmole3212 6 лет назад +1

      javidx9 Right, right. Good to hear that I have learned at least something during my last course "introduction to computer graphics".
      I never really grasped the splines wholeheartedly, so I must check out the video you recommended.

  • @meowgoesthedog_
    @meowgoesthedog_ 6 лет назад +2

    Brilliant video. Would you consider revisiting this problem in a future episode, e.g. using some sort of evolutionary algorithm to find a more realistic racing line?

    • @javidx9
      @javidx9  6 лет назад +1

      Thanks! Maybe, I think there are some numerical and analytical approaches that could be exploited first. That said, I've not done a video on evolutionary algorithms yet, so maybe worth thinking about.

  • @dylanica3387
    @dylanica3387 5 лет назад

    Why don’t you recalculate the width of the track at each point along the spline that you add a triangle to? That would made the width of the track consistent up to the resolution set to the triangles?

  • @Mlody87PL
    @Mlody87PL 4 года назад +1

    Amazing job, thank you! I wonder how to solve the problem of overtaking the opponent after implementing the racing line. Could somebody help? :)

  • @djosearth3618
    @djosearth3618 3 года назад

    Thanks for all y our vids! Wish you had linked Spline video URLs 1 and 2 in Descr ora _pinned comment at least ;] _

  • @andreaspersson4823
    @andreaspersson4823 3 года назад

    Sorry for commenting on old video. But tried this in 3d and was wondering how to handle the last part with 3d vectors?
    // Project required correction onto point tangent to give displacment
    float dp = -g.y*vectorSum.x + g.x * vectorSum.y;

    • @javidx9
      @javidx9  3 года назад

      You'll need to use 3d vector maths, so the equivalent would be the cross product of the direction vector at that point, with some radial normal, though that might be tricky as you'll need to define which way is up for the track at that point.

    • @andreaspersson4823
      @andreaspersson4823 3 года назад

      @@javidx9 Thanks, I think I have all that info available :) but that will give me another vector, not a float with displacement amount?

  • @dnaMES
    @dnaMES 6 лет назад +1

    Nice video! It will be of help if you put your samples on github.

    • @javidx9
      @javidx9  6 лет назад +2

      I do. Everything ive made! Links are in descriptions.

  • @stivstivsti
    @stivstivsti 4 года назад

    it would be cool to make video on SGD

  • @robertboran6234
    @robertboran6234 6 лет назад +1

    Cool

    • @javidx9
      @javidx9  6 лет назад

      Cheers Robert!

  • @bruhreally
    @bruhreally Год назад +1

    Do this with real tracks

  • @JoshRosario310
    @JoshRosario310 3 года назад +1

    Should implement some machine learning

  • @loupgris4153
    @loupgris4153 2 года назад

    Hi, this is awesome, I'm not really good with programming, so someone can help me and do it for me for an track ?
    Thanks in advance