ScratchData LogoScratchData
Back to Torqueboostjr's profile

Infinite World Generation Test

TOTorqueboostjr•Created August 14, 2020
Infinite World Generation Test
1
1
56 views
View on Scratch

Instructions

TURBO MODE REQUIRED!!!!! REFUSING TO PLAY IN TURBO MODE WILL CAUSE VERY SLOW MOVEMENT AND WORLD GENERATION AND VISUALIZATION (basically lag)!!!!! === Controls === Arrow Keys - Move (Dynamic World) Z - Load / Save World X - Exit Load / Save Screen === Controls === This is a semi-complicated program that allows for random infinite world generation. Blue tiles are water tiles, brown are dirt, green are grass, and gray is stone. None of these have any function except for aesthetics. In the future there may be a more sophisticated way for the tile types to generate in a more fluid fashion rather than a random mess. You play as the blue circle. The red arrow is the way you are facing, and the two variables shown in the top left-hand corner are your X and Y position in the world, respectively. You will notice when pressing the arrow keys the world moves around you rather than you moving around. This shows a more dynamic world perspective instead of having multiple "rooms", which also allows for more flexibility in generation of the world. ===HOW IT WORKS=== Whenever you input a movement key, and also when the game starts up, the program checks for the coordinates of every block in an 11x11 square around the player that need to be displayed on-screen. For every coordinate value found, the program displays the associated tile ID. If a coordinate value is not found, the program generates two values into the list: A position value (e.g. 5, 12 for the block there) and a tile ID value. This means every tile takes up two spaces in the list. When you load a saved file (in the editor of course), it changes every value. Of course, when you exit the loader, if you are in a position with tiles onscreen that have not been loaded on your save file yet, you will get newly generated ones.

Description

You ARE allowed to remix this project any way you please for any games you all might want to make, BUT I must be credited for the algorithm. Future Plans: - More Fluid Generation - More Tiles - Inventory - World Seed Functionality - More Fluid Movement

Project Details

Project ID417831697
CreatedAugust 14, 2020
Last ModifiedAugust 14, 2020
SharedAugust 14, 2020
Visibilityvisible
CommentsAllowed