Skip to content

12SystemsPython · curses · RakNet · MinGW · Wine

headless-samp

A protocol-only SA-MP client: the RakSAMP backend becomes a stationary 0.3.7 player driven entirely from a curses terminal. No GTA process, no renderer, no game files.

v0.2.0 experimental

fig. 09 · the terminal client driving the RakSAMP backend: live capture
fig. 09 · the terminal client driving the RakSAMP backend: live capture

No game, just the protocol

RakSAMP is old Win32 C++ tied to its SA-MP-compatible RakNet implementation. Instead of loading GTA SA, headless-samp patches that backend into a console-only client and wraps it in a Python curses interface: stationary synchronization keeps the player on the server while chat, commands and dialogs happen in the terminal.

Wine still shows up on Linux, but only to initialize a dedicated prefix and run one small console executable, which is a much narrower surface than booting the actual game.

Dialogs as terminal modals

SA-MP servers drive login and interaction through dialogs, so the terminal speaks that language: one-button message-boxes auto-accept, everything else renders as a modal where 1/2 pick buttons, Tab toggles, arrows move list selections, Enter submits and Escape takes the second button. Answers go back through RPC_DialogResponse.

The upstream backend ships commands nobody needs in a stationary client, so the patch removes flood, lag, fake-kill, forged-event and teleport paths outright.

Pinned, patched, honest

The installer clones exactly one RakSAMP commit and rewrites it with a Python transformer that requires every replacement to match exactly once: upstream drift breaks the build instead of the session.

The README states the limits plainly: this is a nonstandard protocol client, servers can detect or reject it, and it ships no anti-detection or bypass behavior. Use it where the server owner permits it.

What makes it technically interesting

  • Connects as a normal player slot through the SA-MP RakNet protocol, optionally requests a class and spawns, then holds stationary synchronization
  • Color-coded chat and server messages with a monochrome fallback; plain text sends chat, / sends server commands, and a small allowlist of ! commands runs locally (players, reconnect, spawn)
  • Full dialog handling in the terminal: single-button message-boxes auto-accept, while input, password, list, tab-list and two-button dialogs render as modals and answer through RPC_DialogResponse
  • install.sh pins RakSAMP to one exact commit, applies a Python source transformation, aliases the Windows-era RakNet include names for case-sensitive Linux, and cross-compiles the 32-bit console backend with MinGW
  • The patcher deliberately disables upstream flood, lag, fake-kill, forged-event and teleport commands, and fails loudly if the pinned source drifts
  • Runs the Win32 backend under a dedicated Wine prefix on Linux, or natively on Windows through run.bat with windows-curses
GitHub Get in touch