MushRog

A square to wait for the party

October 12, 2026 mecanicaarquitetura

There’s now a place between login and the fight. It’s a small town with a square and a fountain in the middle, four buildings around it and a portal to the north that leads to the Salamander room. You arrive with your team, see who’s nearby, chat, and head to the room together. When you’re done, you come back out through the same portal.

Why

In the design document the town has always been the social heart of the game, in the spirit of Ragnarok: the place where you form parties, show off gear and talk. It was also the most serious network test of phase 1. A room holds four people, but a town can hold hundreds, and we can’t send everyone’s position to everyone.

How it works

The map is divided into cells the size of a screen. Each player only receives the people in the surrounding cells who are less than 560 pixels away. To stop seeing someone, they have to get past 720 pixels. That gap between the two numbers keeps people from flickering at the edge of the screen. The server only sends a position when something changed near you, and if everyone around you is standing still, one packet per second arrives, just to confirm the connection is still alive. Each player’s name, class and appearance arrive exactly once, the first time you see them. After that only position and direction are sent.

We measured with a hundred players walking randomly around town and got under three milliseconds per tick, against a budget of fifty.

Local chat goes to whoever you can see and shows up in a bubble above the head. With “/g” in front, it goes to everyone connected. You get five messages every five seconds, then you wait. The buildings have collision, and you slide along the wall instead of getting stuck on it. For now they’re colored blocks with the name written on them (blacksmith, shop, warehouse, tavern), and none of them opens yet.

The automated test now does the full round trip: two bots arrive in town, see each other, exchange messages in local and global chat, walk around the fountain to the portal, enter the room, fight and return to town.

Next step

A room of mobs to farm, chest keys and personal loot. After that, lots of bots to see the town with a hundred real people in it.

Changes

  • feat(city): hub city with proximity replication, chat and portal

    CityState (movement, building collision with sliding, portals) and InterestGrid (screen-sized cells, enter 560 px / leave 720 px). Server sends static player info once per viewer and positions only when something nearby changed (1 s keepalive), at 10 Hz. Local chat goes to visible players with speech bubbles; /g goes to everyone; rate limited. Portal moves the player into the boss room; leaving returns to the portal exit. Client gets CityView with camera, ChatUI, and a leave button in the room. 100 players cost under 3 ms per city tick. The network test now walks the full loop: city, chat, portal, room, back.

← Back to the devlog