How to Develop an RTS Game – Quick Guide
Website design By BotEap.comRed Alert 2 (Westwood Studios) and Age of Empires 2 (Microsoft) were two games that defined the computer age by getting used to the GUI (mid/late 90’s).
Website design By BotEap.comOriginally designed for DOS, Red Alert was developed by Westwood Studios, a pioneer of RTS through titles including Dune. The game was a breakthrough due to its real-time nature.
Website design By BotEap.comAdd to that a killer story, jaw-dropping graphics, and almost mythical gameplay mechanics and you have a winner. As a software developer, it’s easy to be amazed by games like this… but it’s another thing to know how they work. This tutorial is a brief introduction to what I know about it.
Website design By BotEap.comOOP (Object Oriented Programming)
Website design By BotEap.comThe most important thing to appreciate with any game is that they are programmed using OOP principles. OOP stands for object-oriented programming, and basically the opposite of stream-based programming:
- Website design By BotEap.comStream-based programs work with the flow of an application They will focus on user input and manage their system based on forms, typically updating the UI whenever input is provided.
- Website design By BotEap.comObject-oriented programs work by loading a base application and using it to load a series of variables (objects). These variables are kept in memory and can be interacted with on the screen in real time.
-
Website design By BotEap.complayer 1
– Buildings
– 12
– 3. 4
-81
– 19
-Units
– 109
– 109
– 109
– 109 -
Website design By BotEap.comPlayer #2
– Buildings
– 12
– 3. 4
-Units
– 10
– 12
-24
- Website design By BotEap.comtable_players
- Website design By BotEap.comfactions_table (has_many buildings, has_many units through buildings)
- Website design By BotEap.comobjects_table (this will be superclassed as buildings and units)
- Website design By BotEap.comgames_table (acts as a join table for players) (belongs_to:player_1, belongs_to:player_2)
- Website design By BotEap.comactions_table (this records the game actions “player 1 started building x”)
- Website design By BotEap.comThe purpose of the application is to create players.
- Website design By BotEap.comOnce the player has “logged in” (either with serial or email), they will be able to create a “game”.
- Website design By BotEap.comThe game will then allow each player to “build” buildings and build units. units are available through buildings (you have to build units for the units to be available)
- Website design By BotEap.comEach building/unit is available through a faction.
- Website design By BotEap.comYou need some sort of tech tree to enable the production of specific units/buildings for certain research investments