Filling up the empty blocks when the player touches the safe zone again! using cocos2d
Posted
by
user3445020
on Game Development
See other posts from Game Development
or by user3445020
Published on 2014-07-19T09:40:06Z
Indexed on
2014/08/20
4:32 UTC
Read the original article
Hit count: 162
Hi guys i am stuck with filling up the data of all the blocks which are empty like the ones in the image. As you can see there i have a pacman like object where i will be moving around.
But when you are in the empty space where there are no Blue boxes available i should be able to add new blocks in the path of my pacman and when it touches any other blue boxes like in the below case if my pacman touches the top row of the blue box i should be able to fill all the empty boxed inside the border of the path created by pacman.
For now i am using a 2d bool array to store all the filled boxed info like if there is a box inside i am making that cell in an array as true.
But how to fill the area with blue boxes after player finishes his path ?
Any help would be great thank you.
More info about this problem is here: filling the empty spaces in a certain region in a grid using c++ Same problem
© Game Development or respective owner