Radu Mariescu-Istodor
Radu Mariescu-Istodor
  • 340
  • 1 319 854
Recreating a Train Simulation with JavaScript | Coding on the Train!
Join me on a train ride as I recreate my first train simulation using JavaScript! 🚂 In this video, I'll show you how to draw train tracks and animate a train using dashed lines and Bezier curves, all on an HTML Canvas. Whether you're a beginner or an experienced coder, this tutorial has something for everyone. Here's what you'll learn:
Highlights:
- Setting up an HTML Canvas with custom styles
- Drawing train tracks procedurally with JavaScript
- Creating and animating a train along the tracks
- Implementing smooth curves with Bezier curves
- Adding interactivity with customizable parameters
- Live coding challenges and solutions
Check out the final demo on my website and stay tuned for more projects, including a game based on the trolley problem! Like, comment, and subscribe for more coding adventures.
Old Version: czcams.com/video/ZNkapOL4OBw/video.html
DEMO: radufromfinland.com/projects/train_2
zhlédnutí: 1 938

Video

JavaScript Beginner Project Tutorial: The Ebbinghaus Illusion
zhlédnutí 1,9KPřed 16 hodinami
Hey coders! Today, I've got an exciting tutorial for you where we dive into the mesmerizing world of visual illusions. In this video, I'll guide you step by step through coding the Ebbinghaus illusion using JavaScript and HTML Canvas. Plus, we'll take it a step further and add some animation to bring this optical illusion to life! 🖥️ Explore the fascinating intersection of psychology and web de...
Understanding Data with AI (ChatGPT 3.5 and Python)
zhlédnutí 1,8KPřed 14 dny
Any data should come with some kind of documentation, but very often it doesn’t. In this video I’ll show you how to use large language models to help you understand what some structured data is. We’ll use Chat GPT and try to understand and visualize the data from here: radufromfinland.com/data/info.txt On this channel I normally do JavaScript tutorials, but this time we’ll go with what Chat GPT...
How to Fake data in Apps
zhlédnutí 2,8KPřed měsícem
Hey, everyone! In this tutorial, I'll show you a simple trick using browser developer tools to generate fake data in Gmail. It's a handy technique to capture screenshots without exposing any personal information. Whether you want to share your screen for tutorials, presentations, or just to keep your sensitive details private, this method works like a charm! 🔒 Learn how to safeguard your privac...
Fine-Tuning the Racing Game with Self-driving Cars [Understanding AI - Lesson 15 / 15]
zhlédnutí 1,8KPřed měsícem
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html Welcome to the grand finale, Lesson 15 of the "Understanding AI" course! In this concluding update, we'll add some finishing touches to our racing game. We'll play around with styles to give the game a polished look, integrate cars into the minimap, explore a simple collision handling method, and finally, I'll share a neat trick ...
Camera Input for Racing Game in JavaScript [Understanding AI - Lesson 14 / 15]
zhlédnutí 3,4KPřed měsícem
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html In Lesson 12 of the "Understanding AI" course, join me in implementing camera controls for our racing game using the marker detector code we built in the previous tutorial. This innovative approach will elevate your gaming experience as we delve into using marker centroids to determine tilt, allowing for dynamic control within th...
Detecting Colored Markers with JavaScript [Understanding AI - Lesson 13 / 15]
zhlédnutí 4,1KPřed měsícem
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html Remember those early mobile games where you could steer by tilting the phone? In this video, I'll guide you through using the device orientation sensor to capture tilt movements. It's a fantastic technique that opens up a world of possibilities for game control. Let's explore the potential of this feature not just for games, but ...
Tilt Control for JavaScript Games [Understanding AI - Lesson 12 / 15]
zhlédnutí 2,5KPřed 2 měsíci
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html Remember those early mobile games where you could steer by tilting the phone? In this video, I'll guide you through using the device orientation sensor to capture tilt movements. It's a fantastic technique that opens up a world of possibilities for game control. Let's explore the potential of this feature not just for games, but ...
3D Objects in JavaScript - No Libraries [Understanding AI - Lesson 11 / 15]
zhlédnutí 2,5KPřed 2 měsíci
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html In Lesson 11 of the "Understanding AI" course, I'm thrilled to unveil the magic of 3D extrusions in JavaScript. Today, I'll guide you through the process of making elements pop up in the third dimension, a technique commonly known as extrusion. And when I say everything, I mean it - from buildings and cars to road borders. But he...
3D Camera in JavaScript - No Libraries [Understanding AI - Lesson 10 / 15]
zhlédnutí 4KPřed 2 měsíci
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html In Lesson 10 of the "Understanding AI" course, I'm excited to teach you how to implement a unique perspective in your self-driving car project: one from the car's viewpoint. The fascinating part? We won't be using any libraries to achieve this effect, as the underlying math is surprisingly straightforward. I believe understanding...
Procedural Sounds for Games with JavaScript and WebAudioAPI [Understanding AI - Lesson 9 / 15]
zhlédnutí 2,3KPřed 2 měsíci
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html Welcome to Lesson 9 of the "Understanding AI" course, where I'll guide you through the exciting process of creating procedurally generated racing game sounds using JavaScript and the WebAudioAPI. In this video, I'll teach you how to generate sound from scratch, starting with a simple beeping noise that we can play at different fr...
AI Racing Game in JavaScript [Understanding AI - Lesson 8 / 15]
zhlédnutí 2,6KPřed 2 měsíci
PLAYLIST: czcams.com/play/PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81.html Welcome to Lesson 8 of the "Understanding AI" course, where I'll guide you through the process of transforming a self-driving car simulation into an exhilarating racing game using JavaScript! In this tutorial, I'll show you how to take control of the main car while letting AI handle the others. We'll implement crucial features li...
⭐🏆⭐PRIZES: Racing AI Competition⭐🏆⭐ DEADLINE: May 15ᵗʰ 2024
zhlédnutí 2,5KPřed 3 měsíci
When designing your AI car, you can use the playground as instructed previously, but you are not limited to it as long as you produce a compatible “.car” file. This extra freedom comes with a warning: changing car specifications like the max speed, acceleration, friction is not allowed and you will be disqualified if you attempt to do so. You are only allowed to modify the sensors configuration...
Using Dijkstra's Shortest Path With AI [Understanding AI - Lesson 7 / 15]
zhlédnutí 1,8KPřed 3 měsíci
Using Dijkstra's Shortest Path With AI [Understanding AI - Lesson 7 / 15]
Dijkstra's Algorithm in JavaScript [Understanding AI - Lesson 6 / 15]
zhlédnutí 3,7KPřed 3 měsíci
Dijkstra's Algorithm in JavaScript [Understanding AI - Lesson 6 / 15]
Understanding AI - Lesson 5 / 15: Navigating to Target
zhlédnutí 2,6KPřed 3 měsíci
Understanding AI - Lesson 5 / 15: Navigating to Target
Understanding AI - Lesson 4 / 15: Where Extra Dimensions Come From?
zhlédnutí 2,6KPřed 4 měsíci
Understanding AI - Lesson 4 / 15: Where Extra Dimensions Come From?
Understanding AI - Lesson 3 / 15: Multilabel Neural Networks
zhlédnutí 3,5KPřed 4 měsíci
Understanding AI - Lesson 3 / 15: Multilabel Neural Networks
Understanding AI - Lesson 2 / 15: Hidden Layers
zhlédnutí 4,6KPřed 4 měsíci
Understanding AI - Lesson 2 / 15: Hidden Layers
Understanding AI - Lesson 1 / 15: A Simple Neural Network
zhlédnutí 17KPřed 4 měsíci
Understanding AI - Lesson 1 / 15: A Simple Neural Network
Drawing the YinYang with JavaScript
zhlédnutí 1,6KPřed 5 měsíci
Drawing the YinYang with JavaScript
Drawing the Twitter Logo with JavaScript
zhlédnutí 2,1KPřed 5 měsíci
Drawing the Twitter Logo with JavaScript
Coding a Spinning Canvas App with JavaScript
zhlédnutí 2,1KPřed 5 měsíci
Coding a Spinning Canvas App with JavaScript
Drawing CIRCLES in 10 Different Ways with JavaScript
zhlédnutí 2,6KPřed 5 měsíci
Drawing CIRCLES in 10 Different Ways with JavaScript
Coding Sorting Visualizers with ChatGPT and JavaScript
zhlédnutí 2,8KPřed 5 měsíci
Coding Sorting Visualizers with ChatGPT and JavaScript
A Virtual World - JavaScript Course: Final Lesson [Coding a MiniMap with JavaScript]
zhlédnutí 6KPřed 6 měsíci
A Virtual World - JavaScript Course: Final Lesson [Coding a MiniMap with JavaScript]
A Virtual World - JavaScript Course: Lesson 10 / 11 [OpenStreetMap Tutorial]
zhlédnutí 8KPřed 6 měsíci
A Virtual World - JavaScript Course: Lesson 10 / 11 [OpenStreetMap Tutorial]
A Virtual World - JavaScript Course: Lesson 9 / 11 [Self-driving Car Integration]
zhlédnutí 6KPřed 7 měsíci
A Virtual World - JavaScript Course: Lesson 9 / 11 [Self-driving Car Integration]
A Virtual World - JavaScript Course: Lesson 8 / 11 [Saving the World]
zhlédnutí 3,4KPřed 7 měsíci
A Virtual World - JavaScript Course: Lesson 8 / 11 [Saving the World]
A Virtual World - JavaScript Course: Lesson 7 / 11 [Road Marking Editor with JavaScript]
zhlédnutí 4,7KPřed 7 měsíci
A Virtual World - JavaScript Course: Lesson 7 / 11 [Road Marking Editor with JavaScript]

Komentáře

  • @pizdaxyu
    @pizdaxyu Před 4 hodinami

    very nice birds-eye-view of starting, expanding, refactoring process!

  • @omeralishin
    @omeralishin Před 14 hodinami

    Amazing👏

  • @vincenzodamico3054
    @vincenzodamico3054 Před 16 hodinami

    💙💙💙💙💙💙💙💙

  • @James2210
    @James2210 Před 16 hodinami

    So what is this shape? Tetracontaoctagon! Actually, how does this work with shapes of odd numbers of vertices? You can't draw a line straight across that way

  • @ChandrashekarCN
    @ChandrashekarCN Před 17 hodinami

    💖💖💖💖

  • @learningjoe1823
    @learningjoe1823 Před 18 hodinami

    How can I be good as you are ? I've to Google for most of the time. Not able to create creative intuition. Feeling depressed 😔. Please reply.

  • @therocketmanshow847
    @therocketmanshow847 Před 19 hodinami

    Interesting video, liked it!

  • @DanielJoseAutodesk
    @DanielJoseAutodesk Před 20 hodinami

    Someone once said: "A good professional does not work out of obligation. He works because he likes what he does. " .... And you in a moment of distraction, showed that we can always practice new things, while having fun doing it ....😁👍

  • @AZHARakaGoat
    @AZHARakaGoat Před 20 hodinami

    Thanks

  • @Shalaby2002
    @Shalaby2002 Před 20 hodinami

    I have completed both Phase 1 and Phase 2 of the project. However, I need to document specific results related to this project for academic purposes, as I am incorporating this into my graduation project. Thank you once again; the journey and the knowledge gained have been amazing. I must admit, you've debunked the myth that "Sentient AI is a Myth"-hahaha!

  • @mr__mh9669
    @mr__mh9669 Před 2 dny

    am i going to land a job with 150K a month xd just kidding thanks for the content im about to start learning with you and i want to see what other ppl think of this course

  • @TheTeamofMuhammad
    @TheTeamofMuhammad Před 2 dny

    Wow! Build this themes if you can! ( Vanilla JS with OOP)! 1. Video Player like CZcams (All functionality) (Responsive), (Preview), (Quality change) etc....; 2. Image Editor (Cropper); 3. Video Editor 4. Custom range slider |=============O===============| don't use <input type="range"/>

  • @CTFlink
    @CTFlink Před 3 dny

    That's a sub and a like right there. I'm 39 and really appreciate a chance to learn the fundamentals in a more calm way.

  • @2difficult2do
    @2difficult2do Před 3 dny

    Excellent explanation, clear demonstration and flawless execution I love your videos filled with useful information. Thank you!

  • @tebunia
    @tebunia Před 3 dny

    Thanks!

  • @quantummath-1b2a
    @quantummath-1b2a Před 3 dny

    I followed your exact code and for some reason i couldn't get the first "bestCar" to turn(it just goes forwards until it crashes).

  • @BledTech
    @BledTech Před 4 dny

    Awesome tutorial!

  • @enjoysharingcaring
    @enjoysharingcaring Před 5 dny

    This is the best way, I have ever seen.

  • @tithos
    @tithos Před 5 dny

    looks like the orange circle is raising in the air

  • @tithos
    @tithos Před 5 dny

    I would call the "pedals" satellites

  • @quantummath-1b2a
    @quantummath-1b2a Před 5 dny

    I followed your code until 19:36 and this is what happened: Uncaught SyntaxError: Unexpected token '(' car.js:8 Uncaught ReferenceError: Controls is not defined at new Car (car.js:8) at main.js:5 please explain my code: car.js: class Car{ constructor(x,y,width,height){ this.x=x; this.y=y; this.width=width; this.height=height; this.controls=new Controls(); } update(){ if(this.controls.forward){ this.y-=2; } if(this.controls.reverse){ this.y+=2; } } draw(ctx){ ctx.beginPath(); ctx.rect( this.x-this.width/2, this.y-this.height/2, this.width, this.height ); ctx.fill(); } } controls.js: class Controls{ constructor(){ this.forward=false; this.left=false; this.right=false; this.reverse=false; this.#addKeyboardListeners(); } #addKeyboardListeners(){ document.onkeydown=(event)=>{ switch(event.key){ case "ArrowLeft": this.left=true; break; case "ArrowRight": this.right=true; break; case "ArrowUp": this.forward=true; break; case "ArrowDown": this.reverse=true; break; } console.table(this); } document.onkeyup=(event)=>{ switch(event.key){ case "ArrowLeft": this.left=false; break; case "ArrowRight": this.right=false; break; case "ArrowUp": this.forward=false; break; case "ArrowDown": this.reverse=false; break; } console.table(this); } } } index.html: <!DOCTYPE html> <head> <title>Self-driving car - No libraries</title> <link rel="stylesheet" href="style.css"> </head> <body> <canvas id="myCanvas"></canvas> <script src="controls.js"></script> <script src="car.js"></script> <script src="main.js"></script> </body> </html> main.js: const canvas=document.getElementById("myCanvas"); canvas.width=200; const ctx = canvas.getContext("2d"); const car=new Car(100,100,30,50); animate(); function animate(){ car.update(); canvas.height=window.innerHeight; car.draw(ctx); requestAnimationFrame(animate); } style.css: body{ margin:0; background:darkgray; overflow:hidden; text-align:center; } #myCanvas{ background:lightgray; }

  • @r-i-ch
    @r-i-ch Před 6 dny

    Great stuff. I’m now going to be saying the word “lerp “ all the time.😂 Is there an easy way to animate the flowers rotating?

    • @dan-florinchereches4892
      @dan-florinchereches4892 Před 5 dny

      I would say that you can try to replace the start and endpoints of the outer circle from 0 to 2PI instead to have a starting point dependant on the t variable. Say you want to have a rotation period T of 20 sec then you can add (t modulo T)/T * 2 * math.pi to both start and endpoints to the arc that has circle dashes on it. Not sure how you do modular arithmetic in Java and too lazy to check.

  • @scottonanski4173
    @scottonanski4173 Před 6 dny

    HEY! Where's the coding with Radu theme song!?!?!?

  • @paulehrig6414
    @paulehrig6414 Před 6 dny

    Terrific project and design! Your explanation is first rate! Keep making these cool projects!!!

  • @omeralishin
    @omeralishin Před 6 dny

    WOW! Amazing

  • @DanielJoseAutodesk
    @DanielJoseAutodesk Před 6 dny

    What crazier thing 😵😵Clearly one has the impression that the central circle changes. But it does NOT change .. How crazy. 😵🤪I liked the tip to put the name of the variables in the body of the call of a function. This makes it much easier to understand the code.😁👍

  • @ur4me0
    @ur4me0 Před 6 dny

    Nice title song 😊

  • @All-about-te
    @All-about-te Před 6 dny

    🤍

  • @adilsonbuset738
    @adilsonbuset738 Před 7 dny

    Très bon professeur Radu. Merci

  • @alwysrite
    @alwysrite Před 7 dny

    love how you walk though everything from scratch- great stuff as always - thankyou

  • @ahmad-murery
    @ahmad-murery Před 7 dny

    Using line dashes is a clever idea, Why complicating things when it can done by a couple lines of code. That was a fun little project and I hope you do more stuff like this. Thanks Radu!

  • @yusuf.isyaku
    @yusuf.isyaku Před 7 dny

    I laughed out loudly when the animation started, it was like magic. Thank you Radu

  • @Merilix2
    @Merilix2 Před 7 dny

    What you are doing here reminds pretty much on few startreck tng episodes where the crew is asking the computer to create and modify a holodeck simulation. Crazy, isn't it?

  • @Frankslaboratory
    @Frankslaboratory Před 7 dny

    I like when you make projects like this. Always fun to follow along

    • @All-about-te
      @All-about-te Před 6 dny

    • @Radu
      @Radu Před 2 dny

      Glad to hear :-) Looks like we switched content recently: you do more elaborate projects and I do simpler ones. I will have to catch up on your content after the holiday.

  • @Abbatyya
    @Abbatyya Před 7 dny

    Thank you sir 🫡

  • @nishthascoding2889
    @nishthascoding2889 Před 7 dny

    You are great

    • @Radu
      @Radu Před 7 dny

      Thanks :-)

  • @volodyslove
    @volodyslove Před 7 dny

    Wonderful lesson😁

    • @Radu
      @Radu Před 7 dny

      Glad you liked it :-)

  • @arupde6320
    @arupde6320 Před 7 dny

    GitHub ???

  • @AZHARakaGoat
    @AZHARakaGoat Před 7 dny

    ❤🎉

  • @amitkumarjha3809
    @amitkumarjha3809 Před 9 dny

    Please can you make a tutorial on this?

    • @Radu
      @Radu Před 8 dny

      What exactly do you mean?

    • @amitkumarjha3809
      @amitkumarjha3809 Před 7 dny

      @@Radu How have you created this project using HTML, CSS, and JS? I want that.

    • @Radu
      @Radu Před 7 dny

      @@amitkumarjha3809 ah, you mean that tool where you move the marbles and do the operations? It wasn't easy :-/ and making a tutorial about it will be even harder. I don't think it's worth it... not many people need this, I think...

    • @amitkumarjha3809
      @amitkumarjha3809 Před 7 dny

      @@Radu OK