Coding The Trolley Problem in JavaScript @Radu
Coding The Trolley Problem in JavaScript  @Radu
Uploaded July 2024 | Updated September 2026, 2 weeks ago
Join me on another coding adventure as I turn my train simulation into a fun and ethical dilemma game about the trolley problem! 🚂🐱 In this video, I demonstrate how to create a game where you must divert a train to save a cat, using JavaScript and HTML Canvas. Perfect for beginners and experienced coders alike, this tutorial walks you through:

Highlights:
- Drawing and animating a train along curved tracks
- Implementing the trolley problem scenario with a cat emoji as the victim
- Using keyboard controls to switch tracks and avoid game over
- Adding a scoring system and increasing difficulty with each round
- Styling and refining the game's appearance and functionality

Try out the final game on my website and share your scores with me on Twitter or Discord. Like, comment, and subscribe for more coding projects and challenges!

GAME: radufromfinland.com/projects/trolleyproblem
Coding The Trolley Problem in JavaScriptJavaScript CHALLENGE! Denoise Bad Apple 🍎Understanding Data with AI (ChatGPT 3.5 and Python)⭐Creative Coding Competition⭐ (Competition Ended)🚙Self-driving Car🚗🚙🛺MANY CARS🛺🚙🚗 Easter Egg 🐰🎅How to Screenshot a Web Page with Chrome DevToolsMachine Learning Course - Lesson 3: Feature Extraction and Visualization in JavaScriptDevice Orientation with Vanilla JavaScript (Vintage Hologram Effect)Strandbeests in JavaScript - Part 1🚙Self-driving Car🚁HELICOPTER🚁 Easter Egg 🐰🎅Text and Images on HTML CanvasMachine Learning Course - Lesson 10: Homework Review and Data Cleaning
Radu Mariescu-Istodor |

Coding The Trolley Problem in JavaScript

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER