Game AI Examples with Babylon.js
All what you need for web-based 3D game


Autonomous Agent Design


State-driven Agent Design

The Finite State Machine enables a clean implementation of basic AI logic for every entity. The State-driven Agent Design is still most commonly used AI method in games.


Goal-driven Agent Design

The Goal-driven agent design enables a clean implementation of more advanced AI logic with simple Goals and Composite Goals.


Fuzzy Logic


Weapon Selection

The soldier's weapon selection is implemented via fuzzy inference. In fuzzy logic, the truth of any statement becomes just a matter of a degree.


Graphs and Navigation


Tic-Tac-Toe

An implementation of the MinMax algorithm based on Yuka's graph class.


Navigation Mesh (Basic)

A simple showcase of a navigation mesh.


Navigation Mesh (Advanced)

An advanced showcase that shows the usage of a spatial index and tasks.


First-Person Controls

First-Person example with navigation mesh usage to restrict movement.


Math


Orientation

Demonstrates how to orient a game entity towards a specific target.


Misc


Savegames

Shows how the current game state can be saved and loaded.


Triggers

Usage of triggers to dynamically generate actions in the game world.


Perception


Line of Sight

Demonstrates a basic line of sight test.


Memory System

Enables game entites to have a short-term memory so they react in a more natural way.


Steering Behaviors


Arrive Steering Behavior

This behavior steers the agent in such a way it decelerates onto the target position.


Flee Steering Behavior

Produces a force that steers an agent away from a target position.


Flocking Steering Behavior

A group steering behavior based on "Alignment", "Cohesion" and "Separation".


Follow Path Steering Behavior

Produces a force that moves a vehicle along a series of waypoints.


Interpose Steering Behavior

Produces a force that moves a vehicle to the midpoint of the imaginary line connecting two other agents.


Obstacle Avoidance Steering Behavior

Produces a force so a vehicle avoids obstacles lying in its path.


Offset Pursuit Steering Behavior

Produces a force that keeps a vehicle at a specified offset from a leader vehicle.


Pursuit Steering Behavior

Useful when an agent is required to intercept a moving agent.


Seek Steering Behavior

Produces a force that directs an agent toward a target position.


Wander Steering Behavior

Produces a force that will give the impression of a random walk through the agent’s environment.


Playground


First-Person Shooter

Basic concepts of FPS like simulating bullets and collision detection.


Hide And Seek

A little game that experiments with steering and shooter mechanics.



The work in progress, more examples and showcases will follow!


Examples at Github

...

One of the most powerful, beautiful and simple 3D Web rendering engines in the world.

Go to Babylon


...
Autonomous Agent Design

Yuka provides a basic game entity concept and classes for state-driven and goal-driven agent design.

Steering and Navigation

Use the build-in vehicle model and steering behaviors in order to develop moving game entities. Graph classes, search algorithms and a navigation mesh implementation enables advanced path finding.

Perception and Triggers

Create game entities with a short-term memory and a vision component. Use triggers to generate dynamic actions in your game.

Go to Yuka




Typescript Template

Yuka Game AI + Babylon.js Typescript Starter

Github