|
-
Help with smart random level generation
Hi,
I'm trying to make a point click game, where you click the mouse in an area, and the character will walk to where you clicked. The tricky part comes in because I setup random level generation, so that the player gets a new map every time they play. I one MC for the level, which contains a grid of other MCs. Each section of the grid, or floor tile, makes itself into either 1 of 3 different patterns of floor, or an obstacle based on random integer when the game is loaded.
My question is, how could I make this so when you click somewhere, the character will find a path to the area that is clicked that bypasses any obstacles that could be in the way. Also, it should be able to determine if the area clicked is completely boxed off by obstacles and is impossible to get to.
I have been thinking about ways to do this for a few days now, and just can't wrap my head around a way to make this happen. Can anyone provide any idea, even just in pseudocode on how this could be possible?
Thank you very much
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|