A downloadable game

Buy Now$9.99 USD or more

Advanced 8 Directional / Sided Animation and AI Behavior System for NPCs

This game features a sophisticated Non-Player Character (NPC) system that uses directional animations and state-based logic to simulate dynamic, lifelike behavior. Each NPC responds to its environment and the player with smooth transitions and intelligent reactions.

This templae use Sprite only (not 3d shape / billboard)

Key Features

Modular State-Based AI

NPCs operate using a finite state machine, allowing them to transition between several behavioral states:

  • Waiting: The NPC stands idle for a randomized period.

  • Walking: The NPC moves in a randomly chosen direction using built-in pathfinding behavior.

Each state is independent, modular, and designed for easy expansion.

Dynamic Directional Animation System

To enhance realism, NPCs visually respond to the player’s position by switching between multiple directional animations. This system calculates the relative angle between the NPC's movement and the player’s position, and dynamically assigns an appropriate animation:

  • Front / Back

  • Left / Right

  • FrontLeft / FrontRight

  • BackLeft / BackRight

This ensures that NPCs are always facing and animating in a direction that reflects their current orientation in the world.

Skin-Based Animation Mapping

Each NPC has a customizable skin identifier (e.g., "Man") that links to the correct set of animations. Animations are constructed dynamically by combining the skin name with the current direction (e.g., "ManFront").

This modular structure allows the reuse of logic across multiple NPC types with minimal effort.

Seamless Animation Transitions

NPCs only switch animations when necessary, preserving performance and visual fluidity. In passive states, animations are frozen in place to conserve resources while maintaining presence.

Updated 18 hours ago
Published 4 days ago
StatusReleased
AuthorJonasz O.
Tags2D, 3D, 8-direction, construct, construct-3, construct3, Project template

Purchase

Buy Now$9.99 USD or more

In order to download this game you must purchase it at or above the minimum price of $9.99 USD. You will get access to the following files:

8 dir v1.0.c3p 2.4 MB
2 FrontBack.c3p 4.7 MB
8 dir v1.1 Gunshoot.c3p 2.7 MB
8 dir v1.2 Guns Fight.c3p 3.4 MB

Development log