Games in Python, - Better to use a Java JFrame for the game Window?

Hi
I am nearly ready to begin my foray into games in Python. However, is it more advisable to incorporate a JFrame for the game Window? Is Python GUI up to speed?

Thanks
LVL 1
beavoidAsked:
Who is Participating?
 
dpearsonCommented:
if you're writing your game in Python, you should use a Python GUI.  It would be a major nightmare to try to use a JFrame (or any other part of a Java library like Swing) in Python.

I've heard people say good things about Cocos2D (http://python.cocos2d.org/) which is all in Python and should be fine for any 2D game you might build.

Hope that helps,

Doug
1
 
dbruntonCommented:
What types of games are you proposing?
0
 
MereteCommented:
Is Python GUI up to speed? Depends will you be using open GL?
For money?
VR is the future
Graphic User Interface FAQ is worth a read,
https://docs.python.org/3/faq/gui.html
There is so many changes coming with game platforms versus computer systems. Microsoft pushing for mobile platforms windows as a Service, Steam has fully integrated to Cloud.
If you have time have a look at this, the games created using Amazon Lumberyard is amazing to say the least.
Quote
Free. Powerful. Fully Customizable.
We believe game developers deserve another choice. That’s why we’re building Lumberyard: a game engine with no royalties or seat fees, frictionless integration with Twitch and AWS, plus much more on the horizon.
https://aws.amazon.com/lumberyard/
Example of a game built with it
Star Citizen CitizenCon 2017 KeyNote Highlights
https://www.youtube.com/watch?v=tp5B5USGvMo&list=PLuErqyXOtifR5_G76YEhOFcNV_cdhQvaJ&index=2
Star Citizen about on Wiki
Developer(s)      
Cloud Imperium Games
Publisher(s)      Cloud Imperium Games
Director(s)      Chris Roberts
Writer(s)      Dave Haddock[1]
Composer(s)      Pedro Camacho
Geoff Zanelli[2]
Engine      Amazon Lumberyard
Platform(s)      Microsoft Windows
Release      
Star Citizen: TBA
Squadron 42: TBA
Genre(s)      Space trading and combat, first-person shooter
Mode(s)      Single-player, multiplayer
https://en.wikipedia.org/wiki/Star_Citizen
1
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
beavoidAuthor Commented:
Thanks

This won't be for money. I'd like to know as much about Python Frames as I do AWT and swing.

I'd like to know where opinion stands on incorporating Java into a Python project? Is it considered a cheap fallback? It sounds like it isn't that simple. Why? Can you not pass in data to methods and get returned values?

Must it all be ported to pure Python, - also, if I'd ever like to offer it as open-source, these days? (Is Java history?)

I don't need Starcraft 2 graphics yet. It sounds like Python Frames could be adequate for anything I used to be able to do? Should I not be concerned about their ability to be as good as JFrames?
0
 
dpearsonCommented:
>> I'd like to know where opinion stands on incorporating Java into a Python project?

Pretty close to impossible.  A Java program is a set of bytecode (instructions) which you can't actually execute.  Instead you run Java (actually a Java virtual machine) and that reads the bytecode and executes the program.  So you must be running a Java virtual machine in order to execute Java code.  E.g. To run a java program you say:
"java -jar mycode.jar" <== see how you run "java" not "mycode.jar"

Python does not include this virtual machine - so there's nothing to "run" the Java code.

There was an effort to build a version of Python that could run inside Java (http://www.jython.org/index.html) but that's not really Python.  And I think it died a while ago.

If you had a C (or C++) program already and wanted to call part of that from Python, that would be possible.  Because a compiled C program  is directly executable.  It doesn't need something else to run it.

>> Must it all be ported to pure Python,
Yes (see above)

>>  also, if I'd ever like to offer it as open-source, these days?
You can make your Python or Java or anything else open source if you like.

>> (Is Java history?)
No it's going strong, but it's almost exclusively used for server code these days - i.e. stuff with no GUIs at all.

Good luck,

Doug
1
 
beavoidAuthor Commented:
Thanks,

One thing also,
My Pycharm, interpreter is Pycharm CE 2016. 3.3.3

The woman in one Pygame install has 3.6.2
I've wondered if this is possibly my entire problem, upgrade incompatibilities?
Also, must I do anything specific to let the install know where my pygame must be installed, or does it always look in applications/pycharm
Thanks
0
 
dpearsonCommented:
Those are all totally different questions from the original - I'd start a new topic if you're having problems with your python install and get some other experts to weigh in to help.

Doug
1
 
beavoidAuthor Commented:
Thanks
I'll do the Python install question, but do you suspect that the different versions, interpreters, are a plausible reason for my problems?
0
 
dpearsonCommented:
Certainly could be.  Python is one of those languages which suffers from slightly different libraries and installations resulting in very different behaviors.  Package management is a problem in many languages.
1
 
beavoidAuthor Commented:
Thanks All
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.