Is it possible?

no bueno.
Joined
Jul 29, 2009
Messages
527
Reaction score
205
Would it be possible to make a MapleStory server in a different language than Java or C++?

like python :p
 
Are you talking about making a new emulator?

As far as I know, every language that supports sockets and socket listening is capable of being used for an emulator

python does support sockets and socket listening however it's a very bad choice for emulator

You see, an emulator has to be as lightweight as you can make it, so choosing an interpreted language like python or java is a bad idea already. Emulators are built to potentially host the game logic for thousands of clients at once, and if 1 player uses 0.001% CPU, then 1000 player will use way more than 1%, player interaction is CPU heavy especially among many player on the same area

if 100 player are in screen, each information send by 1 player must be received by 99 player which is heavy on CPU and network and unless you want to throw away money you'll be glad if your server is written in C/C++ because it's one of the most performant ways of coding an emulator.

So yes it's possible with python, but any serious emulator should be written in a fast language, every saved percentage of CPU & Ram makes a big difference when you scale it
 
  • Like
Reactions: x42
if 100 player are in screen, each information send by 1 player must be received by 99 player which is heavy on CPU and network and unless you want to throw away money you'll be glad if your server is written in C/C++ because it's one of the most performant ways of coding an emulator.

So yes it's possible with python, but any serious emulator should be written in a fast language, every saved percentage of CPU & Ram makes a big difference when you scale it

Why is it that native code is always regarded as the high-performance solution to any problem that it can be thrown at? Certainly, Java and Windows have never been the most seamless technology combination, but C# is Microsoft's flagship for a reason. What proponents of C++ seem to forget all too often is that C# compiles to native code too, hence the name "intermediate language" and not "interpreted language;" aside from static type checking, garbage collection and other runtime concerns, JIT compiled C# can be optimized every bit as much as C++.

MapleStory emulators come in Delphi, Visual Basic.NET and C# flavors currently. One of my current projects involves writing the TCP backend for such an emulator, although it could be extended to support any packet structure. There was once an emulator being developed in C# by Moo et al. called LokiMS, but the source has long since been removed from the internet. I have what I believe to be the last revision before it was removed, but though it does many things well, I wouldn't attempt to fork it.
 
Native code is regarded as high performance solution because it simply is faster than interpreted languages could ever be, interpreted languages have more overhead on everything they do because each function has to be first read from bytecode then translated into CPU understandable functions, native code does the translation at compile time.
JIT compiled languages such as Java and C# are slower when it comes to raw power, just because C# and Java are easier to optimize doesn't make them faster
But sure, you can use C#, it's not significantly slower and sometimes not even slower at all
also memory consumption counts as performance too, last time I checked JIT drains more Ram than a precompiled native code
 
JIT compiled languages such as Java and C# are slower when it comes to raw power ... and sometimes not even slower at all

Need I say more?

Jolin88 said:
also memory consumption counts as performance too, last time I checked JIT drains more Ram than a precompiled native code

Well-designed C# is highly resistant to memory leaks, while native code requires manual garbage collection to prevent it from becoming completely unscalable. Aside from the .NET runtime, which is negligible in size, native and JIT code consumes approximately the same amount of memory, and .NET code tends not to push everything onto the stack like some C++ developers insist upon doing.

@jMerlin

I had considered the very thing once before deciding that procedural code has no place in socket programming. I suspect V8 would easily outperform the JRE as well as Rhino.
 
Last edited:
Going of my knowledge of RSPS, I believe that you can develop a maple story server in C#, C++ and Java just like you can with a RSPS.

I don't think that python would be capable of developing a server though.
 
Native code is regarded as high performance solution because it simply is faster than interpreted languages could ever be...

Just because you write something in native code does not mean it will be faster. You can write code that performs poorly in ANY language.

P.S. I've been using C# for a good few years, now, and I've never had issues with performance, simply because I don't write shitty code. I'm actually currently writing an emulator and server framework in C#, and the performance is excellent so far. I even use reflection, something native code doesn't usually support (with the exception of Go, I believe).
 
Just because you write something in native code does not mean it will be faster. You can write code that performs poorly in ANY language.

P.S. I've been using C# for a good few years, now, and I've never had issues with performance, simply because I don't write shitty code. I'm actually currently writing an emulator and server framework in C#, and the performance is excellent so far. I even use reflection, something native code doesn't usually support (with the exception of Go, I believe).

obviously I wasn't talking about someone writing shitty C++ code vs someone coding excellent C# why would I even do such a comparison that makes no sense

I was talking about the same algorithm as close as it could be to being coded the same away
 
Would it be possible to make a MapleStory server in a different language than Java or C++?

like python :p

Yes, if you have the knowledge you can code an efficient server in Python with the help from C modules.

Also Python isn't exactly an "interpreted" language. The first time you run python code it compiles and runs. The second and further times you run python you're actually running Python byte-code.

For efficiency, look into the C API or Cython:
http://docs.python.org/c-api/
Cython: C-Extensions for Python

There are many flavors of Python to work with.

Another important thing to note is that the client can be coded in a different language than the server.
 
Last edited:
I liked that last reply (: I am actually not going to worry about an ms server. I have started very minor development on my own game.
After I have some good visuals and stuff I will release it here just for fun.
 
obviously I wasn't talking about someone writing shitty C++ code vs someone coding excellent C# why would I even do such a comparison that makes no sense

I was talking about the same algorithm as close as it could be to being coded the same away

The problem though is that to write high performance servers, you need to use designs which are complicated to build and even more difficult to debug in C/C++. It can be done and is done, but it's nowhere near worth the cost unless you're constrained by some resource that isn't effectively corrected by purchasing more hardware.

Node.js based webservers massively outperform and outscale apache servers and compete or outperform nginx. Both are written in C and nginx uses OS-provided interrupt based async I/O. Node.js's core libraries are written in C and V8 JIT's high-traffic paths in JS into highly optimized assembly when possible, yet it takes about 1/10000th the development time to write something in JS than it is to implement the same using apache or nginx as a plugin or using existing plugins. A better solution to the problem can mean even a scripting language most people scoff at blows the fucking hell out of even the most highly optimized C applications.

Further, if you ever look at binary instrumentation, you would probably find yourself thinking "wtf." DynamoRIO/Pin can be used to dynamically optimize binaries on the fly. VMWare uses DynamoRIO. There's a paper from HP on the topic on how you can actually get a higher performance by running code through a machine interpreter and storing optimized blocks in a basic block cache which completely goes against your think that "optimized C compiled is the fastest thing!" You can even use this technique to move data and code blocks around to maximize L1/L2 cache on the CPU and get gigantic performance increases even if this is done over and over for long-running loops in different areas of the program. What's better is that you get this transparent performance increase on a non-optimized binary. You don't have to hand-write ASM and comingle code with data to get huge performance increases, you can have a poorly optimized C program achieve the same performance (think debug mode). And that hand-coded ASM tool would have to keep multiple copies of data to maximize cache hits or re-write itself anyway, which is essentially what an instrumentation tool would be doing.

Transparent Dynamic Optimization
 
Back