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  LootTableService and  LootTableCache, 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 WorldItemEntitySystem responsible 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 EntitySystem class

  • 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!

Leave a comment

Log in with itch.io to leave a comment.