top of page

Game mode: Team Deathmatch

This is a scripting practice of a common multiplayer game mode: Team Deathmatch. It covers game rules, game entities, basic HUD, matchmaker, and all other necessary parts.

Pseudo Code (C++ Style)
​Github Link: 
https://github.com/WatchPigs/TeamDeathmatch

UML Class Diagram

Brief Descriptions

For more detailed descriptions please check the comments in source code files

  • TDM GameMode: Core mechanics of the game mode, handling team and player scores, game progress, frags, player respawns, and communicating with the match makers and the UI system.

  • MatchMaker: It provides match start information and receiving match end information. It's a singleton. And has the same lifecycle as the game instance, and can serve as an intermediate layer for communicating with systems outside of the match session or even the game instance, such as player databases.

  • Game UI System: for display gameplay informations on client, like HUD, scoreboard, etc. It's a singleton.

  • Player: with gameplay attributes and pointers of attached objects

  • DamageCauser(Weapon & Equipment & Environment): Game objects that can cause damage, can be weapons, equipments or environment

  • Timer: for countdown, and scheduling an action to be performed after a delay

  • TDMMatchConfig: Information related to match rules and map objects

  • MatchEndInfo: Match result for the match maker and the UI system

  • MapGameplayObjects: gameplay related objects in the map

  • SpawnPoint: spawn point in the map

  • Time: The data type that represents time.

  • CombatInfo: Player combat infos(kills, deaths), for the scoreboard

  • TeamID(Enumeration): Representing the info of team id

  • GameMode(Enumeration): Representing game mode info for other game systems

©2021 by Yexiang Zhou.

bottom of page