Werewolf -- medium rare

At least, it's certainly not well done. The team was diminished this time (Daniel on vacation), and while I hacked something together, time was a huge problem, and it shows. The result is missing tons of fairly important features (e.g. passable art, interesting puzzles, a title screen/menu, music, ...). And all this despite having a fairly good idea of what the game was supposed to be before the last day, which is a first!

Still, it is playable, barely. :) You're a hungry werewolf, transformed by the full moon, and you need to find something to eat back and then sneak back to your house without being discovered. The villagers apparently never sleep, so stick to the shadows, and watch the shadows shift as the moon circles the sky (wait, that's not how astronomy works? oh well...).

The underlying engine is actually in fairly good shape, so with the right art, models, and level design I think this could've turned out pretty nice. Other things that were planned were patrolling guards (with torches), a level with two moons (will be tricky to stick to the shadows here), being chased by and having to evade guards rather than instantly being caught on discovery, voice acting for the werewolf, a nifty title screen, music (composed, but not recorded, no time; will save it for some other game), etc.

(log in to comment)

Comments

Great news, I was hoping you would make something! It doesn't work for me though:

  File "level.py", line 39, in __init__
    raw_heightmap = pygame.image.tostring(surface, 'P', 1)
ValueError: Can only create "P" format data with 8bit Surfaces

I'll try to find a fix tomorrow.
Blah. If you just load up python and do a pygame.image.load('data/c0/height.png') (or 'c1', if it fails on the second level), what does it say? It should be "<Surface(1024x1024x8 SW)>", but I guess it's ending up as either x32 RGBA or some palette thing. pygame was giving me trouble properly loading grayscale .png:s for a while, but I thought I had fixed that. :(

Anyway, if it's turning it into 32-bit RGBA, the fix would be to change that line to something like (untested):

      raw_heightmap = pygame.image.tostring(surface, 'RGBA', 1)
      raw_heightmap = raw_heightmap[::4]
pygame.image.tostring(surface, 'RGB', 1)[::3] possibly works. The game starts and shadows and collision look right.

It's pretty hard to play because the werewolf is invisible. I wonder what's up with that.
Thanks! Yes, it's <Surface(1024x1024x32 SW)>. Any tips for the werewolf sprite? Looks like it may be under the ground. If I remove the ground and switch glClearColor to white, I see a flickering little creature crawling around :). No trace of it when the ground is enabled though.
Well, it's supposed to be fairly dark, but the eyes should be visible. Is it completely gone?
Anyway, could try doing without the blending between frames: game.py line 47, ditch the for loop, set b to 1, t to self.frame_ids[self.current_frame], z to 0.5 (can also try setting that higher, but if you have even 10 bits of depth buffer it should be fine at the default value).
Yeah, looks like the werewolf is hovering 0.5-0.6 above the ground, with a depth buffer about 700 deep. My video card apparently thinks that's as good as below ground. Lifting it to 100-110 fixed the issue. I'm flying!
Wow, 8-bit depth buffers. What is this, a graphics card for ants? :)  Could also try throwing in a pygame.display.gl_set_attribute(GL_DEPTH_SIZE, 16) before pygame.display.set_mode in run_game.py, then.

(In theory, we'd make notes of these things, or remember them from previous pyweeks...)
"That's a funny looking dog..." Awesome voice acting! I got pretty good times on my first run through, but I have of course disabled dying. I'll try again without that tomorrow.
:D

There was going to be voice acting for the werewolf, but I ran out of time. :(
Setting DEPTH_SIZE to 16 did not help. gl_get_attribute says I get that by default. But setting it to 32 does fix the issue.
Weird. With the clipping planes at 1 and 704, 16-bits of depth buffer should give a resolution of ~0.01, plenty for a 0.5 difference.