Devlog #10: Loot Tables and Dropped Gold

Hey everyone!
I have kept busy this week with new feature progress and a ton of foundational work on both the server and client, and for the first time ever… mobs can actually drop items (gold) into the world!
Let’s get into it.
Loot Tables
One of the biggest features this week was implementing structured loot tables inside both Supabase and the server.
Server Architecture
-
Added a new
LootTableServiceandLootTableCache, allowing the server to:-
Load loot tables on demand
-
Cache drop groups in memory
-
Quickly roll drops on mob death without DB hits during gameplay
-
This brings the game step closer to fully fledged itemization, but will be dropped gold for now.
Item Definition System
Next, I built out the ItemDefinitiondatabase table and matching server model.
What’s Included
-
Item IDs, names, rarity, icon keys, stack sizes, categories, etc.
-
Server caching + Supabase service layers
Items now exist as real data objects that can travel across the whole game pipeline.
World Item System
On the Server
-
Added a
WorldItemEntitySystemresponsible for:-
Spawning drops
-
Assigning unique IDs
-
Syncing world items to clients
-
Despawning when picked up or timed out
-
On the Client
-
Added a matching
WorldItemSystem -
Items render directly inside the scene
-
The system listens to entity delta packets, same as players and mobs.
Items can now physically appear in the world when mobs die.
Mob Death → Gold Drop
The current snail mob will drop gold on death now
Refactoring and Cleanup
This week wasn’t just features, a huge amount of core refactoring landed to keep the game maintainable as it grows.
Client Entity System
-
Introduced a base
EntitySystemclass -
Refactored mobs, players, and items to share infrastructure
-
Unified rendering and update patterns
-
Reduced duplication + easier debugging
Server Entity System
-
Matching base class added on server
-
Mobs, players, and world items now share consistent lifecycle logic
-
Paves the way for NPCs, projectiles, pets, and more
Record Cache Revamp
A major internal overhaul:
-
New base
RecordCache<T>class on the server -
All heavy server records (maps, spawn zones, mob definitions, item definitions, loot tables) now load through a unified, type-safe cache layer
-
Massive cleanup of old caching logic
-
Added unit tests to ensure correct caching behavior.
Thanks for following along ❤️
Big things are coming.
If you’re enjoying these devlogs, feel free to comment, follow, and wishlist!
Pixel Odyssey
A nostalgic 2D web-based MMORPG built from scratch
| Status | In development |
| Author | Grinstba |
| Genre | Role Playing |
| Tags | 2D, MMORPG, Side Scroller |
| Languages | English |
More posts
- Devlog #9: First Mob Animation12 days ago
- Pixel Odyssey Reaches MVP19 days ago
- Devlog #8: Expanding Interface Foundation35 days ago
- Devlog #7: Accounts And Authentication44 days ago
- Devlog #6: Combat System Foundation53 days ago
- Devlog #5: Crouch, Combat Prep, and Stability53 days ago
- Devlog #4: Mob Movement and DamageAug 09, 2025
- Devlog #3: Player Details, Backgrounds, and Mob SpawningAug 01, 2025
- Devlog #2: PixiJS Migration, GUI Framework, and Minimap ProgressJul 26, 2025
Leave a comment
Log in with itch.io to leave a comment.