Potential Fields AI, 3/3: real game example.

Categories ai, code

Today I’ll write about my pretty advanced implementation of Pontential Fields AS3 library in upcoming game. This is the last part of Potential Fields AI article. It started with theory and basics in part 1. In part 2 you learned more about PFLib details and we implement RTS fighting bots demo. However, In near future I plan to port the library to few other languages and keep the update status on this blog.

Potential Fields real game example

Units in my game have their own attack behaviors. Zeppelins throw bombs at the target and drones attack with machine gun from right or left. Bots avoid collisions while being idle. They fly with different speed and acceleration and have various shot distances. It’s all running with my Pontential Fields AS3 library and Nape physic. Let me write about details! Continue reading “Potential Fields AI, 3/3: real game example.”

Potential Fields AI, 2/3: RTS bot implementation.

Categories ai, code

This is part 2 of Potential Fields AI article. In part 1 I presented you basic example of my Potential Fields AS3 library. Today we’re going to implement a game with RTS bots fighting against enemies. In part 3 I’ll describe AI details from my upcoming game.

RTS bots fighting.

Above image presents what we’re going to implement: two teams of bots fighting each other with guns. Each bot shots bullets of its own color. Continue reading “Potential Fields AI, 2/3: RTS bot implementation.”

Potential Fields AI, 1/3: hello potentials.

Categories ai, code

Potential fields are an interesting concept in games development. I decided to use them in my upcoming title, so I created a Potential Fields AS3 library (PFLib). This library drives bots AI in my RTS engine. The game is still in development, but here’s a video showing my current results (this gonna be pretty complex defense game with bots attacking your base and fighting against your team):

In this 3-part article I’ll tell you what are potential fields and how you can use my library to create AI in your games. In this first part I’ll start with some theory and basic AI implementation. Continue reading “Potential Fields AI, 1/3: hello potentials.”