Showing posts with label AI. Show all posts
Showing posts with label AI. Show all posts

Tuesday, 2 November 2010

Project Sunburn: AI-Subsystem (First Dronetype & AI-Manager)

We completed our first playable prototype yesterday, and it includes AI! This was the first time I worked on game AI, previous games like Needle Juice and Over Night did not include any form of AI. Luckily our enemies are robotic, not human. It's a lot easier to create a believable drone that in-fact should act as if it's programmed compared to a humanoid character running around trying to act as a sentient being. So far the main drone class, the Spider-Drone, has been implemented and is strolling around in our game. Other drone types (including flying drones) will be added later in phase 2. (started yesterday) Below I wrote a very short summary of certain AI aspects that I included so far.

A lot of the info a drone requires is processed in a global manager class. This makes it easier to spread the workload across multiple frames, avoiding frame drops. One example is the Link Availability, testing the links against active drones in the level, blocking a certain link if a drone is not moving (shooting or idle), and therefore blocking that path. This avoids unnecessary navigation errors when drones try to reach the player.

Red lines indicate the path is blocked...

Another task that is handled by the AI-Manager is tagging waypoints as cover. As certain drone variations will hide behind cover to deploy their weaponry. These kind of non critical components are updated on low frequencies to safe CPU-cycles. In addition, only waypoints near the player can be tagged as potential cover.

The Yellow waypoints are tagged as "Cover"

All drones have some kind of weaponry to use against the player. Our first drone has a light machine gun, firing short bursts of bullets. Their weapons work very similar to the player weapons, so it was easy to setup. The turret tries to maintain a solid aim at the player (limited by its rotation speed) and fires bullet salvo's while trying while trying to get closer. In addition, the lens in front, can be destroyed by a single well-aimed shot. This basically counts as a headshot and immediately disables the drone.

These are some of the highlights currently implemented as part of the AI-Subsystem. In the upcoming phase I will spend more time optimizing the current manager, add air-drones, improve path-finding and improving overall behavior of the drones.

Sunday, 10 October 2010

Effortless Waypoint & Path creation using 3D-Sketching

About 3 weeks ago, I demonstrated the Sketching in 3D Tool. Today I went a little further and expanded it to be able to create waypoints and paths for our upcoming levels without effort. Manually placing waypoints can be a tedious task, especially if your level is continuously changing in its early stages. With this new Tool we'll be able to create full AI paths in seconds, with easy tweaking after the initial waypoints are setup.


Currently there are two types of lines. WaypointLines and AvoidanceLines, the latter is used to state certain parts should simply be avoided by the AI or to break paths that are too close to geometry or ledges.