Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Is there any way to have the whole layout split into a grid with its own X and Y values? The grid would obviously be made of squares bigger than a single pixel.
Do you just want to show a grid, or display objects snapped to a grid?
Snapping to a grid is easy, just set every object's X and Y to:
round(Object.X / 32) * 32
round(Object.Y / 32) * 32
where 32 is the size of the grid cell.
Just another quick question, if the objects are snapped to a grid, if an object is one cell above another (say obj1.y=1 & obj2.y=2 on the grid) would they still be considered touching (for any collision events)?
Develop games in your browser. Powerful, performant & highly capable.
I'm not sure, try it and see. You might want to compare positions directly instead of testing for collisions anyway.