Code Monkey home page Code Monkey logo

aen_tabletop_tooling's People

Contributors

artermia avatar dljin avatar eriwang avatar sigmanzero avatar

Watchers

 avatar  avatar  avatar

aen_tabletop_tooling's Issues

Try moving user state up to App and pass it down

Currently a bunch of smaller components try to get the status of the currently authenticated user - probably means there's a bunch of duplicated logic that can be combined into one user state at the top of the app.

Somehow separate out "non-calculated fields" in CharacterData

Fields such as currentHp and initiative live on the character itself, are modified in place, and should be persisted if the character changes due to a profile change. It's confusing and unclear which fields fall into this category, we should somehow separate these out (possible examples: adding a nonCalculated key in the data structure, or having a NonCalculatedCharacterData table)

Cloud function warming

If not run recently, Cloud Function instances spin down and take a while to spin back up. We should add a warm_endpoint option to every Cloud Function and call that on webpage load to avoid the latency from spinning back up.

Cloud function for building Character from dependencies

There's a little bit of code to build a Character class from a Profile and Unit class, but there's some assumptions that made on shape of data (e.g. that profiles contain all armor details) that don't match with the real state of the world. It's likely easier to rip that building functionality out and put it into a cloud function. We should probably only need the actual dependencies of a character when building it, after it's built everything should be contained in the character itself (especially because all that info gets rendered to the UI as well).

Flags for Abilities

Would be nice to have isAttack, hasTarget, hasMultipleTargets, hasUnevenDistribution, etc... living on the abilities, flags that the front and back end both understand to control calculations and how the UI gets rendered.

Character Firestore Table

We should be able to track nearly all character state in a "Character" table which is derived off of the "Profile" and "Unit" tables (possibly among other tables in the future). We should implement this table and set up database triggers to modify the table when upstream tables are changed.

More generalized data converter solution

The essence of a data converter so far has always been "read Firestore, check for required fields, and throw if they aren't there", or "write a dictionary-like structure to dictionaries". We should be able to generalize these better and reduce the amount of code we write there.

Structure monorepo more effectively

Example: https://jackywu.ca/2021/2021-01-02/

It's currently difficult to manage dependencies in this repo, yarn calls are all over the place and confusing to use. We should leverage yarn workspaces, and possibly use the setup in the above link and use webpack to play nice with Firebase Cloud Functions' requirement of a package.json.

Add a publish option for actions like calculate attack

User flow:

  1. User clicks calculate attack
  2. Result prints out "Attack hit, cost 4 FP and did 9 HP damage"
    • The FP and HP fields would be editable
  3. User clicks "Apply values" or "Publish" (or similar) button to actually modify those items in the database

[P2 Feature] Game Log

It would be interesting to see a public "game log" of actions taken (e.g. "Char 1 attacked Char 2 with Ability for 10 damage), instead of just the "final state" (e.g. in the previous example, "Char 2 has 60 HP remaining). This would likely require a new Firestore "game log" table that the front end would need to listen to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.