I’m Still Alive…

I haven’t posted any updates in 8 days. That’s because I’m writing the AI for enemy programs. It’s probably the hardest part, and involves abstract things like working out routes to the player’s programs, deciding which one to attack etc., so I can’t easily post videos or screenshots that show what I’ve done.

Currently I’ve gotten as far as working out which squares the programs could move to to get within attacking range. Now I’m writing a function that decides which of those squares to move to and which program to attack, based on how many sectors the player’s programs have, the attacking strength of the enemy program, and the health of the enemy program. After that I’ll make the attacks functional for both player and enemy programs, then I’ll probably be able to make a few playable levels.

The enemy AI is unique in that it’s harder to replicate than other things. For almost everything else, all the levels, programs, etc. in the original Nightfall Incident, I can clearly see the information I need just by running the game. (I completed it so can access all the levels) For the enemy AI, I can see what programs do and where they move, but I can’t see the logic that made those decisions. This means it’s nearly impossible to exactly recreate the AI.

Instead I’m creating my own that moves towards programs in a similar way, but tries to be smart with deciding which programs to attack. For example, imagine there are two player programs with two and three sectors respectively, and two different enemy programs with attacks that remove two and three sectors respectively. If the enemy programs choose their victims arbitrarily, it may well end up with the three sector enemy program attacking the two sector player program and vice versa, killing the two sector program but leaving the former three sector program with one sector. However, if it’s smart about its decisions, the three sector enemy program will attack the three sector player program and vice versa, killing them both and winning the game for the enemy.

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