Engineering >> Engineering

Real-Time Strategy (RTS) Game: Potential Fields

by Matthew Dunmire

 

Submitted : Spring 2010


This project simulated the computations required to create a path for a simple ‘agent’ inside of a Real Time Strategy (RTS) computer game. To determine the actions taken by the agent concepts from two-dimensional vectors and center of mass were used. Vectors were used to define attractive and repulsive ‘fields’ emitted from a goal and several obstacles respectively. The center of mass was derived for the three objects that could not be considered particle charges initially, once this point was determined they were treated as point charges with all charge concentrated at the center of mass and radiating outward in a circle that encompassed the entire figure. Once the vectors had been filled out, it was a matter of crunching the numbers step by step. After a single ‘cycle’ of movements by the agent and the mobile obstacles ocurred the vectors had to be recalculated and applied to the piece-wise function that defined the actions to be taken by the agent. By the 23rd cycle the agent had avoided the three static hills, stayed completely out of contact with the mobile ‘enemies’ and moved inside of the radius of the goal, thus completing its mission.

 


 

[ Back ]

Advisors :
Masahiko Saito, Mathematics and Statistics
Mayur Palankar, Computer Science & Engineering
Suggested By :
Mayur Palankar