Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help with procedurally generating scripts
- Mondka
-
18 posts
Help with procedurally generating scripts
Hi, I need help with making a script that generates rooms/areas randomly (I would prefer one for an area). I want to make a game where areas generate out of view from you so it seems infinite.
- memanuelhe
-
100+ posts
Help with procedurally generating scripts
What type of games are you making? To be able to generate random stuff, you would need to use the random operator
(pick random () to (10))To generate something out of view, you would have to resize sprites to a massive size, then move them to the location you want, then you resize it back. Here is an example:
hide
set size to (1000000) %
go to x: (x) y: (y)
set size to (100) %
show
Last edited by memanuelhe (Jan. 24, 2023 12:12:17)
- Mondka
-
18 posts
Help with procedurally generating scripts
i'm trying to make a backroom's top-down game. Would that info help?
- memanuelhe
-
100+ posts
Help with procedurally generating scripts
If you are trying to make what I think you are making, you should try reading about maze generation: https://en.wikipedia.org/wiki/Maze_generation_algorithm and implement it into the game and make the game have no border on the maze, and it will only start generation around the areas you are close to. It may seem hard, but try to first create a game with a random generated maze, and then move forward from there. If you need more help, I could show you how to continue forward from where you stand.
- Mondka
-
18 posts
Help with procedurally generating scripts
ok thanks, i'll tell you if i need more help!
- Discussion Forums
- » Help with Scripts
-
» Help with procedurally generating scripts