Difference between Java and C#

Hey I’m not a complete newb when it comes to game design and programming (programmed role-playing forums for over a decade and byond games as well as watching videos on YouTube for years) but I want to put my two semesters I spent learning C++ and Java and I want to put what I learned to practice. I was wondering if C# has some of the same libraries as Java. I’ve become very attached to using certain objects in Java and I wanted to know if c# has anything similar.

Also does an Mmmorpg sound too complicated for my first game? I want this to be a major release.

No. There are common elements in the frameworks but they don’t share the same frameworks.

Generally speaking the answer is yes. Your average MMORPG has a multi-million dollar budget and a large team of developers. There are ways for an indie developer to build their own but it requires being very knowledgeable.

1 Like

In ancient times, when the earth was still cooling, there was J# and a mostly-effective compatibility library. It was a dark era in human history and the mistake has been corrected at great cost to all mankind.

It depends on your definition of “similar”. If you mean “exactly the same but with PascalCase method names instead of camelCase”, the answer is “you probably won’t find what you seek”. If you mean “uses the exact same design concepts”, the overlap will expand but still be far from complete because the implementation forces differ; e.g., Java has rich enums and C# has a meaningful delegate system. Java has anonymous classes and C# has a deformed perversion of the concept by the same name.

If, however, you mean “fulfills the same intent in roughly the same way”, you might find yourself quite pleased.

Java and C# are definitely different languages but they are closely-related languages. The same holds true for the JRE, .NET Framework, and Mono. They all have common intellectual ancestors and thus have a lot in common.

Think of it like the difference in moving from Canada to the United States, the Southeastern United States to the Midwest, or any other very-similar-but-still-visibly different transition in geography. Things might be a little different but they aren’t necessarily better or worse.

I’ve spent hours and perhaps year studying how to develop an MMO. At first, when I got back into designing games I didn’t want to make an MMO, I wanted to make something small to start off with. I know how hard it is to make an MMO however, I figured that after I make the game perhaps I can hire people to help me manage it, ya know?

So far what I need is this.

  • MMO Server (been studying how to make this recently)
  • Login/Registration System
  • An Environment for the player to play
  • A database to store player’s information

Basically, I just need to make the game and make it multiplayer. I can handle all the other stuff later. What I find hardest about making games is doing the graphics which can take a lot of time and a lot of studying if you don’t entirely know what you are doing.

For a long time, I debated on if I should even use Unity to develop games since there are other methods, however, seeing how there are endless tutorials online, I don’t see a reason any to anymore. Not to mention, my understanding of programming and game making has changed since 2012.

Does anyone know what standard libraries come with C#?

Ironically management is one of the easier aspects. You basically just have to pay for the servers (the company owning them will handle the actual maintenance of them), keep your server software online, and keep the player base free of people trying to cheat the system and idiots causing trouble.

Content is where you will be hiring people as regardless of your skills you won’t be able to create enough artwork, music, sound effects, levels, etc by yourself. It’s simply too much for one person unless you’re creating a very small MMO (but in that case it’s not really an MMO).

By the way there are starting frameworks people have developed to assist with making some but I have absolutely no idea how good they are nor how easy it would be to change them versus making one from scratch. They might be good for learning purposes too.

Here is the overview page for the .NET framework class library.

1 Like

The main difference that matters is going to be what the language is most used for. Java excels on the server side, C# has some niches like games where it does very well. .NET has pretty good library parity with java now in most areas. Just 5 years ago you couldn’t really say that.

In the context of Unity there are big benefits to using the same language on the server. I still fight .NET on the server side at times, but I switched from java to .NET a couple of years ago for server side stuff. The benefits outweigh the remaining issues IMO when creating servers to work with Unity.

1 Like

FYI for an idea of the types of differences that matter are, and most of the time this isn’t an issue when not at any kind of scale.

GC tuning. MS took the normal MS approach of it’s a black box with few options. Java has tons (probably too many) options that let you tune it to get it just where you need it. I can fine tune java to get something that’s ideal for games, like one 4ms pause every couple of minutes. With .NET there are just two basic modes, neither of which suit realtime games well. Plus pauseless GC is an option in java land, but not .NET.

Concurrent programming. Async/wait is a great abstraction that has such a high overhead you can’t use it for low latency stuff. Java futures don’t have that built in overhead. For example I’m using MS Orleans as my server, and everything in the hot path I had to take out of Orleans and revert to lower level concurrency primitives and data structures, handle it myself basically.

Those are really the only important areas that I’ve struggled with in .NET as opposed to java. And most people will never have to deal with them.

2 Likes

I share this exact same sentiment.

With out the content… your ‘Massive Multiplayer Online Role Playing Game’ isn’t so massive.

MMO’s really aren’t a good starting point for a video game. Especially if you expect it to do well. Even MMO’s created at the millions of dollars they cost with huge teams by huge studios with well known IP’s… and they still fail miserably. And not because people don’t like them, but because the user base needs to invest so much time into them that they’ll pick the most popular/stable one as it has the most users to play with.

And throwing in all that server stuff, multiplayer stuff, that’s complicated stuff.

How about you first create an RPG.

Then maybe upgrade to a multiplayer RPG, like a co-op one.

And THEN upgrade to the MMO aspect.

I’m willing to bet at stage 1 you’ll see why MMO’s are a huge bite to take.

To give you an idea of what I mean. Check out my spoiler here if interested (includes multiple youtube videos, so I’m using a spoiler so as not to hijack your thread too much):

I have been programming for 11 years. I got into programming for video games, though most of my work has been more business oriented. So my video game experience is mostly indie oriented.

I work on a team with 1 other guy. He is the artist. He has 11 years experience working in the professional video game industry directly. He worked for a subsidiary of Activision on huge titles like Marvel Ultimate Alliance 2, the Guitar Hero series, Skylanders, Transformers DS, and was even given the lead artist role on a new IP project that never came to fruition (basically it was skylanders for girls, can’t really say anything more than that).

In our indie endeavors we’ve worked on multiple projects that go flop.

Take for instance the cursed “Apoc” game we’ve sunk SO MANY hours/months/years into:

https://www.youtube.com/watch?v=39omA1OLOHM

And it never got finished.

It’s this repository of code and assets sitting on my git server that haunts me every day. I open it up occassionally and plug some code or designs into it and then get sad and close it again.

We took way too big a bite for 2 guys to take.

And that wasn’t even an MMO. It was just a side scrolling hack and slash title.

Just didn’t work in the end.

Since that project we did several in house game jams and figured out our scale. What works for our team… I’m not saying this is what will work for your team… my point is that you need to figure out WHAT works for your team (which appears to be just you).

It was when we did this little 1 week in house game jam where we created this cute little puzzle adventure game:

https://www.youtube.com/watch?v=2W6H6p2JzOY

There’s not a lot to it, it’s very short, we made it in a week.

But we found our scale. A few iterations from there and we figured out that we like puzzles and narratives in small little “Mighty Max” packages.

Remember Mighty Max? Not sure how old you are… but we like to think of our titles as Mighty Max games. A small little adventure small enough to stick in your pocket:

https://www.youtube.com/watch?v=xkrLWjNxYbY

And from there that’s where our current episodic series ‘Devil’s Bargain Bin’ started. Our first title being ‘Prototype Mansion’:

https://www.youtube.com/watch?v=i1jtxNs-Aqc

https://jupiterlighthousestudio.itch.io/prototype-mansion

Who knows. Maybe MMO is what you’re destined to make.

I just wanted to convey that sometimes you’ll be surprised where the world takes you when you take too large a bite.

It ain’t gonna kill ya to take that big bite of an MMO.

But you might find out that your end result will be something wayyyyyyyy different.

1 Like

*EDIT Sorry, this is not relevant for the actual topic (Java vs C#), but for the discussion that started about MMOXYZ development.

Here’s my personal opinion and experience (I’m a passionate programmer as wellso that’s only about the coding part - no game design, no art… ):

When I started out more than 6 years ago, my initial goal was to create a MMORPG as well (since I love these type of games and I used to play one for several years - actually a total waste of tens of thousands of hours).
It’s still a goal, but I accepted the fact long time ago, that it is indeed a task you shouldn’t really approach without any solid code base, without proper project management and probably not alone if you want to make something decent.

You may think you got everything right there, and even if you’re a genius, you’ll get stuck sooner or later in detail and software architecture. These huge projects always need a solid code base, otherwise you’ll get lost. The standard libraries are not enough for that IMO.

So how did I personally start off?
When I realized the old Unity networking wouldn’t satisfy my needs, I started to write my own. It’s taken months of effort for research about protocols and advanced, low-bandwidth custom protocols, lower layer access, state synchronization, time synchronization, and much more… and the requirements for difference game genres made it even more complicated… and it’s currently still alot to do in order to run even more reliably and more performant (I’ve successfully run tests with thousands of clients tho).

If you use the “newer” UNET, perhaps this isn’t necessary - I’ve never tried. But it could probably save alot of time and the source is publicy available on a repository to dive in and tweak it for your personal needs.

Anyway, having that task (partially) accomplished, at that point, I realized alot of the other stuff that I “just threw” into my projects was rendundant, not very well structured and not re-usable at all. I even lost the overall overview in regards to my code… This became even more obvious when I kept re-writing code for non-Unity projects at work + for university.

Since that, I’ve no longer worked on any concrete projects (except during my students job + studies) and instead I’ve been focussing on a very large framework that is determined to serve as my personal solid code base. Leave alone the software engineering part and how everything could play together nicely, the extensive Unit Testing takes alot of additional time and sometimes reveals what kind of weird architecture and dependicies I recently introduced with new components.

Of course, everyone is different and perhaps you’re way better than many of us and perhaps you can adapt to Unity faster than other developers, but it usually sounds alot easier than it is in reality.
Like already stated by someone else, MMOs usually do have a multi-million budget and the teams do often consist of very experienced developers (10-20 years game industry and such).They’ve got experts for security, networking, algorithms, complex math… everything.

If you’re just aiming for a simple login + the ability to let multiple players move around: That can be done in a week if you work on it with some knowledge and passion. There are also SDKs that offer this “out of the box”.
But once you start to implement actual “game logic”, this explodes…

I’m not gonna tell you to stop going for an MMO. It’s important to follow your visions and ideas, but be prepared for any of these options:

  1. you might fail
  2. you might get tired of it very soon
  3. you might get tired of it very late (which is usually very disappointing)
  4. you might never get tired, but never finish it as well (also disappointing)
  5. you might invest alot of time [and perhaps money] to finally achieve a first basic prototype

And some other options I just left out. But 5 if obviously the one with lowest probability - that’s just a “fact” taken from all the reports posted by very passionate and very gifted game developers.

2 Likes

One of the approaches some people are using is to have UNET’s HLAPI handle the game server instances (one per scene you need loaded) with the LLAPI handling communication with the supporting servers (eg account) and the database(s).

There’s a barebones master server framework on Github (used to be a paid asset) to assist with this approach too.

https://github.com/alvyxaz/barebones-masterserver

1 Like

Let me be blunt: Making a MMORPG as your first game would be a mistake.

Start small. Do something simple. Even a pong style game will do. Or even an Arkanoid/Breakout style game. It will force you to think about problems you didn’t even think about until you started making that “simple” game. Get some experience in problem solving common problems.

I have worked on and shipped several RPGs, and there’s one thing in common: Everyone, and I mean everyone seriously underestimated the amount of time and resources that go into making a RPG. Even a simple dialogue tree system can be time consuming. I have argued with game designers who insisted that “there’s not that much content” only to end up eating their own words when an estimated 9 month job turned into 2 years. Quests need to be scripted. These scripts need to be debuggable.

A MMORPG would be orders of magnitudes more complex than a RPG.

4 Likes

Answer to OP’s initial question. If you know Java well enough to make stuff, you’ll be productive in C# in about a day or two. I learned Java in University and picking up C# for Unity was pretty much instant.

An MMO doesn’t have to be an immense effort - though when people talk about one, they usually think of WoW-levels of complexity.

Don’t have that kind of budget, but want to make something that’s fun for large groups of people to come back to? Make Realm of the Mad God. It’s unquestionably an MMO, though an unconventional one, and was apparently made by two people.

Each genre has it’s own built-in overhead. An fps costs more than a 2D platformer. We tend to think of MMOs as the most expensive kind of game, but that’s probably wrong. What makes the famous MMO games expensive is their RPG parts, and the large amount of content those require. Making a single-player RPG is going to require a lot more content than something like Realm.
Hell, I got to play a prototype game some Norwegian studio had thrown together a year back. It had a massive, persistent world that supported a bunch of players, and it essentially had three mechanics. Was still fun. Was definitely an MMO. Probably took them a week.

So you can for sure make an MMO on your own. You just have to scope a single-person hobby-project MMO.

2 Likes

Sorry, it took me a while to respond to you guys. I took me a while to read through your posts while studying in school. I’ve been studying C# and seeing the differences between that and Java and what I have found is that there isn’t much. Concept-wise everything thing is the same though, what I like about C# is that it has a built-in RandomClass, similar to Java, however, it’s much easier to call this class in scripting. That was actually my main concern. I’m a really big fan of randomness so to be able to implement this into C# scripts would be amazing.

As for the whole MMO discussion. I had a feeling that this would take over the entire discussion. I’ve been told many times not to do an MMO first many many times and I understand all of your reasonings. I tried taking on such a task with a text-based browser game and I realize how hard it was and how many hours it took. (hence why I ended up quitting) Which is why when I attempted to create this 3D MMO this time, I have a clearer and better battle plan. For this MMO, I’m just going to make the storyline of the game and have it so that players see other players but they won’t be able to interact with them until I get better at programming or I find help. For the most part, I don’t plan on building a game as big as World of Warcraft so it shouldn’t be hard for me to do this myself. I just want to release a multiplayer game in which players can see each other however, they won’t be able to interact with one another until future releases of the game.

For the most part, 3D modeling is my weakest skill when it comes to game-making so I’ll be brushing up on a lot of Blender throughout the year.

@Baste : Thanks for the useful tips, I will definitely be applying this to my game in the future. My game will definitely be different from other MMO’s. It’s not necessarily meant to be great just because it has a bunch of players but the gameplay itself is meant to be amazing.

@Suddoha : I realized the 5 points you made when I attempted to make an MMO browser game a long time ago. Trust me, I KNOW how hard it is. I’m working on using a SQL database for my MMO which is a concept I had with my browser RPG but I didn’t entirely have the experience nor the understanding of Javascript and PHP at the time to make it. Fortunately, there are some YouTube tuts that’ll help enhance this experience.

@lordofduct : I like the way you think. I’ll definitely be using this approach when I make my game. I want to take it slow first and then move my way up. I promise to deliver a great game even if the graphics for it aren’t that great.

I actually have a different opinion then most on should new developers try to make games way over their head. For the right person that is actually the best way to learn IMO, diving in so deep it makes your head swim.

The reason you hear people saying start with something simple, is because 99% of the time on these forums the people wanting to make an mmo aren’t serious. First sign of real effort and they bail. The very fact that they post the most basic of questions show they never did what serious people do, actual research. So encouraging them to try something simple is kind of like a mercy killing.

3 Likes

That’s probably the best I’ve seen it described.

1 Like

Sometimes there’s diving in the deep end. In which case I agree… it ain’t like you can drown. And I stand by that… most of the time.

But I still caution against the grandest of attempts. And an MMO (a real MMO) is pretty dang grand. Which is why I didn’t necessarily say don’t do it… but merely that you might want to consider what it is you’re getting into. And if you really truly do have the nerve to go all the way. Starting out with an RPG design, than building in multi-player, than co-op after that is really a way to go. Because honestly… you build a project like that up along the way anyways. Regardless, you have to start at the basics when starting a prototype.

2 Likes

Going from C++ and Java to C# is about the optimal language experience to jump in with. The C# design was heavily influenced by both C++ and Java. The thing is in Unity you’re not just coding in C#, but instead are hanging C# “scripts” off of various gameobjects. It is a big shift in thinking and takes a while to get the hang of how this all works in Unity. You’ll undoubtedly spend much more effort learning Unity than you will C#.

That is why an MMO, which is as complicated as a game project gets, is the absolute worst first project to start with. Even when you know C# and Unity fairly well, your MMO is going to take years… plural. Its a good idea to start learning Unity on a project that is reasonable for a Unity novice to complete in a matter of months. That way you get good exposure to a lot of the different features of Unity, from UI, to physics, to movement, to animations, even camera manipulation. You get to see from start to finish rather quickly how the whole thing comes together.

If you go with an MMO as your learning project, you’re going to not even have something “playable” for like 18 months, and a lot of that time you’re going to be stuck doing the same network backend work for what seems like an endless period, and not getting exposed to other parts of the engine. So a year in you’ll probably be pretty good at one tiny part of Unity, but will still lack the skillset to complete even the simplest of games.

I’m over a year into my own MMO project, and I’m optimistic I’ll have it in a public beta state before the end of this year. In most areas I’ve kept the scope of the project as simple as possible, but it is still a huge project. It was very important for me though to actually work on some smaller stuff first, to learn all the tricks on something simple, and even to get something complete and up on Steam to dive into how releasing a game works (which is a lot more complicated than it sounds, where simple mistakes can and will screw your entire game so it is better to learn them on something you haven’t spent years on).

3 Likes