1 min
The fifth CGD blog post about Don’t Walk By
For this week I started working on the AI script as both the density grid and touch manager systems are completed for now and are stable.
The ai script is a wrapper around the two components of the ai the A* pathfinding and the flocking. Each AI has a state which it can be in these states are:
Users of the ai can call set functions which will cause the ai to swap to one of these states and perform its respective behavior. I implemented the functionality of the stationary and default states.
The stationary behavior is simple to implement as I just had to clear the list of points which the AI is uses to path.
The default behavior entails the ai pathing to a point of interest (currently a random point) waiting there for a random time between two values before pathing to a new point. To implement this I created a default state sub state which can either be: getting a new path, pathing along a path or waiting at a point.
I also added a struct to the ai class that hold information about the ai’s current state. This includes:
A user can call GetStateInfo()
to retrieve the current StateInfo of the Ai.
Subscribe to this blog via RSS.
C++ 30
Directx12 11
Mario kart 11
Commercial games development 15
Unity 15
Low-level programming (19) C++ (30) Text based adventure (5) Ex-machina (9) Game engine programming (11) Directx12 (11) Mario kart (11) Land of gold (5) Audio visual production (1) Commercial games development (15) Unity (15) Don't walk by (15)