I found out how to replay matches in scratch games, being able to play them like a video player, and even live streaming them! Recently, I have been thinking about how to replay a match with a short code in scratch games. I found out games like platformers or shooters matches are hard to be replayed, due to the amount of data need to be stored. However, I found it possible to replay a match of tower defense. In a tower defense game, there are two things: the enemies and the towers. All enemy data are stored in the project, so you don’t need to store them in the code. Towers are built by the players, thus we have to store the tower data in the code. Towers have 3 variables, type, x and y that have to be stored. Let’s assume that there’re 10-99 type of towers, so the type variable will occupy 2 digits in the code. For x and y, in order to shorten the code length, we’re making the game tile based. Let’s assume that there’re 10-99 tiles on both the x and y axis. (which means there are 10x10 to 99x99 tiles in total) The x variable will then take up 2 digits in the code, and same for the y variable. In total, we need 6 digits for each tower. Let’s assume that the player has built 20 towers. 6*20 = 120. And don’t forget to put the wave number to the code too. 120+1 = 121. That’s pretty short. But, how do we fast forward? In most pen projects, people usually run the graphics rendering in a forever loop. The amount that the loop runs every second is equal to the FPS. Let’s assume that FPS = 30. If you want to skip to 5:00, you simply need to run the loop 30*5 = 150 times. What about live streaming the gameplay? Well, the easiest way is to set a cloud variable as the code once, and others can start playing the video with the data stored in the cloud variable. Please, if you find this concept useful, be sure to love, favorite and follow my main @icmy123. - icmy123