• 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#] Introducing HerhangiOT v0.1 | 10.76 | In Development

Herhangi

Member
Joined
Mar 18, 2010
Messages
10
Reaction score
8
I have started game server development with Open Tibia community 10 years ago, today I feel special by finally making a contribution to this society. Along these years, I have worked on developing many different game projects half of which are online games, I played Tibia on and off, everytime I played, downloaded latest OT server distributions, played with my close friends, got bored and quit. This time, when turned back to playing, I wanted to do something useful and started this project, as a tribute to this great community for keeping epicness for all these years. And I want to specifically thanks Mark for The Forgotten Server, that I built my project onto, and Ian for SharpOT made things a bit easier as a base project developed in C#, and all contributors of these projects.

I am proud to announce HerhangiOT, Open Tibia server on protocol 10.76 written in C#, that will support both lua and C# scripting.

Source: HerhangiOT on GitHub

Current Status:
Currently main server framework is built like; Dispatcher, Scheduler, Scripting, Logging, Secret Communication (between Game and Login Server) systems are implemented.
Project is designed to have seperate Login Server and multiple Game Servers. (Currently Game Server initializes both)
Loading OTB files successfully, reading Items, Map, Outfits, config.lua and so on.
Data storage is done on Json files, but system is designed to have multiple storage engines in the future.
Users can successfully login and move a little.
Extendable Command Line Operations system to introduce C# scripting...

What's Next?
First aim is to move quickly towards to v0.2 which is to implement all the functionalities of TFS and keep-up to the latest version of the TFS as much as possible. After reaching v0.2, we will try to implement advanced C# scripting, that will result in improved server capabilities and seperation from TFS from that point on.

How Can You Help?
Even your simplest idea is important for us to make HerhangiOT stronger. Along with your ideas, testing each iteration, reporting issues and more importantly contributing to the code base will help us to reach better state sooner.

Thanks everyone for their interest...
 
Last edited:
Great work, i try to use your system for my tests.

I saw all players saved with .xml files? or just gamemasteR?
 
If we had https://github.com/Microsoft/msbuild and the other compiler tool for .net (codename something) for Linux, I would certainly be killing C# more of a go.

Another thing, you won't need "cleanup", it's all done automatically. It's a good plus for the game server, instead lets say you are referencing creatures in a list, you could de-reference removed creatures for instance.
 
@Mariuskens Players and Accounts are saved in Json files for now. I am planning to support, MySQL, MSSQL and SQLite data storages in the future.

@Ezzz Hopefully .net will be working flawlessly on Linux and MacOs in near future :) I do believe I won't be needing Cleanup but, still for micro memory management I can go into creating pooling system for creatures or items as well, keeping those for that.
 
@Ezzz No reason, started off with singleton, too lazy to change it, working more on implementing missing features than fixing old building blocks for now :)

@Mariuskens Hopefully, I will have stable version that you can walk all around and do few other things in a week, thank you for your interest...
 
Last edited:
I also do believe C# is good enough. I know that RunUO was able to handle up to 2k concurrent users, I have ever heard of 8k concurrent on a server but it is possibly fake story. Also, C# scripts work as fast as lua as it is compiled into .dll.

Currently I do have 5 threads;
Main Thread -> Accepting Connections, Doing Command Line Operations
Game Thread -> Same with TFS
Database Thread -> Will be used for storage operations, like saving map, uploading latest player data and statistics, etc.
Scheduler Thread -> Same with TFS
OutputNetworkPool Thread -> Same with TFS

In the future I am thinking to add additional thread for script recompilation, command line operations, or to move connection accept operation to another thread from main.
 
Before starting new week, I decided to post weekly update for development of the server!
Thanks to this great community, I have received a good reaction for my server, even some people asked if they can contribute to, thanks for your attention people!

Past week I have worked on mapping and movement system and chat system and both these systems are functional now. Players are able to login, move along the map and chit-chat!
Improved C# scripting and decided to drop lua scripting for now. All of TFS scripts will be implemented in C# as an action. (Chat channels are already implemented in latest commit!)
Changed how RSA worked according to SharpOT, it seems more robust now. (Idk why exactly)
Created "job" system(new thread), that allows given task to work in given intervals while server is up! Some TFS methods will be moved here!
 
Amazing work man! Forreal! I love the idea. Sadly I don't know much at all about C anything...
 
Before starting new week, I decided to post weekly update for development of the server!
Thanks to this great community, I have received a good reaction for my server, even some people asked if they can contribute to, thanks for your attention people!

Past week I have worked on mapping and movement system and chat system and both these systems are functional now. Players are able to login, move along the map and chit-chat!
Improved C# scripting and decided to drop lua scripting for now. All of TFS scripts will be implemented in C# as an action. (Chat channels are already implemented in latest commit!)
Changed how RSA worked according to SharpOT, it seems more robust now. (Idk why exactly)
Created "job" system(new thread), that allows given task to work in given intervals while server is up! Some TFS methods will be moved here!

I thank you for releasing this project, it helped me with my 7.7 C# server to use with RSA and XTEA encryption. I got movement, talking, logging in and logging out working functional.
Now I will need to figure out the item moving logic and complexity, this is a good server :)
 
When you make first working version test how much RAM does it use for ORTS map (linux/windows 64 bit).
For how many players online do you plan this server?
I think that, it will be hard to beat TFS effeciency.

Maybe you should focus on some new features.. like INSTANCES!
It would be awesome to create copies of some part of map (or load few maps) and run it in other threads. Normal servers like RL map can't use more then one thread, because they must synchronize all players online.
Server with instances (8 or 50 friends make group and teleports to some island/dungeon - copy of it!) could run in any number of threads and in 'main' thread would be some 'global' map, synchronization of 'chat/vip list' and 'router' for packets from player X to instance Y [in which he is right now, or to global map].

EDIT:
Of course players cannot see that there are some instances (server cannot require reconnection/relogin [load new characters list with modified port]) - it must be somehow routed 'inside' by main server.
 
Last edited:
@Codinablack Thank you ;)

@Ezzz I am glad that my project helped you, I can personally help you if needed when I have free time.

@Gesior.pl Thanks for your feedback :) I am not working on optimizations yet and not all systems are implemented, so that current values would not be realistic. However, I want this server to be as much as efficient as TFS and maybe more with fine tuning.

Instancing and multiple game servers were my main ideas when starting this project. After implementing all TFS features I will be implementing those 2 features asap. I thought instancing for battleground system, but dungeon and maybe raid system would be great as well.
 
After losing my computer, and 2 weeks of work that was not pushed to git, I decided to give a break until next holiday, and my holiday is here, hopefully I will be fixing the issues and completing features that were not implemented! Going active again :)
 
OMG I downloaded the map from SharpOT to see what it was like.. and I remember when runes first started stacking, the first OT to have it was this map (not sure if its that OT) but I remember the temple and seeing players come out and testing all the shit haha. Such nostalgia
 
Back
Top