ScratchData LogoScratchData
Back to fancy_finn9's profile

Self-driving Cars

FAfancy_finn9•Created July 9, 2023
Self-driving Cars
2
1
15 views
View on Scratch

Description

A very simple project created in an hour and half. Probably the most random thing I could have done, tbh. But it works!... somewhat. (ℹ) While the cars do include code on what happens when it crashes, this will rarely happen on its own. ==== CONTROLS ==== Click: spawn car ==== WHAT ACTUALLY HAPPENS ==== The car moves forward 3 steps, then checks the following colors and does actions in the following order: LIGHT BLUE (car) touching ORANGE (explosion): you've touched an explosion, so explode too. LIGHT BLUE (car) touching LIGHT BLUE (car): you've crashed, so explode! WHITE (front sensor) touching LIGHT BLUE (car): dangerously close to a car, mate, so back up, turn, and wait a second. WHITE (front sensor) touching WHITE (front sensor): you're close to another car, so back up a bit, turn, and wait a random amount of time under a second. RED (2nd front sensor) touching GREEN (grass): you've managed to crash head-on into something that the side sensors haven't touched, so back up and turn. BLUE (right sensor) touching GREEN (grass): turn left, mate. YELLOW (left sensor) touching GREEN (grass): time to turn right. Because of the random wait time if two white sensors collide, you don't get a repeating loop of the two cars attempting to move at the same time. This means that the traffic jam will (eventually) clear up. #games #all #fancyfinn9 #self-driving #cars #road #sensors

Project Details

Project ID873183797
CreatedJuly 9, 2023
Last ModifiedNovember 4, 2023
SharedJuly 9, 2023
Visibilityvisible
CommentsAllowed