How jolav/roguelike-online works
Project type and purpose
• This is a full-stack, browser-based roguelike game (“Prologue Online”).
• The client is a lightweight JavaScript/HTML/CSS application under __prologue_client.
• The server is a Go-based game engine and HTTP API under __prologue_server.
• The www folder holds static assets and the production entry point that ties the two together.
File structure
A. Top-level folders
• __prologue_client/ – the front-end game code (controls, rendering, UI panels, HTTP client).
• __prologue_server/ – the back-end game logic (ECS, action queue, map generator, FOV, HTTP server).
• www/ – static site output (HTML, images, CSS) for hosting the client.
B. Key subdirectories in the server
• action/ – definitions of user actions, movement, queueing, tests.
• ecs/ – entity-component-system manager and component packages (health, position, info).
• mapa/ – map generation modules (tiles, levels, shelters).
• lib/ – shared utilities (network responses, math, random, sets).
• configuration (conf/conf.json), build scripts (makefile), module file (go.mod).
C. Key files in the client
• index.html – game canvas container.
• assets/index.css – styles.
• controls.js, game.js, render_ascii.js – UI and rendering logic.
• http.js – REST/JSON wrapper for communicating with the server.
Insights from README
• Implements a turn-based system (Prologue 0.13) with history, camera, FOV, AI.
• Client-server handshake, authentication, and seedable reproducible runs.
• Future features: save/load, inventory, lighting, persistence.
Detail without over-splitting
• Logical unit: client rendering vs. client input vs. HTTP wrapper.
• Don’t forget the configuration file and possible persistence layers.