Grid Editor – Initial Development and the Selection Chart

To function, my grid editor needs to make a basic grid in the unity scene, within this grid there will need to be editor handles that the user can set to true or false. I do this by using a 2D bool array to store the slot values, their representations in the Scene view are then place in a grid like format. Before this could go further needed to work out how the grid determined what piece should go where.

TileCollectionCropped.png

Above is a image, showing all the variants each slot on the grid could be based on the state of it’s surrounding tiles. After making this I then created the chart seen below to determine the conditions each needs to pass to be placed. The editor script determines this by checking the boolean values of all it’s surrounding units to return a result.

TileGenratorFlowChart

With this chart done I tested out the script, the result can be seen below.

Advertisements
Grid Editor – Initial Development and the Selection Chart

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s