Skip to content

16 game stats#47

Merged
FreddyMSchubert merged 3 commits intodevfrom
16-game-stats
Aug 27, 2025
Merged

16 game stats#47
FreddyMSchubert merged 3 commits intodevfrom
16-game-stats

Conversation

@FreddyMSchubert
Copy link
Copy Markdown
Member

Stored in misc section so it's sent via rabbitMQ so @Peu77 can easily read it out later. In the replay they look like this:

Screenshot 2025-08-27 at 11 30 48

Decided to go for unified namings over object-specific verbs, e.g. bombs destroyed = count of bombs that exploded.

I think we should highlight mainly stuff like "damage-self" and "cores-destroyed" and "units-spawned" on the website but make all of them accessible.

Cores destroyed is a stat because theoretically eventually three teams might play a game against each other.

@FreddyMSchubert FreddyMSchubert self-assigned this Aug 27, 2025
@FreddyMSchubert FreddyMSchubert added the server Related to the functionality of the game server, including gameplay stuff label Aug 27, 2025
@FreddyMSchubert FreddyMSchubert linked an issue Aug 27, 2025 that may be closed by this pull request
38 tasks
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements comprehensive game statistics tracking for replay analysis. The system captures 16 different game metrics including damage dealt, objects spawned/destroyed, gems transferred, and action counts.

Key changes:

  • Added a singleton Stats class to track game metrics across all game actions
  • Integrated statistics collection into action execution (attack, build, move, etc.) and object destruction
  • Statistics are included in the replay's misc section for external consumption via RabbitMQ

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/src/game/Stats.cpp New singleton class implementation for tracking game statistics
server/inc/game/Stats.h Header defining 16 stat keys and Stats class interface
server/src/game/ReplayEncoder.cpp Integration of stats into replay misc section
server/src/game/Game.cpp Object destruction statistics tracking and code formatting
server/src/action/*.cpp Statistics collection in all action types (attack, build, move, create, transfer)
server/inc/object/Bomb.h Added Stats.h include for bomb explosion tracking
server/inc/game/ReplayEncoder.h Added Stats.h include and formatting cleanup
server/inc/action/AttackAction.h Added Stats.h include for attack statistics

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread server/src/action/AttackAction.cpp Outdated
Comment thread server/src/action/AttackAction.cpp
@FreddyMSchubert FreddyMSchubert merged commit 0b434bf into dev Aug 27, 2025
4 checks passed
@FreddyMSchubert FreddyMSchubert deleted the 16-game-stats branch August 27, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the functionality of the game server, including gameplay stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

game stats

2 participants