daiimus b80d1fd4ed Add WebSocket subprotocol negotiation per MUD Standards proposal
Implement RFC 6455 Sec-WebSocket-Protocol negotiation for Evennia's
WebSocket server, following the MUD Standards WebSocket specification
(https://mudstandards.org/websocket/).

New subprotocols:
  - json.mudstandards.org: JSON envelope format with structured OOB
  - gmcp.mudstandards.org: GMCP over WebSocket (TEXT + BINARY frames)
  - terminal.mudstandards.org: Raw ANSI/UTF-8 in BINARY frames

Architecture:
  Wire format strategy pattern via composition. A single WebSocketClient
  delegates encoding/decoding to a WireFormat instance selected during
  onConnect(). Adding a new format means adding a single file to the
  wire_formats/ package with zero changes to webclient.py.

Backward compatibility:
  Clients that send no Sec-WebSocket-Protocol header (including the
  built-in Evennia webclient) get v1.evennia.com format automatically.
  Existing behavior is fully preserved.

Additional changes:
  - Extract shared GMCP encode/decode into gmcp_utils.py (used by both
    telnet and websocket GMCP paths)
  - Add WEBSOCKET_SUBPROTOCOLS setting for server-side format control
  - Built-in JS webclient now sends Sec-WebSocket-Protocol: v1.evennia.com
  - Comprehensive test suite for all wire formats (~870 lines)
2026-02-16 10:21:52 -08:00
2022-11-10 22:21:12 +01:00
2026-02-15 18:57:12 +01:00
2024-02-04 22:11:36 +01:00
2026-02-15 18:57:12 +01:00
2026-02-15 19:15:58 +01:00
2022-10-20 23:57:12 +02:00
2023-07-27 08:50:51 +02:00
2026-02-15 00:42:28 +01:00
2022-07-25 09:18:20 +02:00
2022-12-07 20:39:44 +01:00
2026-02-15 18:57:12 +01:00
2026-02-15 18:57:12 +01:00
2022-11-19 01:25:55 +01:00

Evennia MUD/MU* Creation System

unittestciimg Coverage Status Pypi Version

Evennia is a modern library for creating online multiplayer text games (MUD, MUSH, MUX, MUCK, MOO etc) in pure Python. It allows game creators to design and flesh out their ideas with great freedom.

Evennia does not impose a particular style, genre or game mechanic. Instead it solves the boring networking and basic stuff all online games need. It provides a framework and tools for you to build the game you want. Coding in Evennia is done using normal Python modules imported into the server at runtime.

Evennia has extensive documentation. It also has a very active community with discussion forums and a discord server to help and support you!

Installation

pip install evennia
    (windows users once: py -m evennia)
    (note: Windows users with multiple Python versions should prefer `py -3.11` instead of `python` when creating virtual environments)
evennia --init mygame
cd mygame
evennia migrate
evennia start / stop / reload

See the full installation instructions for more help.

Next, browse to http://localhost:4001 or use your third-party mud client to connect to localhost, port 4000 to see your working (if empty) game!

screenshot A game website is created automatically. Connect to your Evennia game from your web browser as well as using traditional third-party clients.

Where to go next

If this piqued your interest, there is a lengthier introduction to read. You can also read our Evennia in pictures overview. After that, why not check out the Evennia Beginner tutorial.

Welcome!

Languages
Python 95.1%
JavaScript 2.2%
HTML 1.3%
CSS 1.1%
Shell 0.1%