PHP FRAMEWORK / TEEWORLDS 0.6
Stop rebasing.
Build your mod.
Keep your game logic in your own project. TeeFrame is a package dependency, not a repository fork you have to keep rebasing over and over again.
01 / DOCUMENTATION
Protocol and map references.
Protocol documentation
How the Teeworlds client and server communicate.
- 01Packet structure and encoding
- 02System and game messages
- 03Snapshots and delta compression
Map documentation
How Teeworlds maps are stored and loaded.
- 01Datafile structure and map items
- 02Layers and envelopes
- 03Game tiles and collision
02 / THE PURPOSE
Mods deserve their own project.
TeeFrame is a PHP framework for building Teeworlds 0.6 game servers. It provides the networking, physics, snapshots, and map handling, so you can focus on building your mod instead of maintaining a fork.
When your mod lives inside a fork, keeping it up to date means merging upstream commits, resolving conflicts, and checking how the changes affect your own code. Maintaining the fork becomes part of maintaining the game.
TeeFrame exists to separate those responsibilities. Your mod lives in its own project, while the engine is installed through Composer. Update the framework as a dependency instead of repeatedly rebasing for every new change upstream.
03 / FRAMEWORK
Your mod isn't a full-game fork.
Write your controllers, entities, and commands in the skeleton. The engine stays in vendor/, managed by Composer.
Update the framework without merging engine commits into your game code.
Browse the frameworkapp/
GameController.php
World.php
server.php
vendor/teeframe/framework/
game/
network/
server/
UPDATE THE ENGINE
composer update teeframe/framework04 / FEATURES
What's in the engine.
Multiple worlds. One server.
Run different maps and game modes together. Each world has its own controller, entities, and players.
dm1.mapDeathmatch
Custom game logic
Extend controllers, add entities, and register custom chat commands.
FULL MODULAR
Physics and snapshots
The engine handles character movement, weapons, and snapshots for the client.
WORRY FREE
Maps and collision
Load Teeworlds maps and use the game layer for collision, pickups, and spawn points.
Per-world tuning
Set movement, gravity, hook, and weapon parameters separately for each world.
05 / GET STARTED
Run your first server.
The skeleton includes a deathmatch world. Start it locally, then change the game logic in app/.
01Install system dependencies
02Clone the skeleton
git clone https://github.com/teeframe/teeframe.gitcd teeframe03Install dependencies
composer install04Start the server
php server.php