Grid From For Loops

user_avatar
Made by: Jack8680 developer

PROJECT DESCRIPTION

Share this project:

A project that allows generating a grid from for loops. The advantage of this is that behaviours for each grid square only have to be put in one object, reducing project size and making it easier to put behaviours in. It is also useful because the grid size can be modified by changing the rows and columns, the screen width and height box containers, and the scale of the grid squares. Can be used to create a maze generator (although I would recommend doing that differently), a pixel art tool, or anything else that uses a grid. Use the download link http://bit.ly/292mnk8 to download it so it won't say branched when you upload it. All behaviours and box containers are in world. Put behaviours for the grid squares in the empty object. Anyone may use this, no credit is required.

VERSION 1.0

Last Updated: June 28, 2016

COMMENTS

YOU MUST BE SIGNED IN TO LEAVE A COMMENT

June 30, 2016

Pretty cool I think! I could've probably made this myself, but I didn't look at the behaviors yet. I'm making a level creator for my game that uses a grid, but since it's just for organizational purposes and it's invisible I won't have reason to use this. I think it could definitely help others though!

June 30, 2016

Yeah, this would be easy to make, but I tried to make it compact and efficient, so it just uses one for loop. I realised though that nested for loops might have been simpler.

June 30, 2016

Well, the more for loops you use, the slower and less efecient it starts to become, especially when you have over 5 nested together. I think you handled it correctly.

July 01, 2016

It would still run the same amount of times though, with less behaviours in the actual loop, so I don't really know what is more efficient.

July 01, 2016

Oh yeah... Ok, well that's worth experimenting with!

June 28, 2016

@MePlayMan @CodingPhoenixTM @Aidan Oxley

Here is how to use for loops to generate a grid in one go. Advantages over using a pre made grid are in the description, but if you want a simple way to do it (but less efficient), you can use what @iSmart Games suggested and use started touching on a group.