CenturionRoamer Posted March 22, 2017 Report Share Posted March 22, 2017 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. Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted March 22, 2017 Report Share Posted March 22, 2017 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 3 Quote Link to comment Share on other sites More sharing options...
leper Posted March 22, 2017 Report Share Posted March 22, 2017 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. 7 Quote Link to comment Share on other sites More sharing options...
CenturionRoamer Posted March 22, 2017 Author Report Share Posted March 22, 2017 (edited) 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 March 22, 2017 by CenturionRoamer 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.