Thus ends the longest week of my life.

To people who said to watch your health and get plenty of sleep during Pyweek, I did the exact opposite. This was the most intense week of coding I've ever done. Looking back at my posts from Day 1 and Day 2, I can barely remember ever being in that position.We'll see if it paid off. (Fourth) final submission here:

Obb version 4

Please let me know if you catch any major bugs I can fix!

Good luck all!

(log in to comment)

Comments

Great job! Haven't got far yet but I plan on putting some time into it.
I uploaded a version that fixed a couple of bugs. Gameplay is identical to version 1. I've removed v1 from my upload page, but it's available upon request if you should want it. If you got version 1, don't press F12 or the program will crash. Also don't exit the game while paused, or leave the game paused for more than a couple of seconds. Not only will it crash but it will delete your save game. >_<
The first few times I ran the game, it crashed:


lantea:obb-v2 jerith$ python run_game.py
Traceback (most recent call last):
  File "run_game.py", line 4, in <module>
    main.main()
  File "/Users/jerith/Desktop/obb-v2/src/main.py", line 53, in main
    con.think(dt, events, keys, mousepos, buttons)
  File "/Users/jerith/Desktop/obb-v2/src/play.py", line 81, in think
    tip.settip(self.choosetip(mousepos))
  File "/Users/jerith/Desktop/obb-v2/src/play.py", line 256, in choosetip
    return self.status.choosetip(mousepos)
  File "/Users/jerith/Desktop/obb-v2/src/status.py", line 219, in choosetip
    if self.mutagenmeter.rect.collidepoint(mousepos):
AttributeError: 'MutagenMeter' object has no attribute 'rect'
After that, it seemed to run fine. Perhaps something to do with the initial rendering of new objects or something?
Tip: Start it with --huge to get a fair-sized window.
After half a second it crashes:
pygame 1.9.1
python 2.7
numpy 1.6.0

Traceback (most recent call last):
  File "/Users/Lennart/Desktop/obb-v2/run_game.py", line 4, in <module>
    main.main()
  File "/Users/Lennart/Desktop/obb-v2/src/main.py", line 53, in main
    con.think(dt, events, keys, mousepos, buttons)
  File "/Users/Lennart/Desktop/obb-v2/src/play.py", line 105, in think
    self.body.think(dt, self.status.healmeter)
  File "/Users/Lennart/Desktop/obb-v2/src/body.py", line 189, in think
    self.remakemask()
  File "/Users/Lennart/Desktop/obb-v2/src/body.py", line 143, in remakemask
    self.mask = mask.Mask(circles)
  File "/Users/Lennart/Desktop/obb-v2/src/mask.py", line 12, in __init__
    self.redraw()
  File "/Users/Lennart/Desktop/obb-v2/src/mask.py", line 52, in redraw
    self.alphacopy()
  File "/Users/Lennart/Desktop/obb-v2/src/mask.py", line 74, in alphacopy
    pygame.surfarray.pixels_alpha(self.surf)[:,:] = 255 - pygame.surfarray.array2d(self.blue)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/surfarray.py", line 208, in pixels_alpha
    return numpysf.pixels_alpha (surface)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/_numpysurfarray.py", line 297, in pixels_alpha
    raise ValueError("unsupported colormasks for alpha reference array")
ValueError: unsupported colormasks for alpha reference array

Also i got jerith's crash once.
jerith: Thanks, I think adding the following to line 13 of status.py will prevent that:


        self.rect = pygame.Rect(0,0,0,0)
Ernie: Hmmm.... according to this that's due to a bug in pygame on big-endian machines. I'll try to track down a workaround.
Okay, I uploaded a fix for jerith's and Ernie's issues. Current version is version 3.

Thanks for the testing, everyone!
Okay, up to version 4. This (hopefully) fixes a potential memory leak in some of the animations that a few people were seeing.
Archy tracked down a memory leak that seems to be related to some functions in pygame.surfarray. Downgrading from pygame 1.9.2 to 1.9.1 fixed the issue. If the game is leaking memory for you and you've got pygame 1.9.2, changing to 1.9.1 may fix it.
My mom loves this game, good work cosmo!
Oh god! I've just seen your "spoiler" screenshot! I didn't realize you could cross branches! Check out my end state! (Also spoiler in the same way.)

I guess this misunderstanding made the game even more interesting for me :). I recommend playing with this extra contract!
Wow, I'm impressed. I would not have thought it would be possible without crossings. :)

The crossings is mentioned in HINTS.txt, as well as a number of other tips I wanted to put in the game itself but didn't have time to do. I think everyone should probably read this file once you've given the game a shot. It's not very spoileriffic.

If anyone else wants to share their endgame, you can press F12 in the game to take a screenshot, which will be saved to a handy spot. (Don't do it if you're playing version 1, though.)
There's some kind of memory leak or something for me after playing for a while. It's not supposed to take over 1.1 GB of RAM, right? :)

I only noticed at that point because that's when my swap space filled up and my little netbook became exceedingly slow. Let me know if you need any more details or help finding where the issue is.

Otherwise, a very nice game! It even seemed to recover gracefully enough from being killed (reopened the game in its previous state), which was a nice touch. Think I'll be playing more, since my strategy has been bad and I haven't gotten very far - I'll take a look at the hints.
This is with the latest version btw.
What's your pygame version? (You can find out with "import pygame; pygame.version.ver") If you have 1.9.2, you might be able to fix it by downgrading to 1.9.1. Unfortunately I don't understand the problem well enough yet to give a workaround.

Worst case, you can decrease the autosave time. It's set to 15 seconds in settings.py.
Yea i have the same bug it crashes about every 5 minutes with an out of memory error

All right, there was a memory leak in the pygame 1.9.2 development build. I asked about it on the pygame mailing list, and apparently it's been fixed as of revision 7866ddf0ec0d. If you were using 1.9.2 and were getting a memory leak, update to the latest pygame revision and try it again.

If you're still getting a memory leak, I can't reproduce it myself. I'd be happy to sit down with anyone and try to work out the cause, but it will probably be a slow process. Please let me know if you have a couple of hours to spare for this, and I'd be happy to work with you.
Its not really a problem because of the autosave
Also i am on version
'1.9.1release-svn2575'
according to pygame.version.ver