This is a draft cheat sheet. It is a work in progress and is not finished yet.
Games Agent Loop
Sense - > |
Think - > |
Act - > |
Back to beginning< - Memory |
Sensing Obtains information through vision, hearing, communication and touch Examples Hearing - Ambient noise, surfaces and occlusion Vision - Objects within viewing distance/angle of agent Communication - Communicate with other agents Thinking Decision making - Taking a condition/input Reasoning - Combination of knowledge and input Rationality - Action Examples Pathfinding Finite State machines Production rules Acting Carry out the results of the decision Examples Change location Play animation/sound effect Use a weapon Memory/learning Avoid having to repeat a calculation and predict future outcomes. Also improve agent reasoning. Data doesn't have to be stored in game agent. Can be stored in world's data structure. |
Game Agent Types
Reflex Agents - Respond immediately |
Goal-based Agents - Act to achieve their goals |
Utility-based agents - Try to maximise their own happiness |
Terminology
Autonomy - |
Self Governing |
Agent - |
Anything that can be viewed as perceiving its environment through sensors and action upon that environment through actuators |
|
|
FSM
A machine which models states, transitions between states and actions. |
Box - Represents state |
Line - Transition |
Arrow with dot at end - Start state |
Arrow with dot and circle - End State |
Pathfinding
Crash and Turn |
Simplest form of pathfinding |
Crash into obstacle and move left or right |
Breadth First |
Expands nodes closest to start node |
On the grid we examine the starting location, followed by one square, two squares away and so on. |
Algorithm |
1. Create open and closed list |
2. Push initial state onto open list |
3. Until goal state is found or open list is empty do: |
a) Remove first element from openlist and call it current |
b) If open list is empty return failure and quit |
c) If current is goal return success and quit |
d) For each rule that can match current do: |
i) Apply rule to generate new state |
ii) If new state and not already been visited, push new state on end of open list |
Add current to closed list |
|
|
3D Modelling
Computer games use 3D modelling tools to generate their content. e.g. Alias Maya, 3DS Max |
Export in .X files to make them compatible for games |
Game Loops and Timing
Game loop s render a static image of a scene. Objects are moved slightly on each iteration. |
If there is no timing the loop will render as fast as possible |
Variable timing - Time the game loop |
Fixed timing - A constant value is chosen e.g. 0.02s (50fps) |
Physics Engines
Rigid body - Representation of collision volume of an object |
Joint - Represents a constraint on a body. |
Hinge - Door opening and closing (1 axis) |
Ball and socket joint - Shoulder movement (3 fixed axes) |
|