ON THE DEVELOPMENT OF A FREE RTS GAME ENGINE

The genre of real-time strategy (RTS) video games is very popular and poses numerous challenges to AI researchers who want to create systems that play autonomously or aid human players. One obstacle for AI progress in this area is closed commercial software which restricts game access to inflexible graphical user interfaces. In this article we describe the current state of the free RTS game engine ORTS which allows users to define RTS games in form of scripts and to connect arbitrary game client software — ranging from 3d GUIs to distributed AI systems. This flexibility opens up new avenues for RTS game competitions and AI research, of which some are discussed here as well. BACKGROUND Real-time strategy (RTS) games such as Starcrafttm and Age of Empirestm are fast-paced war simulations which have become quite popular in recent years. Constructing AI systems that play these games well is challenging because of incomplete information, real-time aspects, and the requirement of long-range planning. Many commercial RTS games feature AI scripts that can win against novice players by being favored in various ways. Examples range from giving AI components access to normally hidden information (such as opponents’ unit locations), over executing actions faster, to increasing the influx of resources. While this approach may result in challenging single-player missions for beginners, it is not applicable in fair competitions. Furthermore, it does not tackle the real AI issues such as reasoning, abstract planning, learning, and opponent-modeling. Machines are still inferior to humans in these areas, which is obvious when watching machines play each other repeatedly. To improve the performance of RTS game AI we made the case for studying real-time AI problems in the context of RTS games in (Buro 2002; Buro & Furtak 2003; Buro 2004; Buro & Furtak 2004). There we also described the design rationales and components of the free RTS game engine ORTS (Open Real-Time Strategy). Table 1 summarizes the major differences between ORTS and current commercial RTS games. Commercial RTS games software is closed and not expandable. This prevents researchers and hobbyists from taiFeature Commercial RTS Games ORTS Cost ≈US$ 55 US$ 0 License closed software free software (GPL) Game Specification fixed user-definable Network Mode peer-to-peer server-client Prone to MapRevealing Hacks yes no Communication Protocol veiled open Network Data Rate low low to medium Unit Control high-level, sequential low-level, parallel Game Interface fixed GUI user-definable Table 1: How ORTS relates to commercial RTS games loring RTS games to their needs and from connecting remote AI modules in order to gauge their playing strength. ORTS, by contrast, is a free software RTS game engine which means that its source code and artwork are available free of charge and users can specify their own RTS games. Furthermore, commercial RTS games as well as the free RTS game engine (Stratagus 2005) utilize peer-to-peer as opposed to server-client technology to reduce network traffic. In peer-to-peer mode the complete game state is maintained on each player’s computer – by means of broadcasting all player actions – and the software just hides the invisible part of the game state from the players. By tampering with the client software it is possible to reveal the entire state and thereby gain an unfair advantage. So-called map-revealing hacks are wide-spread and pose a serious problem for online tournaments. We feel that this is unacceptable for playing fair games on the internet. Therefore, we implemented a server-client architecture in ORTS. The entire game state is maintained in the server which repeatedly sends out individual player views, receives player actions, and executes them. (Buro 2002) claims that the resulting system is “client-hackfree” in the sense that client software changes will not benefit attackers. Of course, a truly fair setup also requires trusted servers and trusted communication. Another advantage of open server-client game architectures is that users can connect whatever client software they like. This openness leads to new and interesting possibilities ranging from fair on-line tournaments of autonomous AI players to gauge their playing strength to hybrid systems in which human players use sophisticated GUIs which let them delegate laborious or repetitive tasks to AI helper modules. Examples include smart group pathfinding, computing efficient build orders, and small-group combat tactics. One downside of the server-client operation compared to peer-to-peer implementations is increased network data rates, especially for the server which uploads views to the clients. In ORTS the data requirements are lowered by sending out compressed incremental view updates (Buro 2002), which is sufficient to play games with 1000 visible moving objects at a data rate of 2.5 KB per game tick. The ORTS source code is mainly written in C++ with the exception of game specifications and GUI customization for which we developed a simple scripting language. Scripting allows us 1) to change settings without triggering compilation and 2) to use the same executables for different game types. The C++ code uses the following libraries which are available for many systems: SDL, SDL net, Qt, OpenGL, GLUT, and GLEW. ORTS is being developed under Linux and Cygwin using gcc, but it now also natively builds under Windows and Mac OS X. In addition to the C++ source code, a sample game is provided in the distribution including game specification scripts, a set of 3d models, and user interface customization scripts for the GUI. ORTS software, artwork, and documentation can be downloaded from (ORTS 2005) In the following sections we give a high-level overview of the major ORTS components with emphasis on the latest developments and scripting. We conclude the paper with a brief discussion of the project’s future.