ScratchData LogoScratchData
Back to b9e's profile

Drift Sim 9 - edit best time

B9b9e•Created May 15, 2024
Drift Sim 9 - edit best time
245
239
14932 views
View on Scratch

Instructions

EDIT BEST TIME Sometimes the cloud variable system is down in Scratch, in this case use TurboWarp: https://turbowarp.org/1020391403 (Don't forget to change username!) Some improvements: + Pause Race, step back in time, continue + Pause Replay, edit, continue + Copy race to replay + Copy, edit and paste records + Replay World Record (info below) + Replay my best + Ghost car: last replay + New map: Paris, roundabout, 9 laps drifting + Drifting score decreases time! + More precise checking of checkpoints + Start direction (ex. in Tokyo) + Smoke and tyre mark improvements + Less rebound off the rail (not a bumper car) + Lap display + Smoother display + Keyboard in menu: press space or enter key to race + Select car with left - right keys + Cars settings + Next song tape cassette handling sounds + Pause / play music Replay WR drift: It's easy, store position and direction for all frame! The limitation of the cloud variable is 256 max. length only digits. A drift takes around 50 seconds, it contains 50x30=1500 frames. Each frame contains x y and direction data, at least 3+3+3=9 digits, so a whole drift requires 1500x9=13500 digits... It's a bit greater than 256. But, it is enough to store the pressed buttons for each frame. For the pressed keys you can use only one digit. There are 4 keys with 2x2x2x2=16 possible cases but you can't press left and right arrow in the same time (it means +1-1=0), so the cases are reduced to 9, only one digit. See the "possible inputs" list in the "player collider" sprite. So 1500 frames, 1500 digits, but that's still too much. It contains a lot of repetition. You don't have to change the pressed keys too often during the game. You can store only the duration (frames) of the pressed keys: one digit for the buttons and two digits for the duration. "208" means 2=gas and 08=8 frames duration. The longest record contains 523 digits, so it requires two cloud variables. We have 10 cloud variables, the project uses 9: one for the high scores and 8 for the WR drifts of 4 maps. Copy, edit and paste record: 208 = gas for 8 times. The time is always 2 digits. Keys: 1=brake 2=gas 3=brake+left 4=left 5=gas+left 6=brake+right 7=right 8=gas+right 9=nothing. Oh I think I started a contest to create the perfect race... A record is short enough to fit in a comment. One more thing: Scratch doesn't like multiple cloud variables changing at the same time, you have to wait a little time between them, according to the description 0.1 seconds. Update: cloud variables are currently out of order... #drift #sim #replay #drifts #game #games #drifting #car #race

Description

Very good idea and design, thanks @surlo_gamez !

Project Details

Project ID1020391403
CreatedMay 15, 2024
Last ModifiedApril 25, 2025
SharedMay 16, 2024
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root