Hi all,
I am working on simple game in which we have to create a word by using scattered Letter.
For that,I have to create a 7X7 grid. I want know, what is best possible way to do that in cocos2d.or can i u an Image of grid?
please guide me.
How To Draw grid?
(4 posts) (4 voices)-
Posted 2 years ago #
-
You could draw lines with opengl.
But if you want it to look nice you could create an sprite for the grid's lines and place them accordingly.If the grid is just acting as a background you could use just an sprite image for that, i think.
Posted 2 years ago # -
Hi,
If I need to access the each cell of the grid, what should I take.
I have 5x5 grid. I need to move objects in the grids like chess game. How can I access each cell of the grid ?
Which is better cocos2d or openGL or both are same ?
Thank You.Posted 1 year ago # -
You can technically use a tilemap and see if a particular point is within a tile which would tell you what point of the grid you're in.
You can also draw the grid yourself via openGL's primitive drawing functions and do your own calculations to see if a particular point is within the bounds of one of the grid's boxes.
Posted 1 year ago #
Reply
You must log in to post.