Otclient
An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Install / Use
/learn @opentibiabr/OtclientREADME
<a id="table-of-contents"></a>📋 Table of Contents
What is OTClient?
- 🚀 Features
- <img height="16" src="https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/android/android.png"/> The Mobile Project
- 🔨 Compiling
- 🐳 Docker
- 🩺 Need Help?
- 📑 Bugs
- ❤️ Roadmap
- 💯 Support Protocol
- ©️ License
- ❤️ Contributors
<a id="what-is-otclient"></a>
What is OTClient?
OTClient is an alternative Tibia client for usage with OTServ. It aims to be complete and flexible:
- LUA scripting for all game interface functionality
- CSS-like syntax for UI design
- Modular system: each functionality is a separate module, allowing easy customization
- Users can create new mods and extend the interface
- Written in C++20 and heavily scripted in LUA
For a server to connect to, you can build your own with theforgottenserver or canary.
[!NOTE] Based on edubart/otclient • Rev: 2.760
<a id="features"></a>🚀 Features
Beyond its flexibility with scripts, OTClient comes with many features that enable client-side innovation in OTServ: sound system, graphics effects with shaders, modules/addons, animated textures, styleable UI, transparency, multi-language, in-game LUA terminal, and an OpenGL 2.0 ES engine that allows porting to mobile platforms. It is also flexible enough to create Tibia tools like map editors using scripts—OTClient is a framework + Tibia APIs.
⚡ Performance & Engine
<details> <summary>🖼️ Draw Render (optimization showcase)</summary>https://github.com/user-attachments/assets/fe5f1d7f-7195-4d65-bca6-c2b5d62d3890
</details> <details> <summary>📦 Asynchronous Texture Loading</summary>-
Description: with this the spr file is not cached, consequently, less RAM is consumed.
-
Video:
https://github.com/kokekanon/otclient.readme/assets/114332266/f3b7916a-d6ed-46f5-b516-30421de4616d
Main Thread
- Sound
- Particles
- Load Textures (files)
- Windows Events (keyboard, mouse, ...)
- Draw texture
Thread 2
- Connection
- Events (g_dispatcher)
- Collect information on what will be drawn on the Map
Thread 3
- Collect information on what will be drawn in the UI
Image:
Description (1):
Garbage Collection is the feature responsible for automatically managing memory by identifying and releasing objects that are no longer in use. This allows the client to maintain efficient memory usage, avoid unnecessary data accumulation, and improve overall stability.
Description (2):
Garbage collector is used to check what is no longer being used and remove it from memory. (lua, texture, drawpool, thingtype)
(coming with engine improvements and draw-call reduction)
</details>- C++20 ( v17 , Unity build and Manifest Mode (vcpkg.json) ) build in x32 and x64
- Walking System Improvements
- Supports sequenced packages and compression
- Asserts load (Tibia 13)
🎛️ UI & UX
<details> <summary>🧩 UIWidgets Improvements</summary>-
Description: Improvements in the UI algorithm; better performance in add/remove/reposition widgets. Visible in the battle module.
-
Video:
https://github.com/user-attachments/assets/35c79819-b78b-4578-a4a2-af1235139807
Activate: g_modules.enableAutoReload() (init.lua)
Video:
https://github.com/kokekanon/otclient.readme/assets/114332266/0c382d93-6217-4efa-8f22-b51844801df4
</details> <details> <summary>✨ Attached Effects System (aura, wings…)</summary>- Compatible with .APNG
- ThingCategoryEffect
- ThingCategoryCreature
- ThingExternalTexture: images in PNG | APNG
- Wiki: https://github.com/mehah/otclient/wiki/Tutorial-Attached-Effects
- Example Code: effects.lua • test code
- Specific lookType settings: outfit_618.lua
<p align="center"> <table> <tr> <td><img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Creature/001_Bone.gif?raw=true" width="200"></td> <td><img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Creature/002_aura.gif?raw=true" width="200"></td> <td><img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Creature/003_particula.gif?raw=true" width="250"></td> </tr> <tr> <td align="center">ThingCategory Attached Effect</td> <td align="center">Texture (PNG) Attached Effect</td> <td align="center">Particule</td> </tr> </table> </p> </details> <details> <summary>🧭 Module Controller System</summary>[!TIP] You can adjust offsets per looktype using ThingConfig when a default offset doesn’t align perfectly for a given sprite.
A safer way to create modules, without the need to unbind keys, disconnect events, or destroy widgets.
Example: (modules/game_minimap/minimap.lua)
- Note: Smooth Retro will consume a little more GPU.
GIF:
- Enable: setup.otml
- Style: modules/game_creatureinformation
- Note: There is a performance degradation vs direct Draw Pool, about ~20%, tested with 60 monsters attacking each other.
Video:
https://github.com/kokekanon/otclient.readme/assets/114332266/c2567f3f-136e-4e11-964f-3ade89c0056b
</details> <details> <summary>🧱 Tile Widget</summary>Wiki: https://github.com/mehah/otclient/wiki/Tutorial-Attached-Effects
<p align="center"> <table> <tr> <td><img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Tile/001_attachedeffect.gif?raw=true" width="250"></td> <td><img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/blob/main/Picture/Attached%20Effect/Tile/002_widget.png?raw=true" width="200"></td> <td><img src="https://github.com/kokekanon/OTredemption-Picture-NODELETE/raw/main/Picture/Attached%20Effect/Tile/003_particulas.gif?raw=true" width="310"></td> </tr> <tr> <td align="center">Title Attached Effect</td> <td align="center">Title Widget</td> <td align="center">Title Particule</td> </tr> </table> </p> </details> <details> <summary>🧩 Support HTML/CSS Syntax</summary>https://github.com/user-attachments/assets/b16359d3-09a4-4181-bcb8-c76339b64b37
https://github.com/user-attachments/assets/d3844223-7e35-45da-a872-3141f1c5860a
https://github.com/user-attachments/assets/9f20814f-0aed-4b70-8852-334ac745ec11
https://github.com/user-attachments/assets/3ac8473c-8e90-4639-b815-ef183c7e2adf
Module examples:
</details> <details> <summary>🎥 Latency-adaptive camera</summary>Basically the camera adapts to the server latency to always remain smooth and avoid stuttering while walking.
If the ping gets high, the camera moves slower to keep up with the server's response time; if the ping drops, the camera moves faster. (Depends on character speed.)
- Compatible with ObjectBuilderV0.5.5
- Enable:
g_game.enableFeature(GameNegativeOffset)
Video:
https://github.com/kokekanon/otclient.readme/assets/114332266/16aaa78b-fc55-4c6e-ae63-7c4063c5b032
</details>- Floor Shadowing
- Highlight Mouse Target (press Shift to select any object)
- Floor View Mode (Normal, Fade, Locked, Always, Always with transparency)
- Floating Effects

