Jump to content
  • Advertisement
Sign in to follow this  
Christian Tucker

A programming language showdown for my use case.

This topic is 1074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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. 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
If you are most comfortable with Java - use Java.

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!