Skip to content

Architecture decisions ​

Each record explains one decision about the server, the wire protocol or the Lua SDK: the problem, what was decided and why, and the options that were rejected. A record describes the decision in force. Numbers are not contiguous: the numbering is shared with decisions about parts of DarqlineMP that are not in this repository.

ADRDecision
0004A protocol envelope: revision check, session token, stale-packet protection and strict decoding
0007Discrete events travel on one reliable, ordered lane per connection and direction
0009Gamemode code acts through a flat, id-based server facade
0010The server owns time of day and weather; the clock stands still unless the server runs it
0012The server owns spawn-point selection, apart from the world baseline and the spawn packets
0013One internal grant primitive, grown only by real consumers
0014Health and armor rewards are additive grants the recipient applies to itself
0016Player commands are a packet of their own, handled by resources and answered with server messages
0017Death and respawn: server-owned life state plus reliable lifecycle events
0019The gamemode decides what a pickup does and when it is consumed
0020The gamemode decides respawn delay and point for each death
0021One removal path frees everything a departing player owned
0022The handshake accepts a session; spawning is a separate request and grant
0023The gamemode decides when and how a connected player spawns
0024The server owns the weapon inventory and reconciles it only downward
0025Resources call each other through marshalled exports and start in dependency order
0026The operator console is a typed, socket-free dispatcher over the server facade
0027Cross-resource calls go only through a dependency-gated dlmp.import
0029Damage events, and a death's killer from the last accepted damage
0033Explosion and fire damage is credited to an accepted cause
0034A destroyed vehicle's killer is the attacker the server can corroborate
0035Players are shown only to players in the same world scope and within distance
0037Players own every key; servers declare actions, not keys
0038Refusable events fail closed; chat is one of them
0039Friendly fire is refused by the victim's client through damage groups
0040The server holds movement to plausible limits; the game mode decides on suspicion
0041A shot rewinds its recipient instead of deciding the hit for it
0042A secret session token and a stateless return-address cookie
0043Map editing proposes and the owning resource applies; maps are documents the core validates
0045The server keeps each life's health; the victim confirms the hit
0046Domain code does not read the clock: every server step has one time
0047The protocol module owns the whole wire contract
0048Resources receive game events as one stream, in the order the server committed them
0049Resources ship web pages as views; the server keeps all authority
0050Server configuration is a strict server.toml with environment overrides
0051Voice chat runs on its own encrypted channel, relayed by the game server (not implemented yet)
0052Login is decided in PreAuth by one auth resource named in the config
0053A server-scoped device credential, proven in the handshake and kept by the launcher
0054Resource storage is asynchronous SQL in a namespace per resource, with migrations per backend
0055Web login: an in-game form posts to the server's auth site over HTTPS, and the core verifies a signed JWT

Documentation licensed under CC BY 4.0. DarqlineMP is not affiliated with Rockstar Games or Take-Two Interactive. Grand Theft Auto is a trademark of Take-Two Interactive Software, Inc.