ScratchData LogoScratchData
Back to b9e's profile

Drift Sim 8

B9b9e•Created October 28, 2023
Drift Sim 8
290
259
23230 views
View on Scratch

Instructions

New version: Drift Sim 9 https://scratch.mit.edu/projects/1020391403/ Very good idea and design, thanks @surlo_gamez ! Some improvements: + Copy, edit and paste record (and comment) + 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 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 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 code 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. #drift #sim #replay #drifts #game #games #drifting #car #race

Project Details

Project ID915500008
CreatedOctober 28, 2023
Last ModifiedMay 19, 2024
SharedNovember 14, 2023
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root