Abstract:
In Real-Time Strategy (RTS) games, players develop an army in real time, then attempt to take out one or more opponents. Despite the existence of basic similarities among the many different RTS games, engines of these games are often built ad hoc, and code re-use among different titles is minimal. We created a design pattern called ``Resource Entity Action'' (REA) that abstracts the basic interactions that entities have with each other in most RTS games. This paper discusses REA and language abstraction and implementation using the Casanova game programming language. Our analysis shows that not only the pattern forms a solid basis for a playable RTS game, but also that it achieves considerable gains in terms of lines of code and runtime efficiency. We conclude that the REA pattern is suitable approach to the implementation of many RTS games.