Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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
I'm making a world generation system with an array linked to a tilemap.
On initiation, there's all of these empty holes that really annoy me. How do I identify these gaps in an array?
Develop games in your browser. Powerful, performant & highly capable.
After you finished generating the terrain, loop through all cells in the array. If current cell value is 0, check cells above (y-1), below (y+1), on the left (x-1) and right (x+1). If they all =1, then change the current cell from 0 to 1.