Day 7: Delivered!

Well, it happened again! Another game!

I've submitted my final version. The source code requires Python 2.7 and works straight away in both Linux and Mac, tomorrow is "package day" and I'll try to make a binary bundle for Windows.

This PyWeek has been a hell of a ride. I made the same mistakes of the previous PyWeek (used a library I didn't know well enough), and few new ones. But I'm happy :)

I'll write a post-mortem in a few days. Now is time to have a burger to celebrate!

EDIT: I've released a new version that includes a patch for a bug in Cocos2d. Thanks to sixthgear for the report!

(log in to comment)


Hi reidrac, looks like cocos wants SDL to be there even though i think you are not using it? Tested on Mac OS X Mountain Lion with the builtin python (2.7.2 64-bit)

xwing :: Downloads/forscience ยป ./forscience 
Traceback (most recent call last):
  File "./forscience", line 3, in <module>
    from game import Game
  File "/Users/joshua/Downloads/forscience/game/", line 20, in <module>
    from cocos.director import director
  File "/Users/joshua/Downloads/forscience/cocos/", line 105, in <module>
  File "/Users/joshua/Downloads/forscience/cocos/", line 89, in import_all
    import actions
  File "/Users/joshua/Downloads/forscience/cocos/actions/", line 37, in <module>
    from basegrid_actions import *
  File "/Users/joshua/Downloads/forscience/cocos/actions/", line 64, in <module>
    from cocos.grid import Grid3D, TiledGrid3D
  File "/Users/joshua/Downloads/forscience/cocos/", line 43, in <module>
    from director import director
  File "/Users/joshua/Downloads/forscience/cocos/", line 127, in <module>
    import cocos,, cocos.custom_clocks
  File "/Users/joshua/Downloads/forscience/cocos/audio/", line 40, in <module>
    import pygame.mixer
  File "/Users/joshua/Downloads/forscience/cocos/audio/pygame/", line 73, in <module>
    from import *
  File "/Users/joshua/Downloads/forscience/cocos/audio/pygame/", line 28, in <module>
    from import SDL
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/", line 30, in <module>
    import dll as SDL_dll
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/", line 253, in <module>
    _dll = SDL_DLL('SDL', 'SDL_Linked_Version', '1.2')
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/", line 58, in __init__
  File "/Users/joshua/Downloads/forscience/cocos/audio/SDL/", line 98, in _load_library_nix
    self._dll = getattr(cdll, library)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/", line 423, in __getattr__
    dll = self._dlltype(name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Library/Frameworks/SDL.framework/SDL, 6): no suitable image found.  Did find:
    /Library/Frameworks/SDL.framework/SDL: no matching architecture in universal wrapper
    /Library/Frameworks/SDL.framework/SDL: no matching architecture in universal wrapper
OK, thanks for reporting... I'm not using SDL at all. I'll try to figure out what's going on!
I've fixed the problem patching Cocos2d.

I'll report a bug, although I believe is the same seen here:

The code in is not expecting an OSError. I'm caching it and rising an ImportError instead.