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

C++ Starting with TFS and understanding the sources

rafaking

New Member
Joined
Aug 12, 2009
Messages
24
Reaction score
0
Can someone please tell me the best path / way to start studying and understanding TFS sources? I want in the future to contribute.
Thanks!
 
Solution
There are lots of C++ tutorials on the internet, im not sure exacly which you should follow. I know that @Don Daniello has access to lots of good stuff here, might be worth asking him for guidance.

Specifically in regard to the TFS sources, less about the coding language and more about just understanding the TFS code itself, I basically asked @Mark the same question back in 2014 and he replied:

Mark said:
Mark Samman:
understand the purpose of the different threads, especially dispatcher,
and then understand how the server goes from receiving a packet to processing it and performing something
(connection (asio thread) -> protocol -> (task dispatched to run in dispatcher thread) -> game)

Mark Samman: otserv.cpp is a good start...
There are lots of C++ tutorials on the internet, im not sure exacly which you should follow. I know that @Don Daniello has access to lots of good stuff here, might be worth asking him for guidance.

Specifically in regard to the TFS sources, less about the coding language and more about just understanding the TFS code itself, I basically asked @Mark the same question back in 2014 and he replied:

Mark said:
Mark Samman:
understand the purpose of the different threads, especially dispatcher,
and then understand how the server goes from receiving a packet to processing it and performing something
(connection (asio thread) -> protocol -> (task dispatched to run in dispatcher thread) -> game)

Mark Samman: otserv.cpp is a good start, then look at tasks/scheduler/connection/server

We are working a bit on the wiki: Home · otland/forgottenserver Wiki · GitHub
Its a decent place for tutorial on simple things like compiling the source code, and Lua function reference. But its a bit lacking when it comes to understanding whats going on inside those C++ files.

Pay attention to all pull requests and commits on the main repo. Reading and understanding these purpose-specific mouthfulls of code can be an easy way to get a touch of the code without getting completely overwhelmed.
 
Solution
Back
Top