Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott
Hit Point Bars Generic for both Buildings and Units Create new pixel buffer Manually fill pixels in the buffer Attach billboard entity to the object Update when damaged Size and offset defined in constants.cfg
Mini-Map Terrain imagery automatically generated from map Buildings added for all users –Goldmines identified Units for each player –Team colors Camera position / View box Mouse input –Move units and attack with units
Team Colors Object texture has white spots where color will be filled in Filter texture has black spots to tell the game where to fill in team colors Filter texture is loaded into memory and black spots are replaced with team color Textures are combined with multiplication Team colors defined in constants.cfg
Team Colors x=
Height Mapping Use of height maps which translate directly to the level nodes which block areas of the map and track units
Level and LevelNodes Nodes of the map which indicate numerous data –If the node is blocked by a building or terrain –What units are on the block Used in collision detection and building functions
Houses / Villagers Special ability to slowly produce population for a town Logic to mill around the town to create a sense of a growing community
GUI The GUI contains interactive buttons so that the user can easily build units and buildings GUI changes depending on what units are selected at the current time Tracks gold and food levels
Object Management Need a way to keep track of all the units and buildings in the game Must be able to add new units and buildings when they are built, and remove them when they are killed
WorldObject Every unit and a building in the game is stored as a WorldObject This class keeps track of all the information specific to each unit or building. –Health –PlayerID –Cost –SceneNode
Unit and Building Separate classes for Unit and Building inherit the information from WorldObject These classes describe actions specific to a Unit or a Building such as how to move or attack They also store details like unit speed, firepower, size
Collision Detection Need to move units from one point to another without walking straight through the other units
Collision Detection Must be able to navigate around a single unit…
Collision Detection …Buildings…
Collision Detection …or many things!
Networking Client/Server model One process on host computer Client requests permission from server before performing actions Events controlled by server Uses Raknet toolkit Uses small packets with good compression
Particle Systems Uses Ogre’s particle streamer Attach a particle system to a scene node and it moves with the units Client side only Buildings burn, gun smoke, cannon ball explosion, mouse click billboard
Action Queues Our game has a lot of inherent asynchronous elements –Network, user input, AI decisions We need a way to manage this in a structured manner The solution? Action Queues!
Action Queues Based on “async queues” from GTK+/Glib windowing toolkit A queue that is multithread-safe while still maintaining efficiency We use them to enqueue and process “Actions” –Attack, Unit killed, Mill around This paradigm abstracts away the source of the message
Sound Categories After awhile, our one gunshot sound got pretty boring! We needed a way to play a “category” of sound –Gunshot, death, lawman talking But, we don’t want all the sounds to be played at random –For example, “ricochet” noise shouldn’t be as often as the regular gunshot
Sound Categories Sounds are chosen based on weights encoded in the filename –Gun_25.wav for example These files are loaded at runtime, so sounds can be added and removed without editing lists or recompiling Weights are relative –So 5 100% = 20% actual likelihood
Sound Effects We recorded a lot of sound effects ourselves –John Battagline did most of the villager voices, John Scott did the outlaw voices in Spanish Other sounds taken from films and stock sounds online –Jail plays theme to “The Good, the Bad, and the Ugly”