Uploaded October 2025 | Updated September 2026, 2 weeks ago
Coding on a train, building something train-related again! This time, I created a toy train track generator and made it look like those from BRIO: brio.us
In this video, I show you how I:
Used HTML + Canvas to start visualizing toy train pieces
Modeled straight, curved, and split tracks with accurate geometry
Struggled with angles and styling
Added rails, knobs, flipped pieces, and a caching system for performance
It's a fun ride full of trial-and-error, creative thinking, and a surprising amount of geometry. If you love toy trains, code experiments, or just want to see what happens when someone codes on an actual train — this is for you.
Let me know if you’d want to see this developed into a proper app!
Website I used for reference: woodenrailway.info/track/track-math
⚡️Join this Channel⚡️
youtube.com/@Radu/join
☕Buy me a Coffee?☕
buymeacoffee.com/radum
#CodingOnATrain #ToyTrainTrack #CreativeCoding #BRIO #JavaScriptCanvas
Coding on a train, building something train-related again! This time, I created a toy train track generator and made it look like those from BRIO: brio.us
In this video, I show you how I:
Used HTML + Canvas to start visualizing toy train pieces
Modeled straight, curved, and split tracks with accurate geometry
Struggled with angles and styling
Added rails, knobs, flipped pieces, and a caching system for performance
It's a fun ride full of trial-and-error, creative thinking, and a surprising amount of geometry. If you love toy trains, code experiments, or just want to see what happens when someone codes on an actual train — this is for you.
Let me know if you’d want to see this developed into a proper app!
Website I used for reference: woodenrailway.info/track/track-math
⚡️Join this Channel⚡️
youtube.com/@Radu/join
☕Buy me a Coffee?☕
buymeacoffee.com/radum
#CodingOnATrain #ToyTrainTrack #CreativeCoding #BRIO #JavaScriptCanvas



![Tilt Control for JavaScript Games [Understanding AI - Lesson 12 / 15]
PLAYLIST: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81
Remember those early mobile games where you could steer by tilting the phone? In this video, Ill guide you through using the device orientation sensor to capture tilt movements. Its a fantastic technique that opens up a world of possibilities for game control.
Lets explore the potential of this feature not just for games, but for other applications too. Ill share my friends creation, Jazzman vs. Metalheadz, which showcases the versatility of tilt controls.
The applications extend beyond gaming – think about measuring tree heights or distances to distant objects. If youre interested, I have tutorials on those topics as well. Towards the end of the video, Ill demonstrate how to integrate tilt controls into our racing game, tying it back to the Understanding AI course.
So, let me steer you in the right direction for implementing device orientation in your projects. And by the way, did I mention well be doing some nononooooo again? You wont want to miss it! Like, share, and subscribe for more exciting tutorials on AI, game development, and innovative programming techniques!
💻CODE FOR THE RACING GAME PART💻
https://github.com/gniziemazity/understanding_ai
Follow Along: 7. Camera Part 2
Code After This Lesson: 8. Phone Input
💬DISCORD💬
discord.gg/gJFcF5XVn9
⭐LINKS⭐
TEST on My Website: https://radufromfinland.com/projects/phoneRacer
Self-driving Car Course: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYoJE7ZwsBQoDIG4YN9ptyY
Measuring Tree Height Tutorial: https://youtu.be/0hxNFuo5Ncc
Measuring Distance Tutorial: https://youtu.be/qjuQYFdcSxw
Jazzman vs. Metalheadz: https://play.google.com/store/apps/details?id=com.matti.mononen.jazzman
#RacingGame #RacingGameJavaScript #OrientationSensorJavaScript #JavaScriptDeviceOrientation #LearnJavaScript
⭐TIMESTAMPS⭐
00:00 Introduction
01:29 Basic Project Setup
08:15 Using Device Orientation
15:47 Using Gravity
20:25 Integrating with the Racing Game Tilt Control for JavaScript Games [Understanding AI - Lesson 12 / 15]](https://i.ytimg.com/vi/ZgjDeO_EzY4/mqdefault.jpg)



![A Virtual World - JavaScript Course: Lesson 2 / 11 [Graph Editor with JavaScript]
Welcome to the course where we build a self-driving car simulation in a virtual world. In this video Ill teach you how to build a graph editor from scratch, using basic HTML, CSS and JavaScript. The graph will act as a basis and the world will be generated according to it.
In this digital age, a good user interface should streamline interactions, minimizing the need for excessive clicks and keyboard inputs. Ill teach you how to do this when making a graph editor and how to think like this in general.
Throughout this series, Ill guide you step by step, showcasing how to build a graph editor with a primary focus on mouse interaction. The mouse is a versatile tool, and in this course, we use it to add, drag, remove points effortlessly. 🖱️
Well start from the basics, gradually implementing new features and refining existing ones, all with the aim of achieving a final logic thats not only functional but also intuitive. By the end, youll not only have a graph editor to be proud of but also the skills to customize it to your hearts content.
Have Fun! :-)
⭐PLAYLIST⭐
https://www.youtube.com/playlist?list=PLB0Tybl0UNfZtY5IQl1aNwcoOPJNtnPEO
⭐FINAL APP⭐
https://radufromfinland.com/projects/virtualworld
💻CODE💻
https://github.com/gniziemazity/virtual-world
1. Spatial Graphs = follow along
2. Graph Editor = code after this lesson
⭐ALL PREREQUISITES⭐
https://www.youtube.com/playlist?list=PLB0Tybl0UNfZ3nnHVg8SJ4uK3R4QD6R0H
⭐Pythagorean Theorem Video⭐
https://youtu.be/iqSlzYXdFzw
☕Buy me a Coffee?☕
https://www.buymeacoffee.com/radum
⚡️Join this Channel⚡️
https://youtube.com/@radu/join
⭐Timestamps⭐
00:00 Introduction
01:09 Top-level Code Structure
03:21 Adding Points
06:06 Selecting Points
17:35 Removing Points
22:05 Dragging Points
24:54 Creating Segments
35:03 Debugging / Fine-tuning A Virtual World - JavaScript Course: Lesson 2 / 11 [Graph Editor with JavaScript]](https://i.ytimg.com/vi/_HkGH2WN_Tg/mqdefault.jpg)
![HTML Canvas Mouse Interaction
We learn how to interact with the mouse on an HTML Canvas.
Course playlist:
https://www.youtube.com/playlist?list=PLB0Tybl0UNfb6BvBPePaiCNOFpzxeE86R
⭐ MY CANVAS PROJECTS ⭐
1. Matrix Camera Effect https://youtu.be/GmB0ge-CuZo
2. Self Driving Car https://youtu.be/NkI9ia2cLhc
3. Puzzle Cam https://youtu.be/Z6fQtNpB3hU
4. Many more on my channel [ Its mostly about that :-) ] HTML Canvas Mouse Interaction](https://i.ytimg.com/vi/_KqjrGHSUew/mqdefault.jpg)

