Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User metrics with optional platform specific db persistence #66

Conversation

varoonp123
Copy link
Contributor

@varoonp123 varoonp123 commented Aug 4, 2023

Like #58 but with a massaged commit history.

  • Hoist the arcade-specific features (serial ports) to another crate to assist with conditional compilation. Hoist whatever bits were needed into the thetawave_interface crate to be used as something like a "service registry" with schemas+typedefs.
  • Implement a plugin to keep track of 4 caches of user metrics+mob kills for the current game and all completed games.
  • Implement a plugin to periodically persist the completed games caches to a local sqlite.
  • Show the metrics on the Game over, main menu, and victory screens.

…All mutations handled by 1 bevy plugin and reset on each new game
…ame_metrics to disk rather than doing a sqlite op whenever a mob is killed. This allows us to bulk increment the mob kill count sqlite table, which is fewer sqlite ops
…r of our plugin that handles separate resources. The game over screen now pulls from those newer structs with the current game stats
…t certain plugins into separate crates. This aids in conditional compilation and platform-specific functionality. Wasm is a bear
…when the feature is not available. Hoist the db model/func return type to an interface to be used by the game over ui.
…ional compilation and doing more platform-specific behavior
…ches: (mobs killed, userStats) x (currentGame, completedGame)
…ng whenever we start a new game so that we can keep metric counters across games even without a database
@varoonp123 varoonp123 force-pushed the vp/feature/platformSpecificPortability branch from 0279781 to 738dcc3 Compare August 4, 2023 20:23
@varoonp123 varoonp123 marked this pull request as ready for review August 4, 2023 21:02
Comment on lines +3 to +4
version = "0.1.0"
edition = "2021"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use consistent package version for all crates in the workspace.

Comment on lines +13 to +14
bevy_ecs_macros = "0.11.0"
bevy_ecs = "0.11.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use consistent bevy versions across all deps. Ideally we only update 1 place when they release a new version.

thiserror = {workspace = true}
derive_more = {workspace = true}
rusqlite = { version = "0.29.0", features = ["bundled"] }
dirs = "5.0.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think directories is slightly higher leveled. Use that instead.

Copy link
Contributor

@cdsupina cdsupina left a comment

Choose a reason for hiding this comment

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

Good one 🤣

@varoonp123 varoonp123 merged commit f353a8b into thetawavegame:main Aug 4, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants