nkzw-tech / athena-crisis

Athena Crisis is an Advance Wars inspired modern-retro turn-based tactical strategy game. Athena Crisis is open core technology.
https://athenacrisis.com/open-source
Other
1.37k stars 105 forks source link

[Feature] Show Game Player Statistics during Gameplay #2

Closed cpojer closed 1 month ago

cpojer commented 2 months ago

Right now there are no statistics to help players make better decisions. If a player wants to know how much funds each player is generating, or how many units each player has, they have to manually count them on the map. This task is a UI focused task to nicely present data available via the MapData data structure. Most relevant information can be collected using helper functions such as calculateFunds.

Currently, player information is shown via CurrentGameCard. It expands when clicked:

https://github.com/nkzw-tech/athena-crisis/assets/13352/a138eef6-c109-4dc1-8271-1cacdcecb8ef

Ideally, this flyout receives the following information per player:

Notes

Funding

Fund with Polar

gillkyle commented 1 month ago

Spent a bit this evening poking around the code and starting to hack at rendering some of this data over on my fork: https://github.com/gillkyle/athena-crisis/tree/current-game-card

Been using the docs pages to render a playground game where I'm rendering the CurrentGameCard to test some changes. Was familiarizing myself with some of the pieces of game state in the process, trying to identify if there are other bits of data that might render in other cases (like player skills it seems?..).

CleanShot 2024-05-14 at 21 48 50@2x

Probably several better ways to compress this data into the small available space, like showing some data only when expanded.

I'm gaving fun, but can't guarantee I'll be able to keep moving it forward super fast (so if anyone else sees this feel free to jump in).

cpojer commented 1 month ago

Thanks for trying to build it! Seems like @sookmax sent a PR first: https://github.com/nkzw-tech/athena-crisis/pull/23

cpojer commented 1 month ago

Implemented by @sookmax.