• 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!

Technical presentation of Cipsofts software architecture of Tibia (2011)

Worr

Veteran OT User
Joined
Jan 23, 2011
Messages
1,449
Reaction score
371
Location
Sweden
I found this on Reddit and thought it might be interesting to some. It has a chart over all the components including stuff like game servers, login servers, database, query managers and each node has some bullet points with reasoning, pros/cons, lessons learned and so on.
 

Attachments

  • Matthias_Rudy_ProgrammingTrack_InsideTibiaArchitecture.pdf
    7.3 MB · Views: 165 · VirusTotal
Funny enough, its the same architecture found in the leaked files (2005). Once a while they have some major bugs (with rollbacks) that imply the architecture is still the same in general.
 
Last edited:
I found this on Reddit and thought it might be interesting to some. It has a chart over all the components including stuff like game servers, login servers, database, query managers and each node has some bullet points with reasoning, pros/cons, lessons learned and so on.
its not accurate to post detailed Business information without their consent unless it was leaked.
I dont think you are gonna get sued by Cipsoft for that but take it into account
 
its not accurate to post detailed Business information without their consent unless it was leaked.
I dont think you are gonna get sued by Cipsoft for that but take it into account
It morelike seems to be something like a presentation, as on the last page of the pdf document it says 'gamescom'.
 
its not accurate to post detailed Business information without their consent unless it was leaked.
I dont think you are gonna get sued by Cipsoft for that but take it into account

Yes, Cipsoft are well known to sue people for stealing stuff........
 
What I enjoyed reading was the querymanager part, since I am making one for a big project and under TVP, it makes sense and it actually makes it easier for multi-world since SQL dies in such 150+ latencies.
 
Very interesting! Thanks for sharing. Does anybody know if TFS uses async I/O too? So when a player sends a parcel to another player that is offline, does the server block and wait for the MySQL query to update the player file? From the src it doesn't look like it but I'm not into C++.
 
Very interesting! Thanks for sharing. Does anybody know if TFS uses async I/O too? So when a player sends a parcel to another player that is offline, does the server block and wait for the MySQL query to update the player file? From the src it doesn't look like it but I'm not into C++.
It's not. Sending parcel freezes server for save time.

I made async version and posted on github 2 or 3 years ago.
It loaded characters in sync, but you could enable RAM cache and pre-load all characters on server start.
Save of characters was async and with X seconds threshold, so spamming parcels would block save of given character and not overload database.
It could be better, if it does not copy all items in RAM every load/save, just move them between 'cache' and 'in game' states, but that would require a lot of changes in items management (ex. decay system).
 
It's not. Sending parcel freezes server for save time.

I made async version and posted on github 2 or 3 years ago.
It loaded characters in sync, but you could enable RAM cache and pre-load all characters on server start.
Save of characters was async and with X seconds threshold, so spamming parcels would block save of given character and not overload database.
It could be better, if it does not copy all items in RAM every load/save, just move them between 'cache' and 'in game' states, but that would require a lot of changes in items management (ex. decay system).
Makes sense.

A good couple of years ago (5-7?), there was a parcel/mail exploit a guild was using to bog down cipsoft's server's until they crashed, and about 50 people +- got severe bans.
 
It's not. Sending parcel freezes server for save time.

I made async version and posted on github 2 or 3 years ago.
It loaded characters in sync, but you could enable RAM cache and pre-load all characters on server start.
Save of characters was async and with X seconds threshold, so spamming parcels would block save of given character and not overload database.
It could be better, if it does not copy all items in RAM every load/save, just move them between 'cache' and 'in game' states, but that would require a lot of changes in items management (ex. decay system).

Great! Thanks for the answer. I suppose this is the easiest solution because with async I/O you're eventually going to run into race conditions that need to be solved. Like a playing logging in just when they are receiving a parcel; copying over the old state from disk -- making the parcel effectively go lost.
 
Great! Thanks for the answer. I suppose this is the easiest solution because with async I/O you're eventually going to run into race conditions that need to be solved. Like a playing logging in just when they are receiving a parcel; copying over the old state from disk -- making the parcel effectively go lost.
At the moment, even in latest TFS, sending a parcel with over 20k items freezes the server, and at times crashes it, even having a house with many many items and doing !leavehouse, freezes the server, this bug has been unresolved in the public repo, however, custom servers fix this by setting a limit to the depot unlike Tibia where there is no limit for situations like this.
 
I found this on Reddit and thought it might be interesting to some. It has a chart over all the components including stuff like game servers, login servers, database, query managers and each node has some bullet points with reasoning, pros/cons, lessons learned and so on.
Liked it!
It's funny to look at protocolgame/server/connection and see XTEA and RSA being used, as described in the pdf
 
Back
Top