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

OTServ in other programming languages.

LooSik

Active Member
Joined
Oct 12, 2007
Messages
197
Solutions
1
Reaction score
44
I'm just wondering, have anyone attempted to go further than basic features showcase (Jiddo with his jOTS) with the full rewrites in other languages? Or everyone still sticking to the C++ nowadays? Personally started a private project to write everything from scratch in Java with some bases of the C++ otserv version. It's gonna take a while... But got the basics set up - networking done, map, basic movements, containers, items.

I was just wondering if there is any other madman out there attempting to do or have done the same :D And if yes, what language and how it goes so far or how well it performs if the server is running on it.

And before someone ask me why Java: I can agree that C++ can outperform the Java, but it's so much easier to handle/write/maintain code while not getting punished so hard with crashing (Exception handling etc.)
 
Yes it is possible, but the most important part is the community. It's really hard to do sutff alone and boring.

Hard is not the right word here. Time consuming if anything. Is it boring? That just depends on person.
 

I did mention that in my first post. It showcases couple of interesting ideas, but in reality I think it's written a bit too modular. I really don't like breaking the network code into aspectJ pointcuts rather than one organized protocol file. Also makes it a bit more pain in terms of live-editing ( which is one of the things I love about Java, apply code vs recompile, restart server and login & test, LUA is very simillar in that part and is probably one of the reasons revscriptsys was started )
 
Java is just horrible for serious purposes. I'm pretty sure it will be a bottleneck when you reach networking and have to scale up to a few hundred players, even C++ struggles at that and TFS uses a very advanced structure for it. I think the only language that could catch up here is Javascript with Node.js, but I won't bet that.

I'd really like to know where do you think Java is more maintainable, easy or really any point where it is superior to C++. From my experience of 5 years, Java has horrible language decisions, is utterly slow and is a huge pain with dependencies.

Also if you'd like there's SharpOT in C# but development stalled for a few years now: GitHub - sharpot/sharpot: An open source Tibia server written in C#
 
Java is just horrible for serious purposes. I'm pretty sure it will be a bottleneck when you reach networking and have to scale up to a few hundred players, even C++ struggles at that and TFS uses a very advanced structure for it. I think the only language that could catch up here is Javascript with Node.js, but I won't bet that.

I'd really like to know where do you think Java is more maintainable, easy or really any point where it is superior to C++. From my experience of 5 years, Java has horrible language decisions, is utterly slow and is a huge pain with dependencies.

Also if you'd like there's SharpOT in C# but development stalled for a few years now: GitHub - sharpot/sharpot: An open source Tibia server written in C#
ranisalt aka "javahater" :rolleyes:
 
Java is just horrible for serious purposes. I'm pretty sure it will be a bottleneck when you reach networking and have to scale up to a few hundred players, even C++ struggles at that and TFS uses a very advanced structure for it. I think the only language that could catch up here is Javascript with Node.js, but I won't bet that.

I'd really like to know where do you think Java is more maintainable, easy or really any point where it is superior to C++. From my experience of 5 years, Java has horrible language decisions, is utterly slow and is a huge pain with dependencies.

Also if you'd like there's SharpOT in C# but development stalled for a few years now: GitHub - sharpot/sharpot: An open source Tibia server written in C#

What structure are we talking about? IIRC all the netcode for otserv ever was using - Boost ASIO.

I've been hosting servers for thousands of players using Java in the past. Lagless for up to 5,000 concurrent users. Wasn't tibia but I really don't think java NIO is any worse to boost asio.

Java in my opinion is more maintainable for various reasons.
- One example being human error. It's way more forgiving in terms of silly mistakes that could cost you live crash, data loss - in other words something you don't ever want. You forgot a null check? You get exception, and in most cases it's not gonna do anything to your server. Try doing that in C++ :D
- Another reason is dodging lots of memory leaks - not saying Java avoids memory leaks, but garbage collector is way more convenient than having to remember what, when and where to delete from memory, yes it adds a little bit of overhead.
- It's easier to write, live code editing vs having to recompile each time you need to test something, I literally can't live without that :D. You either spend lots of time restarting/recompiling on C++ unless you write perfect working code ;)
- It's also way easier to maintain on multi-platform level. No need to care about special handling for unix/mac/windows. It's all the same ( except very minor exceptions ).

People thinking Java is slow, live the single-core Pentium 4 world.

There is a reason android uses java as well. They run it on custom dalvik machine optimized for phones, but it's still god damn java.
 
I did mention that in my first post. It showcases couple of interesting ideas, but in reality I think it's written a bit too modular. I really don't like breaking the network code into aspectJ pointcuts rather than one organized protocol file. Also makes it a bit more pain in terms of live-editing ( which is one of the things I love about Java, apply code vs recompile, restart server and login & test, LUA is very simillar in that part and is probably one of the reasons revscriptsys was started )
sorry, I got there for a completely different reason and forgot that you mentioned it. :p
 
What structure are we talking about? IIRC all the netcode for otserv ever was using - Boost ASIO.

I've been hosting servers for thousands of players using Java in the past. Lagless for up to 5,000 concurrent users. Wasn't tibia but I really don't think java NIO is any worse to boost asio.

Java in my opinion is more maintainable for various reasons.
- One example being human error. It's way more forgiving in terms of silly mistakes that could cost you live crash, data loss - in other words something you don't ever want. You forgot a null check? You get exception, and in most cases it's not gonna do anything to your server. Try doing that in C++ :D
If you forget a nullcheck in C or C++ on a system with a MMU you get SIGSEGV (or the platform equivalent) ;) It's a lot worse on platforms that don't trap from null dereference (but most of them don't even have the flash resources to contain a JVM). I know i'm nitpicking, but in general you're right, there are dark corners of C++ in which really wierd stuff happens. That is why every single article on "modern" C++ says to stay away from them and use them to implement higher-level abstractions if absolutely needed. After all, it's like in the old joke "doctor, doctor it hurts if I hit myself with a hammer...".
- Another reason is dodging lots of memory leaks - not saying Java avoids memory leaks, but garbage collector is way more convenient than having to remember what, when and where to delete from memory, yes it adds a little bit of overhead.
If you have "simple"(not caused by circular references) leaks in C++ code you're doing it wrong. I consider GC to be a fine solution in some cases, but I still feel that it's a band-aid for using riddiculously bad languages and by that I mean languages with weak type systems (this applies to C, C++, Java). Nothing beats the Rust compiler's ability to do type algebra and return a compilation error if you introduce a memory leak or race-condition.
- It's easier to write, live code editing vs having to recompile each time you need to test something, I literally can't live without that :D. You either spend lots of time restarting/recompiling on C++ unless you write perfect working code ;)
Compilation time and error messages are things C++ developers don't talk about. :D

- It's also way easier to maintain on multi-platform level. No need to care about special handling for unix/mac/windows. It's all the same ( except very minor exceptions ).

People thinking Java is slow, live the single-core Pentium 4 world.

There is a reason android uses java as well. They run it on custom dalvik machine optimized for phones, but it's still god damn java.

I love these kinds of performance discussions. In fact I have been having a similar one at work, but it's C vs C++ there. And the funny thing is that the hardcore ANSI C guys use the same arguments for C++ being slow as C++ guys for Java :D, even funnier still, the systems currently considered embedded and "too slow for C++" have higher performance than PCs and servers that used to run Enterprise software written in C++ in 1990s and late 1980s.

Also, the reason Android uses Java is that there was no better alternative at the time. I bet that if Android were to be done from scratch nowadays some other technology would be chosen.

Back to the topic:
I think that the reason these alternative projects don't succeed is sheer amount of resources available for users of TFS or other distros. If you want your project to have any chance of gaining popularity you need to provide as much compatibility as possible which means implementing the horrible lua API (it's not lua that's horrible it's the TFS API ;)), good luck with that.
 
I'm just wondering, have anyone attempted to go further than basic features showcase (Jiddo with his jOTS) with the full rewrites in other languages? Or everyone still sticking to the C++ nowadays? Personally started a private project to write everything from scratch in Java with some bases of the C++ otserv version. It's gonna take a while... But got the basics set up - networking done, map, basic movements, containers, items.

I was just wondering if there is any other madman out there attempting to do or have done the same :D And if yes, what language and how it goes so far or how well it performs if the server is running on it.

And before someone ask me why Java: I can agree that C++ can outperform the Java, but it's so much easier to handle/write/maintain code while not getting punished so hard with crashing (Exception handling etc.)
check out jopirops 6.4 tibia version server i am sure his map editor was using java idk how he extracted sprites tho
 
PyOT was great and python seen to be a better option than C#, Java or C++. In python you can use the same language for the main engine and scripts and there is too much you can do with a dynamic language.
 
PyOT was great and python seen to be a better option than C#, Java or C++. In python you can use the same language for the main engine and scripts and there is too much you can do with a dynamic language.

Java can do same btw. you can easily call java classes to be "compiled" during run. And have them be responsible for scripts, chat handling and such with ability to reload them during runtime.
 
PyOT was great and python seen to be a better option than C#, Java or C++. In python you can use the same language for the main engine and scripts and there is too much you can do with a dynamic language.
You can do the same with TypeScript. The engine I'm making will be in TypeScript but the datapack will be scripted in js so it doesnt need to be transpiled.
 
Loosik? Will you ever get back to Eloth :/ Please
Atleast host it for nostalgia, if you add paypal donations i can giev you to pay host
 
Back
Top