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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.Commented:
What types of games are you proposing?
0
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.