Day 1
I felt so confident "Ripples" would win I was ill-prepared for "6", with only a few fragmentary ideas. It was actually pretty close between the top 4 themes, so turns out I suck at predicting.
I wanted to play with ripples and watery effects anyway, so I've themed my mechanic for "6" with some watery effects.
Here's roughly what I achieved today:
- Got out of bed, dozy, struggling to remember how to program
- Make a sprite appear on the screen and move around in a hexagonal pattern
- Integrated Chipmunk, added platforms
- Added water - initially just a line strip. Spent maybe 4 hours making the ripples look Ok. They pretty much worked in the first numpy code I wrote but getting the wave propagation smooth and stable took a lot of tuning.
- Added flies, and an animation tongue that flicks out to grab them. Easy, done in half an hour.
- Fought a performance problem. In the end, I think I'm misunderstanding pyglet.clock.schedule_interval() somehow. Scheduling more things makes the game start to jitter. Switched to updating everything from a single update() function.
- Attempted to do refractive water. Because this is PyWeek and it's "from scratch" I couldn't use the FBO stuff I wrote during PyWeek 24 because I don't think I've ever turned it into a library. I thought I would give ModernGL a try. Turns out this is a huge pain. The docs have gaps and out of date references, and the whole library very low level, and doesn't co-exist too happily with Pyglet's nice high-level abstractions. In the end I got it to work through poring over the docs, reading the code, perseverance, copying the examples, and trial and error. The shader was easy to get working once I got the VAO/VBO/FBO nightmare tamed.
So, it feels like good progress. I've got most of what I need by way of engine. I should try to create some levels next and try out the gameplay, but honestly I'll probably continue making it prettier first.