20 June 2007

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 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:

Anonymous Anonymous said...

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

21 June, 2007 05:22  
Blogger shang said...

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.

21 June, 2007 09:26  
Anonymous Anonymous said...

Sounds wonderful. However, how will O2D RE handle external libraries such as Twisted or PIL? Will those be automatically packaged with the .o2d file?

22 June, 2007 02:39  
Blogger Viserys said...

This sounds absolutely brilliant, Shang. Beats the hell out of requiring the entirety of Python + various dependencies needing to be bundled with every game.

22 June, 2007 23:27  
Blogger Thomas Woelz said...

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.

23 June, 2007 06:00  
Blogger shang said...

@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.

26 June, 2007 01:40  

Post a Comment

<< Home