I Have Movement

Not only have I made the programs move, I’ve also made them avoid other programs and empty squares. See the video:

I did this by storing the layout of the grid in a 2-dimensional array. When the player selects a program, the script gets the 4 surrounding spaces, determines which of them are empty squares, and displays the movement overlay squares accordingly. When the player clicks on one of those squares, it clears them, moves the program node to the clicked square, updates the level array, and repeats the process.

Because it also builds the level from the level array at the start of a battle, people should be able to make their own levels by editing a text file. I might add a level editor at some point.

Next I’ll work on either limiting the movement based on the program’s speed, or adding sectors to the programs.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s