As of writing this, we're mid-way through week 3 (week 3.5, if you will) of the UK Lockdown, and I have to say, it feels a whole lot longer.

But that's besides the point. A lot of people are feeling the pressure, a lot of businesses are. People have lost their jobs, work has slowed down significantly and people are adjusting to the "new norm".
I've always worked from home, not much has changed in that aspect, but it is difficult to see people struggling in these times, whether it be friends, family, my clients or just strangers on the street.

It doesn't help that people are treating this like an extended holiday.

What's the point I'm trying to make

Yes... sorry, my mind started to wander.

Essentially, it's important to be productive.
Perhaps there are some DIY or home improvements you've been wanting to do, perhaps it's time for a spring clean (trust me, it is rewarding to be able to clear the clutter and sit down in a fresh, clean, tidy home), or (hear me out) it's time to start working out, or even try your hand at a new/favourite hobby (cooking, baking, reading, etc.).

I've had a few projects which I've been working on, and since I've had more "free time" lately, I've been picking those back up.

One of which is Distraction Tactics.

Distraction Tactics is a small "indie" game development studio which focuses on working with freelancers and self-employed people in order to come together and make games.
There are a few games in development right now, and the outlook is optimistic on these.

This project really was a delight to work on. I learnt a lot by working on the site, and I think I am actually proud of it (which is a rarity for me, being a perfectionist).

The funny/annoying thing is that whilst finishing up the site (and I mean literally, as I was about to hit "deploy"), I had a bold, new idea... "why don't I used CSS Grid for this problem I faced? Why don't I rebuild the site with CSS Grid?"

No. Just no. Don't ever do this, because you'll get stuck in an endless cycle and nothing will ever get finished.
If it works, great, stick to it, and use your new idea for the next project.

Anyway, please go check out the site (I'll be adding it to the portfolio at some point), and constructive feedback is welcome.

And as per usual, shameless plug below.

What is "Artificial Intelligence"?

A quick Google search brings me this:

The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages.

Google: "define artificial intelligence"

So what does this mean for Games Design (shocker, an article on a different subject)?

The way I see it is that it basically means how the game reacts and interacts with the player. This could be enemy spawn rates, aggro'ing, or changing the difficulty based on the player's performance.

What about "learning AI"?

I wouldn't say that is much different than "regular AI", except for it saves it's previous interactions, the actions and results, and then aims to figure out what the best possible solution is to reach it's set goal.

Let's use Mario for an example.

There are a lot of power-up blocks in any one of the games.
The AI could have some code to track how the player's interact with these blocks. It could save which power-ups are more desirable based on this info (i.e. players will go for the Tanooki Suit over the Fire Flower).

Now, say the game had a "Random Block", which would put in a random power-up. It could use the data collected to see what the player's preferences are and fill that block with their preferred power up.

Using another Random Block scenario, say that the player can see what the power-up will be. The AI could randomly fill the block and record if player's grab the Power Up or not; it could then optimise it's selection process to fill the block with the more popular power-ups.

Any other examples?

There is at least one game which I've played (the name of which I've forgotten) where if you die too many times, it asks if you want to change to an easier difficulty.

This, is a part of AI. It takes some values (i.e. the number of consecutive deaths) and makes a decision (i.e. the prompt to change difficulty).
It's a small thing, and very basic, but it's a part of it.

The difficulty setting in of itself can be a complex process or very basic.
I.e. changing enemy stats so they hit harder and take longer to defeat, turning on/off features, or even making enemies "smarter" by running around obstacles and ducking for cover, rather than running directly at the player.

Those levels of "intelligence" vary.

Quick Summary

It essentially comes down to how complex you want your game to be.

Damage calculation is AI.

if(targetHit) {
  HP = HP - Damage

  if(HP < 0) {
    Die
  }
}

Spawn rate is AI.

if(EnemyCount > 10 && EnemiesKill < 25) {
  SpawnEnemy
}

Or, as I said previous, player tracking is also AI.

if(playerPos < 10) {
  moveToPlayer

  if(coverObject < 5 && playerIsGood) {
    takeCover
    wait(5s)
    shootPlayer
  }
}

So you can make it as complex as you need it to; it's all about setting some goals for what you want the game to do, and write the rules to achieve those goals.

Just don't make it so the machines set their own goals and rules... that's when they'll take over.

Classic Niall | A web design and development company, now offering web hosting!
Classic Niall Limited © 2022

Contact Us

Classic Niall Limited
The Wesley Centre, Blyth Road
Maltby, Rotherham
S66 8JD
hello@classicniall.co.uk
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram