Hi everyone,
First-time poster here. I’m currently experimenting with building a virtual pet game using a Frappe backend. The concept is inspired by titles like My Talking Tom Friends, where multiple characters interact in the same environment and share resources (food, furniture, mini-games).
What I’m trying to solve:
I want to design a Game Data Module in Frappe to handle:
Character states (hunger, energy, happiness)
Shared inventory across characters
Scheduled events (e.g., feeding reminders, mini-game unlocks)
Offline progress sync (client records progress, syncs when online)
Current approach:
Doctype: Character with JSON field for stats
Doctype: Inventory linked to Character but allowing shared ownership
Scheduled Jobs for daily rewards and event triggers
REST API via Frappe for the mobile client
Challenges I’m facing:
Best way to handle real-time state updates without overloading the server.
Designing relationships so that characters can “share” an inventory without duplicating data.
How to manage versioning of game assets and configurations so old clients don’t break.
Reference for game mechanics
I’m using this public gameplay reference to outline the core mechanics and state changes:
(This is not a download link — just a visual/functional reference for designing the backend logic.)
Questions for the community:
Any patterns you’ve used in Frappe for shared resource management between multiple entities?
Would WebSocket integration via Socket.IO be a better fit for real-time updates in a game context?
How would you approach caching to reduce load but keep state fresh?
Thanks in advance for any advice — happy to share my Doctype schema if anyone’s curious.