Multiplayer: networked dedicated server + desktop client over MrGameEng.Net

Engine bump brings MrGameEng.Net (WebSocket transport, RFC 6455 server,
delta component replication) — this commit is its showcase.

LittleSim.Server --listen runs the world online: 24 pawns wander, tire
and rest on the engine's fixed-tick HeadlessHost (the same Wander/
Needs/Decision systems the windowed world uses), a WebSocketServer
accepts clients and a ReplicationServer ships Transform2D + PawnNeeds
deltas at 10 snapshots/s per the shared NetSchema. --probe is the CLI
check: it connects, listens for a second and prints replicated pawns
with positions sampled twice to show the world is alive.

The game gains MultiplayerScene (dotnet run --project src/LittleSim --
--connect [ws://host:port]): simulation stays on the server, the client
applies snapshots into its scene store, decorates spawned entities with
sprites and reuses PawnAppearanceSystem so replicated fatigue darkens
pawns locally. HUD strings go through ru/en localization; the `net`
console command reports connection state and entity count. Esc returns
to the main menu.

Verified end to end: probe sees 24 pawns moving between samples; the
windowed client connects and runs against a live local server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-12 23:45:35 +03:00
co-authored by Claude Fable 5
parent ce8f8ba2ed
commit e8273f9ffa
17 changed files with 451 additions and 68 deletions
+6 -12
View File
@@ -8,7 +8,6 @@
"season.winter": "winter",
"hud.controls": "WASD — camera, wheel — zoom, ` — console, F1 — inspector",
"hud.paused": "PAUSED",
"menu.title": "LittleSim",
"menu.subtitle": "a god-game: minimal graphics, deep simulation",
"menu.newworld": "New World",
@@ -16,7 +15,6 @@
"menu.settings": "Settings",
"menu.credits": "Credits",
"menu.quit": "Quit",
"newworld.title": "New World",
"newworld.name": "Name",
"newworld.defaultname": "New World",
@@ -26,13 +24,11 @@
"newworld.smoothing": "Terrain smoothing",
"newworld.create": "Create",
"newworld.back": "Back",
"load.title": "Load",
"load.empty": "No saves yet",
"load.load": "Load",
"load.delete": "Delete",
"load.back": "Back",
"settings.title": "Settings",
"settings.language": "Language",
"settings.fullscreen": "Fullscreen",
@@ -41,7 +37,6 @@
"settings.volume": "Volume",
"settings.apply": "Apply",
"settings.back": "Back",
"pause.title": "Paused",
"pause.resume": "Resume",
"pause.settings": "Settings",
@@ -49,25 +44,20 @@
"pause.mainmenu": "Main menu",
"pause.quit": "Quit",
"pause.saved": "Saved: {0}",
"speed.pause": "⏸",
"credits.title": "Credits",
"credits.author": "mrleo1nid",
"credits.role": "Concept, code, mrgameeng engine",
"credits.back": "Back",
"preset.small": "Small",
"preset.medium": "Medium",
"preset.large": "Large",
"terrain.deepwater": "deep water",
"terrain.water": "water",
"terrain.sand": "sand",
"terrain.grass": "grass",
"terrain.forest": "forest",
"terrain.mountain": "mountains",
"plant.oak": "oak",
"plant.birch": "birch",
"plant.pine": "pine",
@@ -77,7 +67,6 @@
"plant.stage.sprout": "sprout",
"plant.stage.sapling": "sapling",
"plant.stage.mature": "mature",
"pawn.being": "being",
"pawn.bear": "bear",
"pawn.deer": "deer",
@@ -86,5 +75,10 @@
"pawn.boar": "boar",
"pawn.wolf": "wolf",
"pawn.muffalo": "muffalo",
"pawn.squirrel": "squirrel"
"pawn.squirrel": "squirrel",
"net.hud": "Multiplayer: {0} | beings: {1} | Esc — back to menu",
"net.connecting": "connecting…",
"net.connected": "connected",
"net.failed": "connection failed",
"net.lost": "connection lost"
}
+6 -12
View File
@@ -8,7 +8,6 @@
"season.winter": "зима",
"hud.controls": "WASD — камера, колесо — зум, ` — консоль, F1 — инспектор",
"hud.paused": "ПАУЗА",
"menu.title": "LittleSim",
"menu.subtitle": "бог-игра: минимум графики, максимум симуляции",
"menu.newworld": "Новый мир",
@@ -16,7 +15,6 @@
"menu.settings": "Настройки",
"menu.credits": "Авторы",
"menu.quit": "Выход",
"newworld.title": "Новый мир",
"newworld.name": "Название",
"newworld.defaultname": "Новый мир",
@@ -26,13 +24,11 @@
"newworld.smoothing": "Сглаживание рельефа",
"newworld.create": "Создать",
"newworld.back": "Назад",
"load.title": "Загрузка",
"load.empty": "Сохранений пока нет",
"load.load": "Загрузить",
"load.delete": "Удалить",
"load.back": "Назад",
"settings.title": "Настройки",
"settings.language": "Язык",
"settings.fullscreen": "Полный экран",
@@ -41,7 +37,6 @@
"settings.volume": "Громкость",
"settings.apply": "Применить",
"settings.back": "Назад",
"pause.title": "Пауза",
"pause.resume": "Продолжить",
"pause.settings": "Настройки",
@@ -49,25 +44,20 @@
"pause.mainmenu": "Главное меню",
"pause.quit": "Выход",
"pause.saved": "Сохранено: {0}",
"speed.pause": "⏸",
"credits.title": "Авторы",
"credits.author": "mrleo1nid",
"credits.role": "Идея, код, движок mrgameeng",
"credits.back": "Назад",
"preset.small": "Маленький",
"preset.medium": "Средний",
"preset.large": "Большой",
"terrain.deepwater": "глубокая вода",
"terrain.water": "вода",
"terrain.sand": "песок",
"terrain.grass": "трава",
"terrain.forest": "лес",
"terrain.mountain": "горы",
"plant.oak": "дуб",
"plant.birch": "берёза",
"plant.pine": "сосна",
@@ -77,7 +67,6 @@
"plant.stage.sprout": "всходы",
"plant.stage.sapling": "саженец",
"plant.stage.mature": "взрослое",
"pawn.being": "житель",
"pawn.bear": "медведь",
"pawn.deer": "олень",
@@ -86,5 +75,10 @@
"pawn.boar": "кабан",
"pawn.wolf": "волк",
"pawn.muffalo": "муффало",
"pawn.squirrel": "белка"
"pawn.squirrel": "белка",
"net.hud": "Мультиплеер: {0} | жителей: {1} | Esc — в меню",
"net.connecting": "подключение…",
"net.connected": "подключено",
"net.failed": "не удалось подключиться",
"net.lost": "соединение потеряно"
}