Jump to content

Akronis

Inactive Member
  • Posts

    8
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Akronis

  1. Hi @Exynox,

    I'm glad to hear that.

     

    In order to make a real good job, we must follow a rigorous software engineering process.
    Before even writing a single line of code, we better start thinking of a proper design for this project (it would be great if we could make some UML diagram, requirements analysis and all the other stuff).

     

    The time we spend in this, is gonna be saved for the next steps.

    • Good 1
  2.  

    Spoiler


    On 4/18/2020 at 9:16 AM, Exynox said:

    Ladies and gentlemen, on behalf of Metin2Dev Airlines we would ask you to kindly follow this safety announcement. Please take your assigned seat, mentioned in your boarding pass. When sat down, please fasten your seat belt at all times, as turbulence can occur during the flight. We ask you to make sure that your luggage is properly stored in the overhead bins. In the unlikely case you won't like this topic, please take a moment and locate the nearest back or exit button of your browser. Should you be utterly disgusted at what I'm saying, a vomit bag is located in the seat in front of you. It's going to be a long read.

     

    I think it's been almost 10 years since I first opened Metin2. Ten years! I was still playing Club Penguin at the time, I mean that's how I've heard about the game in the first place - from an ad on Club Penguin's page! And if I sit down and think of it, the game was 6 years old 10 years ago! I'm really curious, what other 16-year-old pieces of software do you guys use? If you do, how do you manage to use that piece of software nowadays? I know I've struggled a fair share to get Borland C++ 4.52 to run reliably in DOSBox.

     

    My point is that in 2004 we didn't even have multi-core CPUs yet! The only way you could do multi-threading was by physically chucking as many CPUs onto a motherboard as you physically could. Or by distributing the computing load. The latter is what YMIR did. Initially, Metin2 was intended to run each core on their own server. One for the database cache, one for authentication, and a couple more for the maps (depending how far down you could reach in your pockets - we didn't have $5 DigitalOcean or AWS containers back then, servers were expensive). That's why nowadays we have to fiddle around with peer-to-peer TCP/IP configuration on all the Metin2 server cores. Metin2's architecture aged like milk.

     

    To give credit where credit is due, parts of it were updated with time. But I'll bet you a coffee that libthecore hasn't changed much since the initial version. It's quite awesome that we actually can run this code quasi-reliably. Kudos to C++, in a world where JavaScript breaks backwards compatibility whenever wind changes direction.

     

    Other than the dated architecture, the other problem I have with the Metin2 server is the code itself. I don't say it's easy to code such a dinosaur, but if you pay attention to the coding style and mistakes, you can actually see how YMIR devs improved over time. Which is perfectly fine, we all learn. The terrible part is that we can see their progress in acquiring this skill. They never fixed their silly mistakes, or did so very, very late (remember the /dice bug?).

     

    The final nail in Metin2's coffin is BSD. At the time when they decided upon the architecture, Linux was nothing more than a toy, a fun gimmick like Docker and Kubernetes are today. Sure, you could have used Linux in production environments, but you would have been regarded a maniac if you did. Sure, some companies saw its potential and became early adopters. But the standard was still to use the tried and battle-tested, UNIX-certified BSD, which hails from 1977. In my country's 1977, we couldn't even talk about how dumb our leaders were without risking being beaten by the police, yet others were making huge technological advances. There's nothing wrong with FreeBSD nowadays either. It's just that it's way, way easier to code for Linux. It has become the de facto standard.

     

    So we've got an old, half-baked and out-of-spec server on our hands. Great!

     

    To me, working on the Metin2 server has become like one of those relationships in which you don't really like your partner, you fight all the time, yet you still stay together because you feel attached to them. It's plainly bad and it must go away. Just look at this forum, it's full of hotfixes, and whenever an actual feature release comes up, you have to find and replace tons of stuff and you don't even know if it will break any other system you have installed. Why can't we have some sort of plugin system so that we end this agony?

     

    The topic of porting Metin2's server to Linux has come up numerous times here. Yet it has to be done underground, because God forbid making your code public, because daddy Gameforge is going to knock on your door like it's 1977. I don't want to get into this discussion, but it's their right. A light has shined before my eyes, though. Recently, a friend has asked me to help him out with hosting a Lineage 2 server. I don't know pretty much anything about this game, but I've found out one thing: there are two big classes of server software: the OFF, meaning the original server files NCSOFT developed, and L2J, a Java-written emulator for the same server files. And the thing is, people have been sued for running the original server files, but not for using the Java edition. Not to mention that the Java edition is publicly available in its various forks on GitHub and Bitbucket.

     

    I guess you see where this is going. If we're all stuck at home, why don't we come together, join our efforts and rewrite the server in a more future-oriented, sensible way?

     

    This would mean less risk of being thrown in jail by Gameforge. Not to mention that we don't need to do any reverse engineering as the source code is readily available, and this is a huge, a monumental advantage. The official Metin2 is going to be dead in a matter of years, but Gameforge not so much. This means that any future support and development for the game lies within the open-source community.

     

    If we're going to do this, we should aim for the future. We should take into account the architecture of current systems. We should think of built-in redundancy in case one of the server crashes. And as much as I like C++ and its power, with great power comes great responsibility. It's simply too easy to make mistakes in C++. Not to mention the hell you must go through to simply include a library (In a way, it's a good thing since it forces you to think, not blindly include another library for adding two numbers like you would do in JS). C++ is one of those toxic relationships and I suggest moving to a tool more fit for the job. A language like Rust would do the job, for instance. It compiles down to machine code, it includes a network stack by default, it can read JSON and XML files, and it has many more features I didn't hear about yet. I never wrote anything in Rust, but it's just syntax. Real programming is about tackling problems, not about syntax.

     

    I'm open to any ideas or suggestions. Maybe I'm talking sh*t and Metin2 deserves to die.

     

    But I'm looking at you, Vanilla, Shogun, MartySama, Sanchez and all others who genuinely contributed to the community with original work but I can't name because I'm a stupid prick with 32kB of memory. What do you think? It's a huge task, yet manageable if we all give our best. Don't take anything I wrote here for granted, if you come with a good reason on why we should rewrite the game in MIPS Assembly and run it on PS2s, I'm open for it.

     

    Thank you for choosing Metin2Dev Airlines.


     

    I totally agree with you.

    I myself, not long ago, tried to port to Linux with another person (who turned out to be totally unreliable), and I would gladly help you with this open-source project.

    I think that Rust-Lang is the `one-and-only` language we should use, in order to achieve high performances and memory safety. I've already done some project with it, it's really awesome and clean.

     

    Hope to hear something more about this project!

    Hype mode: ON

     

    ------------ EDIT 1 ------------

    Using "Rust-Lang" would also be a great idea for its integrated documentation maker, which we should also pay particular attention to.

     

    ------------ EDIT 2 ------------

    Wrong quote

    • Love 1
  3. 3 hours ago, Max. said:

     

    It is better to work on improving the client, for example, to fix memory leaks that are so severe

    I don't know the server that would solve it, the problem has always existed

    We've also planned to remake the whole client :)

     

    Regards

  4. Hi guys,

    thanks for yours replies, you've been really kind.

     

    I found another guy who had the same idea of the one I wrote about in the first post, so we're now aiming to rewrite both server and client in modern C++, removing the unnecessary parts, add unicode support and also porting the former one on Linux.

     

    Regards

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.