C# Port for better Performance on Windows Servers?

Whats about a C# port for windows servers?

I think its very easy to port java plugins to c#.

And the sponge api is written in java so its not very hard to port it to c# too.

Or we use a C# / Java bridge. See http://jni4net.com/. so we can instantly run java plugins from a c# server.

Sponge couldn’t simply be ported to C#. Not without a complete recode of all six platforms: Sponge, SpongeVanilla, SpongeAPI, SpongeCommons, FML, and the Minecraft Server.

For the work, it’s not worth it. Especially considering most of our community know Java already, and Minecraft is already written in the language.

Though, there’s absolutely nothing stopping you from taking on the task, yourself.

1 Like

But if we get enough c# devs and recode all six platforms.

I think its a good idea, because the community doesnt need so much resources on Windows.

I’m not saying it’s impossible. I’m just stating that it’s not as simple as your original suggestion. You’re free to gather C# devs and embark on the project yourself, however I doubt that such a project would ever be official.

Not to mention that you actually point out the final nail in the coffin with:

This may be true. However, any such official project would leave Linux users in the dark.

I’m going to be fully honest, the performance hit is more likely because you’re on a Windows server instead of Linux. A server on Arch Linux, or even Ubuntu’s server distro is going to operate well.

But if we set that point aside, Ferus is right, you would need a good amount of people to rewrite all six Minecraft projects from the ground up in a reasonable amount of time.

4 Likes

The thing is, Minecraft runs on Small linux server very good. But on smaller windows servers, its not very funny.

No one’s saying that you’re wrong. We’re just saying that this community doesn’t have the support required to make such a project worth it. Not only that, but it would ostracize the majority of our community’s Linux users, who would gain no benefit from such a project.

4 Likes

What benefit would porting the entire thing to C# have? You can already run Java on windows servers. The majority of performance impact comes from bad coding on minecraft side, and would be easier to solve rather than porting the thing to another language. Its a very massive required work for not too much benefit.

4 Likes

Sure. but the Mono project is very optimized at the moment, so we can run C# programs with a better performance as Java.

I’m sorry to say, the Mono project would still put Linux users at far below even the performance that Windows users already experience with Java.

1 Like

This simply wouldn’t be a good idea for multiple reasons:

1 - The performance boost is not worth the extra effort (in my opinion)
2 - Most of the developer community is already familiar with Java
3 - The provided Minecraft Server software is written in Java, it just makes more sense to go along with it.
4 - It would simply take too long to port all 6 platforms

EDIT: I think if you wanted to use C# to create your plugins, it would be much easier to create a plugin which interprets C#

2 Likes

I really like C#.

I’m sure that Microsoft will switch to C# in a year or two (Minecraft 2??)

Please don’t say such things. ;_;

5 Likes

Citations needed

4 Likes

Oh no please not xD
Not saying that C# is bad or anything, but it’d be a huge hit in the face for the current Minecraft modding community.
I would certainly not be willing to learn C# or any other language to be able to continue modding Minecraft (not that I have been a lot into modding in the first place but anyway ^^)

1 Like

There have been multiple attempts to rewrite Minecraft server software. All of which I thought were not stable enough for production.

There have been and still are some C# projects, C++ projects, even Java rewrites, but none of them caught on. Glowstone and MCServer are probably the most popular complete rewrites.

It’s a very nice language, very similar to java. The core libraries are better, though.

with the price, as noted above, of being limited to windows only.

I don’t think you realise what your asking. In order for Sponge/forge to make a usable server executable. This process has to happen:

  1. Mojang need to release a Server jar
  2. We need the server mappings that allows us to easily remap the old code.
  3. Forge/Sponge needs to patch it patches in order to get the server working.

Lets say we place c# between it:

  1. Mojang need to release a Server jar
  2. We need the server mappings that allows us to READ the code
  3. Than we need to RECODE all the java classes to c#. What will give the following problems:
  • Missing depencies. Their is no Netty for c#.
  • No Forge so no modded servers with sponge :cry:.
  • Sponge wouldn’t be An API + implementation. It would be a server distribution.
  • The current API isn’t designed for c# standards. So you basically asking them to throw away the current work and restart.
  • Updating sponge would be a very time consuming process. What I wouldn’t call coding… .

To give you an idea. So far I know bukkit or forge never had to recode minecraft. They “only” changed some stuff to get mods/plugins to work.

5 Likes

To address the original question on performance…

I’m not sure where you’re getting data that C# is faster than Java, but that certainly does not appear to be the case for Mono, and .NET CLR appears to have generally comparable performance.

And of course, as others have mentioned, the effort would not at all be worth it :stuck_out_tongue:

(if you feel the benchmarks linked are not accurate representations, feel free to contribute improvements)

2 Likes