Skip to content
/ otclient Public

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

License

Notifications You must be signed in to change notification settings

mehah/otclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo OTClient - Redemption

Discord Shield Build - Ubuntu Build - Windows License: MIT


πŸ“‹ Table of Contents

  1. Logo What is OTClient?
  2. πŸš€ Features
  3. The Mobile Project
  4. πŸ”¨ Compiling
  5. 🐳 Docker
  6. 🩺 Need Help?
  7. πŸ“‘ Bugs
  8. ❀️ Roadmap
  9. πŸ’― Support Protocol
  10. ©️ License
  11. ❀️ Contributors

Logo 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


πŸš€ 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

πŸ–ΌοΈ Draw Render (optimization showcase)
460783937-d8a36c7e-b5ba-46ac-a881-a42f76a9eb01.mp4
πŸ“¦ Asynchronous Texture Loading
  • Description: with this the spr file is not cached, consequently, less RAM is consumed.

  • Video:

    Asynchronous.texture.loading.mp4
🧡 Multi-threading

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:
multinucleo

🧹 Garbage Collection

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)

🧭 Texture Atlas System

(coming with engine improvements and draw-call reduction)

  • 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

🧩 UIWidgets Improvements
  • Description: Improvements in the UI algorithm; better performance in add/remove/reposition widgets. Visible in the battle module.

  • Video:

    460149646-4eee68e4-7572-4232-b762-65f4d50219ee.mp4
πŸ” Auto Reload Module

Activate: g_modules.enableAutoReload() (init.lua)
Video:

2022-11-17_17-45-35-1.1.mp4
✨ Attached Effects System (aura, wings…)

[!TIP] You can adjust offsets per looktype using ThingConfig when a default offset doesn’t align perfectly for a given sprite.

ThingCategory Attached Effect Texture (PNG) Attached Effect Particule

🧭 Module Controller System

A safer way to create modules, without the need to unbind keys, disconnect events, or destroy widgets.
Example: (modules/game_minimap/minimap.lua)

πŸ–ΌοΈ Anti-Aliasing Mode Options
  • Note: Smooth Retro will consume a little more GPU.

GIF:
aa

🧩 Creature Information by UIWidget

Video:

Video_Sem_Titulo_Feito_Com_O_Clipchamp1.mp4
🧱 Tile Widget

Wiki: https://github.com/mehah/otclient/wiki/Tutorial-Attached-Effects

Title Attached Effect Title Widget Title Particule

🧩 Support HTML/CSS Syntax
Video_Sem_Titulo_Feito_Com_O_Clipchamp1.mp4
349623570-3fa1803a-2759-4b2f-890e-05f987f43260.mp4

Module examples:

πŸŽ₯ Latency-adaptive camera

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.)

🧭 Support Negative Offset (.dat)

Video:

offsets.mp4
  • Floor Shadowing
  • Highlight Mouse Target (press Shift to select any object)
  • Floor View Mode (Normal, Fade, Locked, Always, Always with transparency)
  • Floating Effects Option
  • Refactored Walk System
  • Support for more mouse buttons (e.g., 4 and 5)
  • Support DirectX
  • Hud Scale

πŸ”— Compatibility & Protocols

  • Client 12.85 ~ 12.92, 13.00 ~ 13.40 support (protobuf)
  • Market rewritten (compatible with TFS and Canary)
  • Async Texture Loading (engine-level feature)
  • Supports sequenced packages and compression

Note

See section πŸ’― Support Protocol for a full compatibility matrix and required flags.


🧩 Community Mods & Integrations

πŸ™‹ Community (Features)

πŸ•ΉοΈ Discord RPC β€” @SkullzOTS *(Doesn't work with CMAKE)*

Example interface Example in game future discord-game-sdk

πŸ” Encryption System β€” @Mrpox *(unsafe implementation)*
  • by @Mrpox
  • Enable via config.h: set ENABLE_ENCRYPTION=1 and change ENCRYPTION_PASSWORD
  • To enable building encryption with --encrypt, set ENABLE_ENCRYPTION_BUILDER=1 (by @TheMaoci) β€” removes encryption code from production build
  • Generate encrypted files by running client with: --encrypt SET_YOUR_PASSWORD_HERE (or omit to use the password from config.h)

[!WARNING] This encryption implementation is considered unsafe. Use at your own risk.

⬆️ Client Updater β€” @conde2
🌈 Colored Text β€” @conde2
  • by @conde2
  • Usage: widget:setColoredText("{Colored text, #ff00ff} normal text")
πŸ”³ QR Code support β€” @conde2
  • by @conde2
  • UIQrCode properties example:
    • code-border: 2
    • code: Hail OTClient Redemption - Conde2 Dev
πŸ’¬ Typing Icon β€” @SkullzOTS

πŸͺœ Smooth Walk Elevation β€” @SkullzOTS

πŸ—ΊοΈ Layout based on Tibia 13 β€” @marcosvf132

Status service
Put ./otclient/tools/api/status.php in:
C:/UniServerZ/www/api/

If it doesn't work, enable curl:

image image

Interface In-game

  • Imbuement tracker β€” by @Reyaleman
  • Blessing
  • Screenshot
  • Highscores
  • Store (compatible with 1098, 12.91 ~ 13.40)
  • QuickLoot
  • Groups Vip
  • Reward Wall (Daily Rewards)
🌐 Browser Client β€” @OTArchive

Interface Density Pixel Joystick (patrykq)

  • Support HTTP/HTTPS/WS/WSS β€” by @alfuveam
  • Support Tibia 12.85/protobuf by @Nekiro
  • Action Bar β€” by @DipSet
  • Access to widget children via widget.childId β€” by @Hugo0x1337
  • Shader System Fix (CTRL + Y) β€” by @FreshyPeshy

Creature Map Mount

Example 1 Example 2 Example 3
001_example.mp4
002_example.mp4
003_example.mp4

πŸ’Έ Sponsored (Features)

Creature Items UICreature

πŸ”¦ OTClient V8 (Features)

  • Lighting System
  • Floor Fading
  • Path Finding
  • Module Shop
  • Module Outfit
  • Placeholder
  • UIGraph
  • Keybinds
  • Cam system

The Mobile Project

This is a fork of edubart's OTClient. The objective of this fork is to develop a runnable OTClient on mobile devices.

Tasks

  • Compile on Android devices
  • Compile on Apple devices
  • Adapt the UI reusing the existing LUA code

Current compiling tutorials


πŸ”¨ Compiling

If you are interested in compiling this project, visit the Wiki.


🐳 Docker

In order to build the app for production, run the following commands:

1) Build the image

docker build -t mehah/otclient .

2) Run the built image

# Disable access control for the X server.
xhost +

# Run the container image with the required bindings to the host devices and volumes.
docker run -it --rm \
  --env DISPLAY \
  --volume /tmp/.X11-unix:/tmp/.X11-unix \
  --device /dev/dri \
  --device /dev/snd mehah/otclient /bin/bash

# Enable access control for the X server.
xhost -

🩺 Need Help?

Ask questions on Discord: https://discord.gg/tUjTBZzMCy


πŸ“‘ Bugs

Found a bug? Please create an issue in our bug tracker.

Tip

If using Nostalrius 7.2, Nekiro TFS-1.5-Downgrades-7.72 OR any protocol below 860 and the walking system is stuttering, set
force-new-walking-formula: true in data/setup.otml.
In old protocols, if item speed feels too fast, adjust
item-ticks-per-frame: 75 in data/setup.otml.


❀️ Roadmap

TO-DO list Status PR
wheel of destiny None
Forge None
Analyzer #802
Sound tibia 13 #1098

πŸ’― Support Protocol

Protocol / version Description Required Feature Compatibility
TFS (7.72) Downgrade nekiro / Nostalrius force-new-walking-formula: true β€’ item-ticks-per-frame: 500 βœ…
TFS 0.4 (8.6) Fir3element item-ticks-per-frame: 500 βœ…
TFS 1.5 (8.0 / 8.60) Downgrade nekiro / MillhioreBT force-new-walking-formula: true β€’ item-ticks-per-frame: 500 βœ…
TFS 1.4.2 (10.98) Release Otland βœ…
TFS 1.6 (13.10) Main repo otland (2024) See wiki βœ…
Canary (13.21 / 13.32 / 13.40) OpenTibiaBr See Wiki βœ…
Canary (14.00 ~ 14.12) OpenTibiaBr See Wiki βœ…
Canary (15.00 ~ 15.10) OpenTibiaBr See Wiki ❌

©️ License

OTClient is made available under the MIT License β€” you are free to use it for commercial, non-commercial, closed or open projects.
See: MIT License


❀️ Contributors

If you are interested in supporting the project, donate here:
PayPal

About

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

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages