<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OMGWTFGAMES!!1! &#187; python</title>
	<atom:link href="http://omgwtfgames.com/category/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://omgwtfgames.com</link>
	<description>games, served indie side up</description>
	<lastBuildDate>Tue, 31 Aug 2010 22:50:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Phobocore &#8211; new game release</title>
		<link>http://omgwtfgames.com/2009/02/phobocore-new-game-release/</link>
		<comments>http://omgwtfgames.com/2009/02/phobocore-new-game-release/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 07:01:38 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[game design]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbyt]]></category>
		<category><![CDATA[releases]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[galcon]]></category>
		<category><![CDATA[phobocore]]></category>

		<guid isPermaLink="false">http://omgwtfgames.com/?p=92</guid>
		<description><![CDATA[Here&#8217;s a new game I&#8217;ve been developing on-and-off for a few months now. I&#8217;ve become pretty busy at &#8220;The Day Job&#8221; recently, and due to commuting time I haven&#8217;t found time to add all the features I&#8217;d like. I thought rather than sit on this game for many more months, I&#8217;d just release it as [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a new game I&#8217;ve been developing on-and-off for a few months now. I&#8217;ve become pretty busy at &#8220;The Day Job&#8221; recently, and due to commuting time I haven&#8217;t found time to add all the features I&#8217;d like. I thought rather than sit on this game for many more months, I&#8217;d just release it as is. It&#8217;s polished enough to play &#8230; but you&#8217;ll need a friend (if you live in Melbourne &#8230; I&#8217;m happy to drop round and play it with you <img src='http://omgwtfgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p><strong><em>Phobocore</em> is a two-player hotseat game, where the aim is to capture all the planets onscreen by shooting them. It&#8217;s sort of a cross between </strong><strong><em>Asteroids</em></strong><strong> and <em>Risk/Galcon</em>, with a respectful nod to open field overhead shooters like </strong><strong><em>Robotron</em>, <em>Bezerk</em></strong><strong> or <em>Gauntlet</em>.</strong></p>
<p style="text-align: center;"><a href="http://omgwtfgames.com/wp-content/uploads/2009/02/phobocore_screenshot.png"><img class="aligncenter size-medium wp-image-97" title="Phobocore screenshot" src="http://omgwtfgames.com/wp-content/uploads/2009/02/phobocore_screenshot-300x224.png" alt="Phobocore screenshot" width="300" height="224" /></a></p>
<h3><a href="/downloads/phobocore_v0.9.zip">Download Phobocore (v.09 for Windows &amp; Linux) [10.3 mb]</a></h3>
<p>The experience of creating this game has been quite enlightening so far. It really got me thinking about aspects of game design I hadn&#8217;t thought deeply about. I threw around lots of ideas relating to &#8216;resources&#8217; and &#8216;defenses&#8217;, particularly thinking about how RTSs like <em>Starcraft</em> require balance in play style between defense building, offensive <span class="variant">maneuvers </span>and resource gathering. Good players must multitask and proiritize to get the upperhand on their opponents. Key questions like <em>&#8220;Should captured/neutral/enemy planets be solid objects or unhindering ?&#8221;</em> occupied more than one dinner time conversation, bearing out all the ways these would changed the game. I had great fun testing the effect of different game rules, and how these changed the dynamics of the gameplay (with huge thanks to my long-suffering girlfriend for playtesting. The next best thing to writing an AI player <img src='http://omgwtfgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). If you are keen to fiddle with these game rules yourself, you can throw various flags in the <em>phobocore.py</em> sourcecode to test how these variations change the play style required to win.</p>
<p>I also spent considerable time tweaking things like fire rates and the &#8220;planets-held to ammo recharge rate&#8221; ratio to try and make the game somewhat fun. It works pretty well for players that are equally matched, but much like <em>Galcon</em>, once one player gets an edge, it can be hard to recover and things are over pretty quickly.</p>
<p>Big features I&#8217;d love to add in the future: an AI compurer player for single player mode, and maybe network play. I need to work on the collision detection, improve the graphics, add background music, and add a help screen / tutorial screen and slap on a license (probably GPL for code and Creative Commons for audiovisual assests).</p>
<p>Have fun &amp; feedback is, as always, welcome !</p>
<h3><span id="more-92"></span></h3>
<h3>Here&#8217;s the README.txt</h3>
<pre>┏━┓╻ ╻┏━┓┏┓ ┏━┓┏━╸┏━┓┏━┓┏━╸
┣━┛┣━┫┃ ┃┣┻┓┃ ┃┃  ┃ ┃┣┳┛┣╸
╹  ╹ ╹┗━┛┗━┛┗━┛┗━╸┗━┛╹┗╸┗━╸
Copyright Andrew Perry, 2008, 2009.

A two player hotseat game of screen domination.
It's pink vs. blue.
Boys vs. girls.

┃: GAMEPLAY :┃

Phobocore is a a simultaneous two player game. The goal is to capture
 as many planets as possible.
* You capture planets by shooting them - eventually they will turn to
  your colour.
* If you shoot a planet enough, it becomes locked to your colour -
  these planets cannot be re-captured by the enemy.
* The more planets you capture, the faster your ammo refills (orange
  bar). The more locked planets you hold, the more powerful your
  bullets become.
* You can fly through neural (white) or enemy planets. You cannot fly
  through your own planets.
* Shooting the enemy freezes them momentarily, however they also
  absorb your bullets for their own ammo store.
* Powerups occasionally appear - these give you more ammo, and can
  provide the vital edge you need to capture more planets than your
  opponent.
* The red bar goes up the more planets you lock. Once you have locked
  30 % of the planets on screen, you win.

┃: CONTROLS :┃

Player 1 (pink, left ammo bar): W,A,S,D and space
Player 2 (blue, right ammo bar): Arrow keys and right-CTRL

┃: OPTIONS :┃

Commandline options:

-f          run the game in full screen mode

┃:   TIPS   :┃

Early on, every bullet counts. Fire accurately and efficiently.

It may seem frustrating at first, since you can't shoot very fast.
Early in the game, aim to quickly but efficiently capture as many
planets as possible, and pick up powerups if you can. Don't waste
ammo locking too many planets early in the game - it's more about
quantity not quality at this stage. As you capture more planets,
your fire rate will go up.

Once you have a reasonable fire rate established, start focusing
on locking planets too. This will increase your bullet power,
meaning you can also capture/lock planets faster.

Take opportunities to steal any weak planets owned by your opponent
(the smaller ones) with a quick circular spray of bullets - this
will seriously impact on your opponents fire rate, frustrating
their efforts to capture/steal/lock more planets.

Try not to fence yourself in. Keep in mind that planets you capture
become blockades for you, but become open space for your opponent.
Rather than spraying a whole 360 degree circle of bullets to capture
all the planets in your vicinity, try doing 270 degree sweeps,
leaving yourself a exit small hole of neutral or enemy planets.</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2009/02/phobocore-new-game-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>maximalist: GBGames LD#11 &#8216;minimalist&#8217; minigame meets survival horror</title>
		<link>http://omgwtfgames.com/2008/11/maximalist-gbgames-ld11-minimalist-minigame-meets-survival-horror/</link>
		<comments>http://omgwtfgames.com/2008/11/maximalist-gbgames-ld11-minimalist-minigame-meets-survival-horror/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 08:39:05 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[ludum dare]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbyt]]></category>
		<category><![CDATA[releases]]></category>

		<guid isPermaLink="false">http://omgwtfgames.com/?p=51</guid>
		<description><![CDATA[So here is my entry for mini-LD#5. It&#8217;s a cover of GBGames LD#11 entry, &#8216;minimalist&#8217;, turned evil. Download: maximalist (maximalist_0.12_miniLD5.zip, 4.6 Mb, md5: 68ada72418f029f9d7f5e81ca4792863) (see below for the README) Gameplay video [youtube i8gTYMhBjv8] You may wonder why the fullscreen resolution seems strange (800&#215;480). Well, if you owned an Asus EeePC 4G Surf (701), you may [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>So here is my entry for mini-LD#5. It&#8217;s a cover of GBGames LD#11 entry, &#8216;minimalist&#8217;, turned evil.</p>
<p><strong>Download: <a href="/wp-content/uploads/games/maximalist_0.12_miniLD5.zip">maximalist</a></strong> (maximalist_0.12_miniLD5.zip, 4.6 Mb, md5: 68ada72418f029f9d7f5e81ca4792863)</p>
<p><em>(see below for the README)</em></p>
<p><a href="http://omgwtfgames.com/wp-content/uploads/2008/11/maximalist_screenshot1.png"><img class="alignnone size-medium wp-image-52" title="maximalist screenshot : title screen" src="http://omgwtfgames.com/wp-content/uploads/2008/11/maximalist_screenshot1-300x179.png" alt="" width="300" height="179" /></a></p>
<p><a href="http://omgwtfgames.com/wp-content/uploads/2008/11/maximalist_screenshot2.png"><img class="alignnone size-medium wp-image-53" title="maximalist screenshot : gameplay" src="http://omgwtfgames.com/wp-content/uploads/2008/11/maximalist_screenshot2-300x179.png" alt="" width="300" height="179" /></a></p>
<p><strong>Gameplay video</strong></p>
<p>[youtube i8gTYMhBjv8]</p>
<p>You may wonder why the fullscreen resolution seems strange (800&#215;480). Well, if you owned an <a href="http://en.wikipedia.org/wiki/Asus_EeePC">Asus EeePC <em>4G Surf</em> (701)</a>, you may not wonder so much.</p>
<p><strong>Libraries used:</strong></p>
<ul>
<li>Pygame</li>
<li>Rabbyt (including the pygame_font.py font rendering code)</li>
<li>My <a href="/2008/11/simplemenu-alpha0-release/">(alpha) simplemenu library</a></li>
</ul>
<p><strong>Tools used:</strong></p>
<ul>
<li>The Gimp</li>
<li><a href="http://www.cyd.liu.se/~tompe573/hp/project_sfxr.html">Sfxr</a> (DrPetter saves the day, yet again)</li>
<li>Audacity</li>
<li>oggenc</li>
</ul>
<p>I used a scanner to &#8216;photograph&#8217; various items around the house (including myself) to provide source images for further manipulation.</p>
<p><strong>Assests:</strong></p>
<ul>
<li>&#8220;Squealer&#8221; font by Ray Larabie</li>
<li>A scan of my face</li>
<li>A carved wooden &#8216;skull&#8217; box on my desk</li>
<li>Some hand drawn sprites (exit and glowstick)</li>
<li>Me screaming into the microphone</li>
</ul>
<p>All in all, I had a fun, relaxed weekend making this game. I&#8217;ve got to remember to relax a little more during Ludum Dare competitions, it really seems to help.</p>
<hr />
<h2>The README</h2>
<h3>Installation, playing</h3>
<p>On Windows, run <em>maximalist.exe</em> .</p>
<p>On Linux or other platforms, run:<br />
$ <em>python maximalist.py </em></p>
<p><strong>Dependancies (Linux or other only): </strong><br />
Python (2.5 +) ( http://www.python.org .. you probably already have it)<br />
Pygame 1.7.1 ( http://www.pygame.org )<br />
Rabbyt 0.8.2 ( http://matthewmarshall.org/projects/rabbyt/ )</p>
<p>(hint for Debian/Ubuntu: $ <em>sudo apt-get install python-pygame python-setuptools</em>; <em>sudo easy_install Rabbyt==0.8.2</em> )</p>
<h3>Backstory</h3>
<p>You are venturing into a dungeon or something. You think.<br />
Actually, to be honest, you don&#8217;t know how you got here or<br />
what you are doing here. All you do know is that there&#8217;s<br />
something nasty lurking in the dark. The big bag of glowsticks<br />
slung over you shoulder is your only friend.<br />
All you want to do is Exit. And keep Exiting, until it&#8217;s safe.</p>
<h3>Gameplay</h3>
<p>There are 25 levels. Using a glowstick costs 5 points. Exiting a level gets you 10.<br />
Getting your brains chomped by a nasty halves your score.<br />
Try to get the highest score you can.</p>
<h3>Controls</h3>
<p>Move the mouse. Click the mouse buttons.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/11/maximalist-gbgames-ld11-minimalist-minigame-meets-survival-horror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplemenu : alpha0 release</title>
		<link>http://omgwtfgames.com/2008/11/simplemenu-alpha0-release/</link>
		<comments>http://omgwtfgames.com/2008/11/simplemenu-alpha0-release/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 12:37:55 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ludum dare]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbyt]]></category>
		<category><![CDATA[releases]]></category>
		<category><![CDATA[simplemenu]]></category>

		<guid isPermaLink="false">http://omgwtfgames.com/?p=47</guid>
		<description><![CDATA[Here&#8217;s a quick initial release of a tiny &#8216;framework&#8217; I&#8217;m making, since I might use it in the Mini-LD#5 this weekend. I probably won&#8217;t even participate this time, but just in case, I present to you &#8230; simplemenu-alpha0.tar.bz2 Requires pygame and rabbyt. It&#8217;s under the MIT license. I&#8217;m regarding this as alpha, since it&#8217;s incomplete [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick initial release of a tiny &#8216;framework&#8217; I&#8217;m making, since I might use it in the <a href="http://www.ludumdare.com/compo/2008/10/23/mini-ld-5-coming-soon/">Mini-LD#5</a> this weekend. I probably won&#8217;t even participate this time, but just in case, I present to you &#8230;</p>
<p><a href="/wp-content/uploads/2008/11/simplemenu-alpha0.tar.bz2">simplemenu-alpha0.tar.bz2</a></p>
<p>Requires <a href="http://www.pygame.org">pygame</a> and <a href="http://matthewmarshall.org/projects/rabbyt/">rabbyt</a>. It&#8217;s under the MIT license. I&#8217;m regarding this as alpha, since it&#8217;s incomplete and poorly tested, (although I am using successfully it in a small game already).</p>
<p><em>simplemenu</em>, as it&#8217;s unimaginative name suggests, is a simple set of classes to automatically lay out a vertical column of &#8216;buttons&#8217; on the screen, with click and rollover effects. Like the about simplest sort of GUI you could imagine. I made it because I felt like I needed a quick and brainless way to make simple &#8220;Start&#8221;, &#8220;Options&#8221;, &#8220;Quit&#8221; menus at the title screen of games, and during a Ludum Dare 48 hour competition, you don&#8217;t want to have to mess around with the details of things like this.</p>
<p>There is nothing I&#8217;d call game logic in the classes. There is demo code under &#8220;<em>if __name__ == &#8216;__main__&#8217;:</em>&#8221; &#8230; again this is what I would call &#8216;functional documentation&#8217;, not useful game logic. It&#8217;s all still quite ugly.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/11/simplemenu-alpha0-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextWidget for PyGame</title>
		<link>http://omgwtfgames.com/2008/09/textwidget-for-pygame/</link>
		<comments>http://omgwtfgames.com/2008/09/textwidget-for-pygame/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 04:06:03 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[note to self]]></category>

		<guid isPermaLink="false">http://omgwtfgames.com/?p=42</guid>
		<description><![CDATA[Note to self: Check out TextWidget before I finish my (unreleased) SimpleMenu moduleÂ  &#8230; I may be able to use TextWidget within the SimpleMenu framework &#8230;. or the work may have even been done for me since they look similar in spirit. No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Note to self: Check out <a href="http://www.learningpython.com/2006/12/13/textwidget-a-simple-text-class-for-pygame/">TextWidget</a> before I finish my (unreleased) SimpleMenu moduleÂ  &#8230; I may be able to use TextWidget within the SimpleMenu framework &#8230;. or the work may have even been done for me since they look similar in spirit.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/09/textwidget-for-pygame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mondrian: Final Ludum Dare 11 entry</title>
		<link>http://omgwtfgames.com/2008/04/mondrian-final-ludum-dare-11-entry/</link>
		<comments>http://omgwtfgames.com/2008/04/mondrian-final-ludum-dare-11-entry/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 14:09:11 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ludum dare]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbyt]]></category>
		<category><![CDATA[releases]]></category>

		<guid isPermaLink="false">http://gamedev.pansapiens.com/?p=19</guid>
		<description><![CDATA[I&#8217;ve just submitted my final game entry for for Ludum Dare 11. You can download it here [Mondrian_by_pansapiens_LD11.zip] (Windows and Linux compatible). More details later. Right now, I have to sleeeeeeeep. Update: Here&#8217;s the text of the README from the zip. You may need to use the level editor and replace level7.pickle and level8.pickle with [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just submitted my final game entry for for <a href="http://www.imitationpickles.org/ludum/">Ludum Dare</a> 11.</p>
<p>You can download it here [<a href="http://gamedev.pansapiens.com/wp-content/uploads/games/Mondrian_by_pansapiens_LD11.zip">Mondrian_by_pansapiens_LD11.zip</a>] (Windows and Linux compatible).</p>
<p><a href="http://gamedev.pansapiens.com/wp-content/uploads/2008/04/mondrian_final_screenshot.png"><img class="alignright size-medium wp-image-20" src="http://gamedev.pansapiens.com/wp-content/uploads/2008/04/mondrian_final_screenshot-300x224.png" alt="" width="300" height="224" /></a></p>
<p>More details later. Right now, I have to sleeeeeeeep.</p>
<hr /><strong> Update:</strong> <em>Here&#8217;s the text of the README from the zip. You may need to use the level editor and replace level7.pickle and level8.pickle with some easier levels.</em></p>
<p><span id="more-19"></span></p>
<p><strong>= Mondrian =</strong><br />
A game based on the visual art of Piet Mondrian.<br />
Copyright Andrew Perry (pansapiens), 2008.<br />
Licensed under the GPL version 3 (http://www.gnu.org/licenses/gpl.html).</p>
<p>Created for Ludum Dare 11 &#8211; Minimalism (18 &#8211; 20th April, 2008).</p>
<p><strong>= Installation =</strong><br />
Unzip the package, run mondrian.exe (Windows) or mondrian.py (Linux &amp; other platforms).</p>
<p><strong>Usage:</strong> mondrian.py [options]</p>
<p>Options:<br />
-h, &#8211;help    show this help message and exit<br />
-r, &#8211;random  Play a randomly generated level<br />
-e, &#8211;editor  Launch in level editing mode</p>
<p>Dependancies (only required on Linux, or when running from source):<br />
Python (2.5), Pygame (1.8), Rabbyt (0.8.1), PyOpenGL.</p>
<p><strong>= Gameplay =</strong></p>
<p>Goal: Clear the play area (aka Mondrian painting) to achieve pure white minimalism.<br />
Click on the black beams with the mouse pointer to make then vanish.<br />
Coloured squares expand when not in contact with a beam.<br />
Squares of the same colour vanish when they contact.<br />
Square of opposite colour do not vanish when they come in contact.</p>
<p><strong>= Controls (game mode) =</strong></p>
<p><strong>Click</strong> with the <strong>mouse pointer</strong>.<br />
Press &#8216;<strong>r</strong>&#8216; to restart the current level.</p>
<p><strong>= Controls (level editor) =</strong><br />
Objects are inserted at the current position of the mouse pointer. Otherwise, gameplay is the same.</p>
<p><strong>Up/down</strong> key     &#8211; insert vertical beam<br />
<strong>Left/right</strong> key  &#8211; insert horizontal beam<br />
<strong>z</strong> &#8211; insert red square<br />
<strong>x</strong> &#8211; insert yellow square<br />
<strong>c</strong> &#8211; insert blue square<br />
<strong>v</strong> &#8211; insert grey square<br />
<strong>s</strong> &#8211; save level to file &#8220;saved.pickle&#8221; in the working directory<br />
<strong>l</strong> &#8211; load level from file &#8220;saved.pickle&#8221;<br />
<strong>backspace, del</strong> &#8211; clear all objects from the level</p>
<p><strong>= Some legalese =</strong></p>
<p>This program is free software: you can redistribute it and/or modify</p>
<p>it under the terms of the GNU General Public License as published by</p>
<p>the Free Software Foundation, either version 3 of the License, or<br />
(at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful,<br />
but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</p>
<p>GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License<br />
along with this program.  If not, see .</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/04/mondrian-final-ludum-dare-11-entry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Packaging a Python game for distribution on Windows &#8212; py2exe and cx_Freeze</title>
		<link>http://omgwtfgames.com/2008/04/packaging-a-python-game-for-distribution-on-windows/</link>
		<comments>http://omgwtfgames.com/2008/04/packaging-a-python-game-for-distribution-on-windows/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 23:12:06 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ludum dare]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[cx_Freeze]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[py2exe]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[rabbyt]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://gamedev.pansapiens.com/?p=17</guid>
		<description><![CDATA[I do my game development on Ubuntu Linux. In case you hadn&#8217;t noticed, unlike pretty much every Linux distro, Windows does not come with Python installed by default. For distributing games written in Python on Windows, it&#8217;s nice to create a compiled executable version (using py2exe or cx_Freeze, for example) that can unzipped or installed [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I do my game development on Ubuntu Linux. In case you hadn&#8217;t noticed, unlike pretty much every Linux distro, Windows does not come with Python installed by default. For distributing games written in Python on Windows, it&#8217;s nice to create a compiled executable version (using <a href="http://www.py2exe.org/">py2exe</a> or <a href="http://python.net/crew/atuining/cx_Freeze/">cx_Freeze</a>, for example) that can unzipped or installed with two or three clicks, without requiring a separate Python installation. Gamers will typically give up if they have to go on a wild goose chase to install Python, Pygame and maybe something else just to get your lame game to run. (Hey, that gives me an idea for a great game &#8211; &#8220;Software Dependency Wild-goose Chase&#8221;. Actually, it would probably be un-fun. Scrap that idea.)</p>
<p><span id="more-17"></span></p>
<p>Obviously, the first thing to do is install Python and all the required dependencies (eg Pygame, etc) on a Windows box (or Virtual Machine) and make sure your game will actually run. If it won&#8217;t run, you may need to tweak your Python to be more cross-platform. For simple games this mostly boils down to making sure all the <em>sys</em> and <em>os</em> module calls that use file paths use <a href="http://docs.python.org/lib/module-os.path.html"><em>os.path</em></a> to manipulate the path strings, rather than string concatenation. Paths in Linux use a forward slash &#8220;/&#8221;, paths in Windows use a backslash &#8220;\&#8221;, and some other platform may do something else; <em>os.path</em> deals with all this for you. I went through this process with<em> </em><a href="/games/shoodar"><em>shoodar</em></a> (v0.11) and got it running under Windows with all the dependencies installed (eg Pygame, PyOpenGL, Rabbyt 0.81).<a href="http://gamedev.pansapiens.com/games/"> </a></p>
<p>Now comes the &#8216;fun&#8217; part &#8211; building the executable (and collecting associated dll&#8217;s and data files) for your game. There are a few tools for doing this on Windows:</p>
<h3><strong>Freeze</strong></h3>
<p>Comes with Python, but I didn&#8217;t test it.</p>
<h3><strong>cx_Freeze</strong></h3>
<p><strong><a href="http://www.cxtools.net/default.aspx?nav=cxfrlb">cx_Freeze</a></strong> &#8212; I got this working to create a Windows distribution of <a href="http://gamedev.pansapiens.com/games/"><em>shoodar</em> </a>after a bit of playing around. One advantage is that it doesn&#8217;t require a dedicated distutils script like py2exe. A downside is that it seems to generate lots of files in addition to the executable, and doesn&#8217;t automatically know to copy over data directories containing sprites &amp; sounds, etc. You need to remember to do that part manually.</p>
<p>I downloaded the Windows installer for cx_Freeze (<a href="http://downloads.sourceforge.net/cx-freeze/cx_Freeze-4.0b1.win32-py2.5.exe?modtime=1190663858&amp;big_mirror=0">cx_Freeze-4.0b1.win32-py2.5.exe</a>) and installed it. I unzipped the shoodar source into a folder called <em>shoodar</em>. In the shoodar source directory, I created a folder called <em>dist</em>. Then, at the Windows command prompt, in the <em>shoodar </em>folder, I typed:</p>
<pre>c:\Python25\Scripts\freeze --install-dir dist shoodar.py</pre>
<p>I then copied the <em>shoodar\data</em> folder into the <em>dist </em>folder.</p>
<p>The brand spanking new shoodar.exe executable was in the <em>dist</em> folder. It ran, and appears to function correctly.</p>
<h3>py2exe, with PyMikes PySetup.py</h3>
<p><strong><a href="http://www.py2exe.org/">py2exe</a></strong> &#8212; seems to be the most popular choice among Pygamers. There are a few wrapper scripts floating around at pygame.org.</p>
<p>The <a href="http://www.py2exe.org/index.cgi/Tutorial">py2exe tutorial</a> gives a nice example of how it&#8217;s done using a simple distutils setup.py script. I used py2exe with PyMike&#8217;s <a href="http://www.pygame.org/project/589/">PySetup.py</a> script. The PySetup.py script is a distutils setup.py script on steroids, tailored for packaging up Pygame games. It also worked for packaging <em>shoodar</em>, which also uses Rabbyt 0.81 (and hence PyOpenGL) without any special tricks.</p>
<p>I edited the obvious stuff at the top of the PySetup.py script in the shoodar directory (This included adding <em>data</em>, the directory which contains shoodars sprite files, to the <em>extra_data</em> list. I set <em>dest_folder</em> to the empty directory <em>dist</em>. I also added <em>pygame.locals</em> to the <em>extra_modules</em> list, but I probably didn&#8217;t need to. I left <em>icon_file</em> empty, since I don&#8217;t have an icon yet).</p>
<p>In the shoodar folder at the command prompt, running:</p>
<pre>c:\Python25\python.exe PySetup.py</pre>
<p>did the trick. Py2exe doesn&#8217;t generate nearly as many files as cx_Freeze &#8230; not that it&#8217;s really a big deal, but it looks less overwhelming in the file manager.</p>
<p>I had one problem with some (apparently) Linux specific code .. the use of <em>os.path.dirname(__file__)</em> which I changed to <em>os.getcwd()</em>. It&#8217;s worth noting that even after fixing this bug, py2exe builds failed until I removed the <em>build</em> (generated by py2exe) and <em>dist</em> directories and started with a clean slate. So, I&#8217;d suggest removing the build directory and the dest_folder between py2exe build attempts.</p>
<p><strong>Next episode:</strong> Wrapping up the distribution in an executable Windows installer package (or <em>How to make an evil &#8220;next&#8221;-&gt;&#8221;next&#8221;-&gt;&#8221;next&#8221;-&gt;&#8221;Finish&#8221; Windows installer for a Python game</em>).</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/04/packaging-a-python-game-for-distribution-on-windows/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Profiling Python functions with IPython&#8217;s timeit</title>
		<link>http://omgwtfgames.com/2008/04/profiling-python-functions-with-ipythons-timeit/</link>
		<comments>http://omgwtfgames.com/2008/04/profiling-python-functions-with-ipythons-timeit/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 05:28:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://gamedev.pansapiens.com/?p=16</guid>
		<description><![CDATA[If you aren&#8217;t careful (and even sometime when you are) realtime games written in Python sometimes hit speed problems and require some profiling to bring them to a playable speed. Typically, I would use the Python standard library&#8217;s &#8220;profile&#8221; module to find &#8220;hot&#8221; functions which are stealing all the CPU cycles. Today I discovered another [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>If you aren&#8217;t careful (and even sometime when you are) realtime games written in Python sometimes hit speed problems and require some profiling to bring them to a playable speed. Typically, I would use the Python standard library&#8217;s &#8220;profile&#8221; module to find &#8220;hot&#8221; functions which are stealing all the CPU cycles. Today I discovered another way.</p>
<p>Over at scienceoss.com theres a nice post about <a href="http://scienceoss.com/test-the-speed-of-your-code-interactively-in-ipython/">profiling functions using &#8220;timeit&#8221; within IPython</a>.  Essentially, in <a href="http://ipython.scipy.org/">IPython</a>, you can run:</p>
<pre>timeit my_slightly_sluggish_function(x, y)</pre>
<pre>timeit maybe_a_faster_function(x, y)</pre>
<p>and get average execution time values over many replicates of each function call, like:</p>
<pre>100000 loops, best of 3: 8.9 µs per loop</pre>
<pre>100000 loops, best of 3: 4.9 µs per loop</pre>
<p>Interesting how programming for games and programming for scientific number crunching often have the same requirements and boil down to using similar techniques.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/04/profiling-python-functions-with-ipythons-timeit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interactive fiction in Python ?</title>
		<link>http://omgwtfgames.com/2008/04/interactive-fiction-in-python/</link>
		<comments>http://omgwtfgames.com/2008/04/interactive-fiction-in-python/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 09:57:37 +0000</pubDate>
		<dc:creator>perry</dc:creator>
				<category><![CDATA[inform]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[IF]]></category>
		<category><![CDATA[interactive fiction]]></category>
		<category><![CDATA[z-machine]]></category>

		<guid isPermaLink="false">http://gamedev.pansapiens.com/?p=15</guid>
		<description><![CDATA[I&#8217;ve just been researching Interactive Fiction (aka text adventure) systems written in Python. I&#8217;ve always wanted to make an interactive fiction, but never quite got around to it. I even started learning the Inform language a few years back, which can be compiled to run on the Infocom Z-machine interpreters (like Frotz, among many others). [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just been researching <a href="http://en.wikipedia.org/wiki/Interactive_Fiction">Interactive Fiction</a> (aka text adventure) systems written in Python. I&#8217;ve always wanted to make an interactive fiction, but never quite got around to it. I even started learning the Inform language a few years back, which can be compiled to run on the Infocom Z-machine interpreters (like <a href="http://frotz.homeunix.org/frotz/">Frotz</a>, among many others). Of course, I&#8217;d rather write it in Python since there&#8217;s more chance I could add some custom features to the game.</p>
<p>As tempting as is it to reinvent the wheel and write my own IF interpretor in Python, I figured it was likely that others had already done this grunt work for me. After a bit of Googling, so far <a href="http://py-universe.sourceforge.net/">Python Universe Builder</a> (PUB) looks like the best option. Hopefully this will save me from the grue.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/04/interactive-fiction-in-python/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New release of Shoodar (v 0.11)</title>
		<link>http://omgwtfgames.com/2008/04/new-release-of-shoodar-v-011/</link>
		<comments>http://omgwtfgames.com/2008/04/new-release-of-shoodar-v-011/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 11:24:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rabbyt]]></category>
		<category><![CDATA[releases]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://gamedev.pansapiens.com/?p=14</guid>
		<description><![CDATA[Shoodar is a little game I&#8217;ve been writing, mostly to learn Rabbyt (although these things tend to grow beyond learning exercises &#8230;.. ). Essentially it&#8217;s just a silly vertical shooter, but there is an Ikaruga-inpired twist. It&#8217;s in early stages of development, but I&#8217;ve put a playable version up in the Games section No nice [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Shoodar is a little game I&#8217;ve been writing, mostly to learn <a href="http://matthewmarshall.org/projects/rabbyt/">Rabbyt</a> (although these things tend to grow beyond learning exercises &#8230;.. <img src='http://omgwtfgames.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). Essentially it&#8217;s just a silly vertical shooter, but there is an <a href="http://en.wikipedia.org/wiki/Ikaruga">Ikaruga</a>-inpired twist. It&#8217;s in early stages of development, but I&#8217;ve put a playable version up in the <a href="http://gamedev.pansapiens.com/games">Games</a> section</p>
<p><a href="http://gamedev.pansapiens.com/wp-content/uploads/2008/03/shoodar-01_screenshot1.png"><img class="alignright size-medium wp-image-7" title="Shoodar (v 0.1)" src="http://gamedev.pansapiens.com/wp-content/uploads/2008/03/shoodar-01_screenshot1-300x224.png" alt="" width="300" height="224" /></a></p>
<p>No nice installers and stuff yet, but the README in the archive gives some instructions for getting it running under Debain flavours of Linux.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://omgwtfgames.com/2008/04/new-release-of-shoodar-v-011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
