GoOT (Golang Server)

rwxsu

Computer Engineer
Joined
Mar 31, 2018
Messages
85
Best answers
3
Reaction score
119
Location
Jugoslavija
I just started writing a server in Go using SharpOT and old YurOTS as a reference.

It's just for learning and it's not meant to compete with TFS.

My goal is to write parsers to have it compatible with the leaked cipsoft files (like Nostalrius did with the .npc files). Starting with protocol 7.4

Advice, pull-requests, and code reviews are appreciated. Feel free to help or watch: rwxsu/goot

Progress:
Load map from .sec files (4 different sectors are displayed in the picture below)

progress.png
 

tarantonio

Old School Player
Joined
Jun 21, 2009
Messages
713
Best answers
0
Reaction score
172
Amazing project @rwxsu, it's nice to see some fresh ideas like this one.
I would like you to share some experiences programming this OT here in go.
It can be played with standard clients or it requires something different?
A guide on how to compile would be nice too. I will test it if you want.
 
OP
rwxsu

rwxsu

Computer Engineer
Joined
Mar 31, 2018
Messages
85
Best answers
3
Reaction score
119
Location
Jugoslavija
Amazing project @rwxsu, it's nice to see some fresh ideas like this one.
I would like you to share some experiences programming this OT here in go.
It can be played with standard clients or it requires something different?
A guide on how to compile would be nice too. I will test it if you want.
Thank you 😃

Go was specifically made by Google to replace messy C++ networking code that would take forever to compile. Because of that, everything you need to make a server like this is built into the standard library (no need for boost, libxml, etc...). My best experience programming in Go is the standard library and the official documentation (it's amazing).

Yes, standard client. Starting with protocol 7.4, because packets are not encrypted.

Steps to compile:
  • Download Golang or apt-get install golang-go
  • Open your terminal:
    1. git clone https://github.com/rwxsu/goot.git
    2. cd goot
    3. go run main.go

It's great if you can test when the project starts to take shape (simple movement hasn't been implemented yet).

Because I'm writing this server from scratch, looking at TFS code while I do it, I see many places where TFS could have been written better. And I will most likely find many bugs that crash TFS, that I can share or fix.

Edit: edited steps to compile: made easier thanks to @Raggaer.
 
Last edited:

Discovery

Developing myself
Joined
Apr 16, 2010
Messages
426
Best answers
7
Reaction score
110
Location
Neverland
Thats awesome, have gains in maintenance/test time too..

What about server performance with couple of players?

I'm developing a web app using web sockets for 7.4, compiling and compressing the sprite files, and connecting using the usual protocol in browser but for now, using the usual server(tfs).
 

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,556
Best answers
8
Reaction score
894
Location
Spain
Thats awesome, have gains in maintenance/test time too..

What about server performance with couple of players?

I'm developing a web app using web sockets for 7.4, compiling and compressing the sprite files, and connecting using the usual protocol in browser but for now, using the usual server(tfs).
Its too early to talk about performance since basically nothing more or less is working properly
 

esfomeado

N o_0 B
Joined
Nov 29, 2010
Messages
277
Best answers
0
Reaction score
19
I have worked a few years back on a server written in Java and seeing this makes want to finish the project.
Good luck with your project :)
 

Yamaken

Pro OpenTibia Developer
Premium User
Joined
Jul 27, 2013
Messages
464
Best answers
3
Reaction score
334
If you use OTClient you could just rewrite the protocol as fit for you/the tools/language(tibia protocol is old and may be there better/easier way to implement it).
 
OP
rwxsu

rwxsu

Computer Engineer
Joined
Mar 31, 2018
Messages
85
Best answers
3
Reaction score
119
Location
Jugoslavija
If you use OTClient you could just rewrite the protocol as fit for you/the tools/language(tibia protocol is old and may be there better/easier way to implement it).
Yes, that is a good point. I want to do it for 7.4 first (to learn), but OTClient is definitely the way to go.
 

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
6,619
Best answers
191
Reaction score
1,338
Location
Norway, Oslo
Very cool! I love the network code. Go is a very interesting language that appears pretty easy to get into. I'll keep an eye on the development of this. :)

I have a repo that might be useful if you want to tap into the tibia protocol on the client side (in a more condensed way than etc otclient):
Znote/POTCP (https://github.com/Znote/POTCP) (php open tibia client protocol).

Out of the box it supports 10.98 with network encryption/decryption (TFS 1.2/3), but also has a test class for client 7.6. Might help you with the protocol research.
 
OP
rwxsu

rwxsu

Computer Engineer
Joined
Mar 31, 2018
Messages
85
Best answers
3
Reaction score
119
Location
Jugoslavija
Very cool! I love the network code. Go is a very interesting language that appears pretty easy to get into. I'll keep an eye on the development of this. :)

I have a repo that might be useful if you want to tap into the tibia protocol on the client side (in a more condensed way than etc otclient):
Znote/POTCP (https://github.com/Znote/POTCP) (php open tibia client protocol).

Out of the box it supports 10.98 with network encryption/decryption (TFS 1.2/3), but also has a test class for client 7.6. Might help you with the protocol research.
Thank you :D It is always great to have different reference code sources to look at.
 

e.e

Divine Intellect
Joined
Sep 16, 2016
Messages
476
Best answers
1
Reaction score
209
If you use OTClient you could just rewrite the protocol as fit for you/the tools/language(tibia protocol is old and may be there better/easier way to implement it).
I have spent a lot of time on this kind of thing while working on my own server project PyOT2 (outdated thread); completely redesigning the server API and network protocol whenever found useful (many more server changes than network protocol changes for now though).
Would be interested in discussing the subject/coming up with new ideas with other serious devs that's interested in the topic and have some interesting ideas or thoughts of their own to contribute (I tend to ask more questions than I answer).
Discord: #e.e0480.

Also wish you good luck and a lot fun with the project @rwxsu.
 
Last edited:
OP
rwxsu

rwxsu

Computer Engineer
Joined
Mar 31, 2018
Messages
85
Best answers
3
Reaction score
119
Location
Jugoslavija
I have spent a lot of time on this kind of thing while working on my own server project PyOT2 (outdated thread); completely redesigning the server API and network protocol whenever found useful (many more server changes than network protocol changes for now though).
Would be interested in discussing the subject/coming up with new ideas with other serious devs that's interested in the topic and have some interesting ideas or thoughts of their own to contribute (I tend to ask more questions than I answer).
Discord: #e.e0480.

Also wish you good luck and a lot fun with the project @rwxsu.
Thank you, join the channel Join the (Open)Tibia Discord Server! (https://discord.gg/zVmrKBc) to discuss with other devs (we are currently 4).
 
  • Like
Reactions: e.e
Top