Opioid2D Runtime Environment
Games made in Python are somewhat cumbersome to distribute. In order to facilitate distributing new versions of games to testers and friends, I've designed an utility similar to JRE, that allows one to run O2D games on Windows platforms without having Python installed. It's still a work in progress, but I've compiled a prototype you can download to see how the whole thing might work.
After you install the Runtime Environment, you can launch the example game by simply double clicking the
- O2D RE prototype (4,345 KB)
- Example game(62.5KB)
After you install the Runtime Environment, you can launch the example game by simply double clicking the
invaders.o2d
file. As you can see, the game itself is a relatively small file, which is much more convenient than always having to distribute several megabytes worth of dependencies.
6 Comments:
I was just thinking about the problem of dependencies and bundling everything together, and this solution is excellent as far as I can tell. What I'm wondering is what we have to do to compile o2d files?
Keep kicking ass :)
-Corey
In the first version at least, .o2d files are simply zip files that must contain a script called "run.py" that has a method "run" that takes no parameters.
Sounds wonderful. However, how will O2D RE handle external libraries such as Twisted or PIL? Will those be automatically packaged with the .o2d file?
This sounds absolutely brilliant, Shang. Beats the hell out of requiring the entirety of Python + various dependencies needing to be bundled with every game.
to the other Thomas:
I guess the reason for prefering the runtime environment solution is to be able to distribute multiple games, and all of them very tiny, with just one runtime environment.
@cold wolf: there's no clean way to handle C-extensions yet, but I'll think about it. Pure Python libraries can be included in the zip/o2d file.
This is mainly designed for my own use. I want to be able to distribute several games that have the exact same dependencies packaged into very small files and as easily as possible.
py2exe alone is not very convenient (compared to just zipping the game folder) nor small.
Post a Comment
<< Home