3 ms·
It's not your usual CRUD app. It's a realtime sandbox game in early access. Some arbitrary stuff I keep adding for various reasons: gunsLeftToCompensateDu
by Kiro 9y ago
It's not your usual CRUD app. It's a realtime sandbox game in early access.
Some arbitrary stuff I keep adding for various reasons:
gunsLeftToCompensateDueToChangeInVersionX: 123,
winnerOfEventX: true,
didSomethingFunky: Date.now(),
noOfEnemiesKilledBeforeVersionY: 123,
inventory: [{id: GENERIC_ITEM_ID, quantity: 123}, {id: uuid, name: "Ultimate Weapon", damage: 10000, someUniqueProp: {doThis: true, uses: 123}}],
flaggedForCheatingInThisOrThatArena: true
Etc etc. Biggest reason though is just convenience of adding some state to the player when developing new features. Itt would be a complete pain having to add schemas for every single situation, even if it's standardised for all players. Now I just add it to the player object and it's saved automatically to the player document.
Not saying what I do is best practice or anything but it enables me to move fast without having to do much DB admin stuff.