A programming language showdown for my use case.

Started by
4 comments, last by WoopsASword 8 years, 3 months ago

I'm fairly familiar with higher level programming languages, and have enjoyed using them throughout the years. My knowledge and planning for the fine-tuning of a game, or rather the engine itself, is what I would consider on a fairly high level of understanding. Below of the requirements of the engine that I'm going to be writing.

  • OpenGL rendering engine.
  • 3D Voxel based game-engine.
  • In-house physics system, will be fairly simple. (Think Minecraft)
  • Stable FPS under decent loads.
  • Cross-platform compilation.

Obviously when it comes down to FPS there are a lot of factors, not only that will depend on myself, being the developer of the engine, but how much is being handled by the engine at the same time, as well as small rendering optimizations, graphical quality, etc.

However, my concern is more with the programming language's capability and performance when it comes to OpenGL. The following are my two favorite programming languages:

  • Java
  • C#

I understand that these are higher level languages, and will lose a little performance over using something like say, C++. There are plenty of libraries for both of the languages listed above that involve using OpenGL, such as:

  • LWJGL
  • jOGL
  • SharpGL
  • OpenTK
  • etc..

I'm far more comfortable with Java than I am with C++ mainly because I over-all enjoy the way programs are written. Some people argue that they're not much different from each-other, but I can argue with them until I'm blue in the face. The end-result is for a miniature application similar to that of the game Trove to be created, and run at a stable frame-rate. Obviously, as said before, this will be highly dependent on myself, but I'm more curious about the graphical limitations of the languages.

I will be using Mono for C# cross-platform development, if I go that route.

Please recall that I am not using any pre-made game engines and will be writing my own, as this is a personal project I have interest in.

Advertisement

Both would probably do the job just as well as the other. I'm sure there would be differences but I'll leave that for someone with more experience to comment on. Personally I don't think there's enough in it to base your choice of language on the differences. Just choose whatever you are comfortable with or whatever you wish to get better at using.

I would probably edge towards Java is cross platform is your thing but as you said, you can use c# for cross platform still I just feel it would be a little less involved to use Java to do so.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

If you are most comfortable with Java - use Java.

Plenty of games have been made with it, including Minecraft, which you mentioned smile.png

I agree with Viper. If you're already comfortable with Java, then use Java. Why lose productivity over online religious wars? As far as limitations go, the only limitation that you're going to have is what you can get done due to your limited knowledge. And you'll overcome that continuously by learning and doing.

So your endeavor is reasonable. Your tools are sufficient. Your limitations are temporary at best. Go forth and conquer the universe, Young Netizen.

Beginner in Game Development?  Read here. And read here.

 


In-house physics system, will be fairly simple. (Think Minecraft)

libGDX provides Bullet bindings for Java. Although I'd only use that part of libGDX, rest is... not of my liking, to put it nicely.

I preffer LWJGL over JOGL, Spasi knows really well what he is doing, and LWJGL provides tons of memory related utility classes you'll end up using.

Also, read up on object layout in memory, how JVM organizes objects fields in memory, the kind of overhead you have per each object instance, method calling optimizations present in HotSpot, etc. All good stuff you should know before tackling the lower level parts of your engine.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

I really suggest you to examine each library and see what suits you more.

I've seen dozen of good games built by using these libraries, So I can't say if anything of these will be better for your case.

This topic is closed to new replies.

Advertisement