I have a significant game I really need to port to tablets. (Android has PyGame subset for Android, which I'm still investigating). It would be great to take my Python code and move it to a more cross-platform engine.
I'm looking for engines with a pure code API, something I can wrap my intermediate glue for graphics and audio around. Kivy and some others use too much *ML (or JSON). Hoping I missed something good. The best I've seen is Futile for Unity3D, but Boo !!!!!= Python.
Have a look at http://ignifuga.org, it's Python based and inspired by projects like Cocos2d and AndEngine.
Have a look at Kivy framework. I tried just some very simple demos but I can confirm that you can run it on PC/Mac/iOS.
Related
I'm currently at a crossroads. I'm somewhat versed in Python (2.7) and would really like to start getting into GUI to give my (although mini) projects some more depth and versibility.
For the most part, my scripts don't use anything graphical so this is the first time I'm dipping my toes in this water.
That said, I've tried using pygame and tkinter but seem to fail at every turn to get something up and running (although I had some slight success with pygame)
Am I correct to understand that for both I need X started in order to generate any type of interface, and with that, so I need X to get any type of input (touchscreen presses)?
Thanks in advance!
In order to use tkinter, you must have a graphics system running. For Windows and OSX that simply means you need to be logged in (ie: can't run as a service). For linux and other unix-like systems that means that you must have X running.
Neither tkinter nor any of the other common GUI toolkits will write directly to the screen.
I'm gonna give an alternative answer. If you know HTML, CSS and Javascript (or have time to give it a try) I would recommend using Flask, http://flask.pocoo.org/.
With flask you can create websites but you can also (as I am using it) let it be your GUI. It will work on any device and looks really good :).
I found a user friendly way plotiing meteorological maps with python. I found this flight path tool, http://www.aviationweather.gov/flightpath2?gis=off , and i want to make something like this in python. I have made the scripts retrieving the data and plotting the maps but i want to make the interface. Is it difficult? Do you have any ideas?
Are you wanting to make a web-based interface? If so, I suggest maybe Django. If you want just a script with some nice GUI on a local machine, I think Qt is easy to use. I can't run the java file from aviationweather.gov (or rather, do not wish to) so I don't know what the interface is like. But using either Django or Qt, I think those are the tools I would start with.
Check out the video here.
https://blogs.msdn.microsoft.com/visualstudio/2016/03/22/introducing-r-tools-for-visual-studio-3/
Start watching about 7 minutes into the video. I think that will be a great learning experience for you, and should get you going in the right direction.
I'm planning to develop a GUI application that uses curses. The idea is to provide an extra interface for a web interface, so that everything on the web site could also be done via the UI.
Basically, it should be platform independent: the user would have to SSH to the server after which the UI would automatically take over.
First of all, is this doable? As far as I understand, it would be platform independent as long as the end-user had the proper terminal software installed. Correct me, if I'm wrong.
I was planning to use Python for this, as it is the language I'm the most proficient in. Python comes with the ncurses library and Urwid, which I've been told, is quite good.
After having a quick test with Urwid, I had some problems. The thing is, I'm quite worried that I won't find answers to the problems that I will encounter down the road because apparently curses UI-s aren't all the rage nowadays. Documentation and examples are thus quite scarce.
In conclusion, should really I embark on this and quit my whining or drop the idea altogether? Any other suggestions?
It's certainly possible, and curses-based applications are still written regularly (e.g. PuDB is only 14 months old) although maybe not very often.
Did you try asking questions on the Urwid mailing list and/or IRC channel?
oh my, wouldn't this be a dream!
i've seen a couple of things out there to varying degrees of success.
Morticious Thrind: http://thrind.xamai.ca/
future death toll: http://f-dt.com/?wptheme=wp-cli
wordpress yadda yadda, this could be as simple as a 960/blueprint CSS, prototype.js, and a oneliner:
//TODO: Implement useful functionality && unit tests && documentation
//TODO: read
try { eval($F(x)); } catch (e) { panic(); }
BUT! this type of thing is pretty radical. i mean- ANYTHING can happen on the canvas of a web-browser these days, but any terminal emulator or lynx serves this purpose with flare.
also be sure to check out: https://stackoverflow.com/questions/472644/javascript-collection-of-one-line-useful-functions
the real question is what sort of software you plan on ncursing (sic,pun,etc.)-- it probably already has some rather useful command-line interfaces (sh).
It can be done but it's a struggle. I would recommend improving the web interface. You can use JavaScript to add keyboard shortcuts, for example, which can be very helpful for a faster workflow (see Gmail's interface, for example).
is it possible to use python to create flash like browser games? (Actually I want to use it for an economic simulation, but it amounts to the same as a browser game)
Davoud
The answer would be yes, assuming you consider this a good example of what you want to do:
http://pyjs.org/examples/Space.html
This browser-based version of Asteroids was created using Pyjamas, which enables you to write the code in python in one place, and have it run either on the browser, or on the desktop:
http://pyjs.org/
Having recently found Pyjamas, and also preferring to consolidate my code in one language (Python!) and location (instead of having some code server-side, and some browser/client-side, in different languages), it's definitely an exciting technology. Its authors have ported the Google Web Toolkit to Python, a really impressive feat, retaining the expressive power of Python (something like 80,000 lines of Java was shrunk to 8,000 lines of Python). More Pythonistas should know about it. :)
You could use Python to do client side scripting using Silverlight + IronPython. Of course, this requires all your users install Silverlight.
I think you're talking about using Python on the back end, in which case running something on the server side with Python (in which case this Django vs other Python web frameworks SO question is a good general list and may have what you're looking for.
You need to use something that the current browsers support, this means you're stuck with Flash, Java applets or Javascript+HTML if you want your game displayed in a browser.
You can use python on the backend and display pure HTML, if that is enough for your needs.
Yes, but there a a number of ways to get there.
Flash is the client side rendering. You could use Python to generate Flash, or you could use Python to generate some dynamic HTML with Javascript, etc. that was interactive in a similar way.
But the Python will be running on the server. The Flash, ActionScript, HTML, JavaScript, etc. will all be running on the client.
So while the answer to the question is yes, I am going to suggest you might need to do more research and ask a better question.
You could have Python CGI code as a backend and send input in to it through AJAX. Its probably better just use something on the client side for this, though.
I'm writing a XM desktop application (I plan on releasing the source on github when I'm finished if anyone is interested) Anyway, the one part I know very little about is how to play media within Python (I'm using PyQt for the frontend). Basically, I have a mms:// url that I need to play. I was wondering if there is a library that could accomplish this or something, really I just need someone to point me in the right direction.
I know its possible, because SMplayer (Python implementation of MPlayer that uses Qt) works with MMS, I may have to take a peak at they're source if worse comes to worse.
You can have a look at
PyMedia
PyGame
wxPython
Here is a code snippet of doing a similar thing with wxPython.
All of these can play media files.