• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

The Forgotten Client - open source Tibia Client written by SaiyansKing

Gover

Well-Known Member
Joined
Sep 3, 2009
Messages
129
Reaction score
67
Hello,
Yesterday I was digging in this forum and I found this github repo in one of the threads (mentioned in a comment):

I compiled it with no issues, make few changes to make it work with 772 pic/protocol and it is really looking good.

I do not found any other informations about this client - it looks like it indeed gets forgotten.

I only tested it for 30minutes and already found some bugs, but not critical one's.

What do you guys think - is it worth to try to make this client stable or not? It would be great to have alternative client (other then otclient which I believe is already great and stable).

I'm suprised that this client do not have a dedicated thread - is it a totally garbage that it do not even deserves a thread?

I looked through a code and found that this client is trying to be compatible with versions up to 12.x (with all this "trade" features etc). With so many 7.4/old school releases - maybe it would be a good idea to downgrade this client to make it work only with 7.4/772 downgraded TFS? And make it as close as possible to the original 7.7 vanilla client..

Regards,
Gover
 
Hehe I already tried your 7.1 version and it looks great.
Maybe you have more experience with this open-source client then?
Is it smooth like vanilla one? did you maybe test it in bigger scale with more active players using it?
I will definitely test it further today.
 
Hehe I already tried your 7.1 version and it looks great.
Maybe you have more experience with this open-source client then?
Is it smooth like vanilla one? did you maybe test it in bigger scale with more active players using it?
I will definitely test it further today.
Well actually i claim that this client is better than official one from cipsoft atleast for my server, as i’m using the real cip engine i have tested both clients and mine works much way better and faster also it is better than otc 👀 for me ofc
 
Nice! good to hear. Then maybe it's worth fixing :)
Im testing it now. At start I see that only Software, Dx9 and Vulcan is working. Using OpenGL/Dx11 crash the client.
I will try to catch and fix some of the problems like this one and maybe I will upload the patched version here for community.
 
Hey, I tested this client too. I downloaded and compiled it without errors, but when I open it, the screen is completely glitched/corrupted.

Do you know what could cause this? Wrong pic/dat/spr, wrong assets path, or something related to the Direct3D render?

How did you get it running correctly?


1778863491097.webp
 
Hey, I tested this client too. I downloaded and compiled it without errors, but when I open it, the screen is completely glitched/corrupted.

Do you know what could cause this? Wrong pic/dat/spr, wrong assets path, or something related to the Direct3D render?

How did you get it running correctly?


View attachment 100388
g_game.enableFeature(GameSpritesAlphaChannel)
 
i put todays work on download section. It's in approval state.

Changes made:

Rendering Bugfixes
-engine.cpp — LoadPicture(): Fixed pixel format for Tibia.pic — client was reading 4 bytes (RGBA) instead of 3 (RGB), causing the entire GUI to render scrambled
-protocol.cpp — getProtocolVersion() / getClientVersion(): Both were returning the override flag value (1) instead of the actual protocol version (772), causing "Protocol mismatched" on login
-surfaceDirect3D11.cpp — loadSprite() / loadSpriteMask(): Pixel copy loop was iterating texture->m_height (atlas size) instead of 32 (sprite size), causing an access violation crash when switching to D3D11
-surfaceOpengl.cpp, surfaceOpenglCore.cpp, surfaceOpengles.cpp, surfaceOpengles2.cpp — isSupported(): GL_ATI_meminfo returns 4 values but code only allocated int vram (4 bytes) — fixed to int vram[4], resolving a stack corruption crash on OpenGL renderers

Version Configuration
-const.h: Set CLIENT_OVVERIDE_VERSION = 1, CLIENT_OVERRIDE_PROTOCOL_VERSION = 772, CLIENT_OVERRIDE_FILE_VERSION = 772
-game.cpp — clientChangeVersion(): Added GAME_FEATURE_EXTENDED_SPRITES for version 772 to support .dat/.spr files with more than 65535 sprites
-gui_const.h: Replaced configure button icon with scrollbar down arrow; removed broken bottom-left/right panel border sprites


UI — Hotkeys Window
-Hotkeys.cpp: Full rewrite — new "Hotkey Options" window with F1–F12 / Shift+F1–F12 / Ctrl+F1–F12 slots, text input field, "Send automatically" checkbox, live list update on typing, auto-focus on text field after row selection, white/grey color per row based on sendAuto state
-engine.cpp — bindHotkeyAction(): New function to assign text to a hotkey slot
-engine.cpp — CLIENT_HOTKEY_ACTION handler: Implemented — sends text automatically or pastes it into chat input
-engine.h: Added bindHotkeyAction() declaration
GUI_Window.h
+ GUI_Window.cpp: Added lockActiveElement(bool) and m_lockActive — permanently locks focus on the text field after a hotkey row is selected

UI — Inventory / Soul
-Inventory.cpp
— GUI_Icons::render(): New 2D grid layout (max 6 icons, patterns: 1 / 2 / 2+1 / 2+2 / 3+2 / 3+3), anchored to absolute screen position
Inventory.cpp
— GUI_Icons::onMouseMove(): Rewritten hover tooltips to match the new 2D layout
Inventory.cpp
— inventory panel: Removed Soul background, labels and old status bar strip; status icons moved into the Soul area; panel height reduced accordingly
SkillsWindow.cpp
: Removed "Soul Points" row from the stats list and its update handler


UI — Panel Window Resize
GUI_PanelWindow.cpp
— setRect(): Children are no longer moved when only y1 changes (resize from top) — movement only happens on drag
GUI_PanelWindow.cpp
— render(): Panel background anchored to absolute screen position via setClipRect + y=0; removed resizer graphic
GUI_Panel.cpp
— checkPanels(): setRect() is now only called when position actually changed
GUI_Panel.cpp
— render(): Free-space background anchored via setClipRect
Chat.cpp
— render(): Chat background anchored to absolute screen position via setClipRect + y=0 — background tiles no longer shift during resize

Graphics Engines
surfaceSoftware.cpp — drawBackground(): Fixed pixel copy to account for window surface pitch

Automap Path
main.cpp: g_mapPath changed from AppData\TheForgottenClient\Automap\ to the directory next to the .exe — makes it easy to distribute a pre-filled minimap with the client

I will make further changes specifically for my server (and will not release it), but if you find any bug - I can try to repair it.

1778880590340.webp


New changelog till now. Few fixes
1. Hotkeys — Arrow Key Navigation
Files:
Hotkeys.cpp, GUI_Element.h, GUI_ListBox.h, GUI_Window.cpp

-Added virtual bool wantsArrowKeys() to GUI_Element base class (returns false by default)
-Overridden in GUI_ListBox to return true
-GUI_Window::onKeyDown now forwards UP/DOWN to the first child that wantsArrowKeys() when the active element doesn't handle them
-Hotkeys window opens with focus on the listbox — pressing UP or DOWN immediately selects F1 (row 0) from unselected state
-After first row selection, focus locks to the textbox; subsequent arrow presses are forwarded back to the listbox

2. Server Log — Toggle Option
Files: engine.h, engine.cpp, Chat.h, Chat.cpp, GeneralOptions.cpp

-New option m_serverLogInDefault (default: true = Server Log visible) in Engine
-Saved/loaded as ServerLogInDefault in config.cfg
-New method Chat::setServerLogVisible(bool) — when false: silently removes the Server Log channel from the panel (no server packet sent), switches view to Default if Server Log was active, enables workAsServerLog on Default channel so server messages appear there instead; when true: re-opens the Server Log channel and disables the mirror
-New checkbox "Server Log Enabled" added to General Options window (window height extended from 444px to 477px, EventID 1014)
-Change applies immediately when clicking OK — no reconnect needed

3. Soul Points Tooltip — Removed
Files:
Inventory.cpp

-Removed INVENTORY_SOUL_DESCRIPTION and INVENTORY_SOUL_EVENTID defines (dead code)
-Both GUI_StaticImage instances for the status background area (minimized and maximized inventory) now pass an empty string as tooltip — no tooltip appears when hovering over the background

4. Skills Window — Soul Points Dead Code Cleanup
Files:
SkillsWindow.cpp

-Removed SKILLS_SOUL_TITLE and SKILLS_SOUL_EVENTID defines
-Removed the dead case SKILLS_SOUL_EVENTID handler from the skills event switch

5. Panel Window Drag — Ghost Image Fix
Files:
GUI_PanelWindow.cpp

-During drag, the original slot of the dragged window was rendered with a DARKGREY texture (drawPictureRepeat) — this caused a "ghost/multiplied" artifact at the source position
Replaced with fillRectangle(0, 0, 0, 255) — the slot is now filled with a clean black rectangle, matching original Tibia client behavior

6. Hotkeys — Key Repeat Support
Files: engine.cpp

-Removed event.key.repeat == 0 guard from the CLIENT_HOTKEY_ACTION handler
-Holding a hotkey now repeatedly fires the action using the OS key-repeat mechanism (SDL SDL_KEYDOWN with repeat > 0) — same timing as holding any regular key: instant first trigger, ~500ms delay, then rapid repeat

My post with source code in Download->Tools is still in "Approval state".
Once it get's accepted I will send a link in this post.
 
Last edited:
More then 24hours to accept the new thread. Recruitment is really required.
 
I was playing around with Fabian’s client and added some memory addresses from the default CIP 8.6 client. ElfBot recognized it without any problem lol.

This unlocks a lot of things. My TFS 1.8 already has several systems, like Forge, Imbuements, Prey and Market, and the client handled everything fine without issues.

It’s very smooth and optimized. On Windows, it’s using only around 17 MB, while OTCv8 can reach something like 700–900 MB.

I’m really liking Fabian’s client. I’m sure there’s a lot of room to improve it even more.
Post automatically merged:

I still don’t understand why OTLand never forked Fabian’s TFS.


His TFS is much superior, very optimized and robust. I already tested it several times and I’m really enjoying it. I even took some ideas from his code and implemented them into my TFS 1.8.


And also, why didn’t OTLand fork Fabian’s client?


That client is unreal. It is still incomplete, yes, but it has a lot of potential. With enough fixes and improvements, it could become almost 100% perfect, very close to the original CIP client in visual, behavior and everything else.


Fabian is a genius.
 
Last edited:
I dont know how many times i said that.. this client is much way better than otc 😅 keep working on it i bet you wont use any other client
I saw few posts where you recommended this client, I should find it few years ago
 
Its ready to download if yout guys want to test it.
 
I was playing around with Fabian’s client and added some memory addresses from the default CIP 8.6 client. ElfBot recognized it without any problem lol.

This unlocks a lot of things. My TFS 1.8 already has several systems, like Forge, Imbuements, Prey and Market, and the client handled everything fine without issues.

It’s very smooth and optimized. On Windows, it’s using only around 17 MB, while OTCv8 can reach something like 700–900 MB.

I’m really liking Fabian’s client. I’m sure there’s a lot of room to improve it even more.
Post automatically merged:

I still don’t understand why OTLand never forked Fabian’s TFS.


His TFS is much superior, very optimized and robust. I already tested it several times and I’m really enjoying it. I even took some ideas from his code and implemented them into my TFS 1.8.


And also, why didn’t OTLand fork Fabian’s client?


That client is unreal. It is still incomplete, yes, but it has a lot of potential. With enough fixes and improvements, it could become almost 100% perfect, very close to the original CIP client in visual, behavior and everything else.


Fabian is a genius.


"ElfBot recognized it without any problem lol."
-As far as you have full client source - you can try to block all the 3rd party software like elfbot.
Maybe we will try together as a community to make a changes which would block all kid of stock bots out there.

I will also try to migrate the CAM feature from DLL to this client - and also will try to get an opportinity to download player's cams to the dedicated server, as a proof of cheating/breaking rules or to AI Analysis (if possible of course).

Regards,
Gover
 
Back
Top