PyWeek - wisty

Solo entry. My goal is to finish, this time.
This is a solo entry by wisty.

Awards

Give this entry an award

Ratings (show detail)
Fun: 2.1
Production: 2.6
Innovation: 3.1
28% respondents marked the game as not working.
Respondents: 15
Files: Uploader Date
Antageddon.zipfinal 3.17 Mbytes wisty 2011/09/18 00:23
Antageddon.

Saturday 24 September, 2011

[ wisty @ 00:53 ] Pyglet resources not loading

pyglet.resource.ResourceNotFoundException: Resource "data/queen.png" was not found on the path.  Ensure that the filename has the correct captialisation

Cosmo and Rectifier pointed out a bug:

pyglet.resource has a cache. This cache gets invalidated by the previous games you played (but didn't happen on my machine, as I played my game first).

Cosmo fixed it by adding (at the top of run_game.py) :

    pyglet.resource.path = ['data']
    pyglet.resource.reindex()

    and removing "data/" from all the resouce loads.

It might be possible to just do:

    pyglet.resource.path = ['.']
    pyglet.resource.reindex()