rawhide frontier ctrl + y john battagline, paul betts, aaron cardwell, jordan lehmiller, kyle moore,...

23
Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Upload: magnus-owens

Post on 14-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Rawhide Frontier

Ctrl + YJohn Battagline, Paul Betts, Aaron

Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Page 2: 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

Page 3: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 4: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 5: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Team Colors

x =

Page 6: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Height Mapping

• Use of height maps which translate directly to the level nodes which block areas of the map and track units

Page 7: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 8: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 9: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 10: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 11: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 12: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 13: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Collision Detection

• Need to move units from one point to another without walking straight through the other units

Page 14: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Collision Detection• Must be able to navigate around a single unit…

Page 15: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Collision Detection• …Buildings…

Page 16: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

Collision Detection• …or many things!

Page 17: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 18: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 19: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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!

Page 20: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 21: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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

Page 22: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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 files @ 100% = 20% actual likelihood

Page 23: Rawhide Frontier Ctrl + Y John Battagline, Paul Betts, Aaron Cardwell, Jordan Lehmiller, Kyle Moore, John Scott

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”