Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Placing an item in the maze

A topic by Retchy created May 26, 2023 Views: 78 Replies: 2
Viewing posts 1 to 3
(2 edits)

Hey Lucas, thanks so much for this, it's really helping me out! However, I'm trying to figure out how to place an item for the player to get to as a reward, at the furthest away dead end from the single entrance I'm using. Any idea how you'd do that? I've tried utilizing the DEAD_END variable in the recursive version but there seems to be loads of them and I can't figure out how to just use one. Any help would be really appreciated!

Thanks,
Graeme

Developer

Hi! I'm glad you liked the maze generator.

What I would do is create an array/list with all of the DEAD_END and then try to figure out which one is the farthest away. Not an ideal solution, but maybe the easiest one would be to check the distance in a straight line from the entrance, and choose the one with the greater distance, I think you would get pretty close to the farthest one and it is quite simple to check for that.

Sorry I can't help you more, it's been a while since I programmed in GameMaker, good luck with your project!

Thanks Lucas, yeah I figured it'd be something like that, I'll give it a go, cheers!