How jean1dev/w2pp-openwyd works
w2pp-OpenWYD is a Go rewrite of the WYD game server, compatible with the unmodified 7662 client. The main flow is client traffic into tmServer, where protocol handling and game logic operate on an in-memory world; persistence and billing are separate gRPC services. A web API serves account and platform features, including moderator tools for game content. The graph emphasizes documented service boundaries and sampled wiring; many individual gameplay handlers and web capabilities are represented by their subsystem directories because their implementations were not excerpted.
Main entry points: tmserver/main.go tmServer entry · webserver/main.go webServer entry · store_live.go PostgreSQL store · dbserver/main.go dbServer entry
Components 22
Game runtime
- tmServer entry
tmserver/cmd/tmserver/main.go - Legacy protocol
tmserver/internal/protocol - Gameplay handlers
tmserver/internal/handler - World state
tmserver/internal/world - Game content
tmserver/internal/content - Combat and progression
tmserver/internal/combat
Persistence and billing
- DB client adapter
tmserver/internal/dbclient/client.go - dbServer entry
dbserver/cmd/dbserver/main.go - Persistence API
dbserver/internal/grpcsrv/server.go - PostgreSQL store
internal/store/store_live.go - binServer entry
binserver/cmd/binserver/main.go - Billing policy
binserver/internal/billing/billing.go - Billing API
binserver/internal/grpcsrv/server.go
Web platform
- webServer entry
webserver/cmd/webserver/main.go - Web gRPC API
webserver/internal/grpcsrv/server.go - Account service
webserver/internal/account/service.go - Content administration
webserver/internal/npcadmin/service.go - Mob template admin
webserver/internal/mobtemplateadmin/service.go - Web services
webserver/internal
Shared domain
- Shared domain
internal/domain/domain.go
Other components
- WYD client
- Web platform BFF
Connections 25
- WYD client → tmServer entry: connects
- tmServer entry → Legacy protocol: uses protocol
tmserver/cmd/tmserver/main.go - tmServer entry → World state: starts world
tmserver/cmd/tmserver/main.go - tmServer entry → Gameplay handlers: wires handlers
tmserver/cmd/tmserver/main.go - tmServer entry → Game content: loads content
tmserver/cmd/tmserver/main.go - tmServer entry → DB client adapter: configures adapter
tmserver/cmd/tmserver/main.go - Gameplay handlers → World state: updates state
- Gameplay handlers → Combat and progression: uses rules
- World state → DB client adapter: persists through
tmserver/internal/dbclient/client.go - dbServer entry → Persistence API: registers API
dbserver/cmd/dbserver/main.go - Persistence API → PostgreSQL store: reads and writes
dbserver/internal/grpcsrv/server.go - dbServer entry → PostgreSQL store: opens store
dbserver/cmd/dbserver/main.go - dbServer entry → DB client adapter: serves gRPC
dbserver/cmd/dbserver/main.go - dbServer entry → PostgreSQL store: uses PostgreSQL
- tmServer entry → Billing API: checks billing
- binServer entry → Billing API: registers API
binserver/cmd/binserver/main.go - Billing API → Billing policy: checks policy
binserver/internal/grpcsrv/server.go - Web platform BFF → webServer entry: calls gRPC
- webServer entry → Web gRPC API: registers services
webserver/cmd/webserver/main.go - Web gRPC API → Account service: delegates account
webserver/internal/grpcsrv/server.go - webServer entry → Content administration: wires admin
webserver/cmd/webserver/main.go - webServer entry → Mob template admin: wires templates
webserver/cmd/webserver/main.go - webServer entry → Web services: registers services
webserver/cmd/webserver/main.go - Content administration → PostgreSQL store: stores definitions
webserver/internal/npcadmin/service.go - Account service → PostgreSQL store: uses account data
webserver/internal/account/service.go