Jump to content

Recommended Posts

I've read that 0. A.D. was written in C++(I'm terribly sorry if i'm wrong), but this left me wondering what was the reasoning/background for choosing it. I'm not complaining by any means, but I've always considered Java or Python to be more reliable and thus more popular among the developers.
 

Share this post


Link to post
Share on other sites

It comes done to the fact that they Java and Python are not fast enough for intensely graphical games if you don't want tearing and lag on the screen and keeping track of all the units on the screen for pathfinding.

Enjoy the Choice :)

  • Like 3

Share this post


Link to post
Share on other sites

The number of serious 3D game engines written in anything but C or C++ is not very large. Both of these languages can be quite close to the hardware, which is sometimes needed to make things performant (yes, we aren't there yet, but that is just lots of work). With Java you'd either be trying to work around the garbage collector by keeping memory buffers yourself, or having to deal with those GC pauses. Python still has that global interpreter lock (which is just as bad as it sounds), and we do already have another scripting language with quite some code written in it, and it works well enough that nobody really considers porting it to something else that will just have different drawbacks a worthwhile effort.

Mostly C++ is one of the very few choices for a game engine that makes sense (mostly due to being close to the hardware if needed, and being able to use libraries). Java might be a fine choice for business applications where you can just throw bigger servers at it and tune the GC until it works good enough, but for a 3D game (engine) it might not be the best choice. For Python vs JS the former might be nicer from a language standpoint, but that doesn't change the issue of existing code that works, also we do benefit from JS engine optimization efforts.

  • Like 7

Share this post


Link to post
Share on other sites

Hmm, I see your reasoning, I guess I should Invest my time into learning C++, I don't think It will be too hard since Java and C have a lot in common.
Thanks for your answers.

Edited by CenturionRoamer
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×