Java vs Python for game dev

Started by
7 comments, last by rip-off 12 years, 9 months ago
I have a friend (HurrrrHmmm) who wants to know what would be better for making 3d games (This is not to do with a scripting language), Java or Python?

Java:
-Faster
-Uses More Ram
-Most used more for 3d games/apps (has a big community too)
-More wrappers to C++ stuff (Like Ogre3d, Which is what I'm going to use for graphics)
-More difficult

Python:
-Slower (But can be sped up with the use of IronPython or Psyco)
-Uses less Ram
-Less used for 3d games (but does have a big community)
-Lots of wrappers (like Java, like the Ogre3d wrapper :D)
-Less difficult

I know this is basic info, but I'm finding really hard to choose between both of these languages! Any help?
Advertisement
Depends on what language you like most. Both languages have powerful engines with large community (JMonkeyEngine for Java and Panda3D for Python). Panda3D is actually a hybrid engine, it's written in C++ but Python is the main language for it. You could apply same thing to Java/Python - write your engine in Java, write your game in Jython. Although, writing an engine won't get you anywhere near the completed game, so you'd be better off just picking a language you like most, pick an engine and start coding.




It also depends on your programming style - Java forces object oriented style and is verbose, while Python is more of a hack scripting language brief in form.


OpenGL fanboy.

Python is more of a hack scripting language brief in form.



What do you mean by that, (I don't really understand)?

[quote name='i_luv_cplusplus' timestamp='1310293380' post='4833284']
Python is more of a hack scripting language brief in form.



What do you mean by that, (I don't really understand)?
[/quote]
compare some similar java and python code. Java has a lot of variable declarations, types, keywords while Python goes away with that in order to allow for quickly writing new code. http://pythonconquerstheuniverse.wordpress.com/category/java-and-python/ here you have some examples, it's a bit Python biased but still.
OpenGL fanboy.
Basically, if you want to write a medium -to- large program, use java. If you want to write a small application, use python. The speed hit in python will kill you on any decent sized application, and bug checking in python will get painful because of its dynamic typing.

So, it really depends what type of 3d game you want to create. Small game, use python. Medium to large game, use Java.
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.

[quote name='LizardGamer' timestamp='1310295989' post='4833296']
[quote name='i_luv_cplusplus' timestamp='1310293380' post='4833284']
Python is more of a hack scripting language brief in form.



What do you mean by that, (I don't really understand)?
[/quote]
compare some similar java and python code. Java has a lot of variable declarations, types, keywords while Python goes away with that in order to allow for quickly writing new code. http://pythonconquerstheuniverse.wordpress.com/category/java-and-python/ here you have some examples, it's a bit Python biased but still.
[/quote]
... So? The quantity of declarations and keywords does not a good language make.

Even with this definition of "hack scripting language", you haven't done anything to prove that it is good or bad.

So, it really depends what type of 3d game you want to create. Small game, use python. Medium to large game, use Java.


What if I used various C++ libraries with python (like ogre3d, bullet, openal etc. and compiling to machine code with psyco)? Could this be suitable for a medium - large scale game? Or would Java still be better?
The term large is relative, but If you want to do any large games, do not use python --use Java. Or, better yet, use c++. But, if your choices are Java or python only, definitely use Java over Python. Even with c++ libraries that python uses --it will help, but Python is slow compared to Java..

this is older, but its one of the links I found
http://blog.snaplogic.com/?p=55
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.

Could this be suitable for a medium - large scale game?
[/quote]
It depends on the type of game, and your definition of "medium" and "large". Action games are far more performance sensitive than turn based games.

Python has been used in large AAA games, but mostly as a scripting language for the non-performance sensitive aspects of the game. If you are using libraries for graphics and physics you might be able to get away with using Python for most everything else.

There is no right answer. What you need to balance are the requirements of your game, and your own requirements in terms of productivity and experience in the languages you know.

This topic is closed to new replies.

Advertisement