Bits of Eight
Arr, seek yer fortune on the high seas! Plunder ships for booty!
Ratings (show detail)
Arr, we sent him to Davy Jones' locker!
Bits o' Eight 1.0.0
Mobile control screen
Chasing in circles
A calm sea
A much more exciting broadside
Beat to quarters, men! Arr.
Arr, we be under attack from purple blobs
I'll send ye ta Davey Jones' locker, ya scurvy dog!
Sail on the horizon, cap'n!
Our first pirate ship
Bits of Eight - Day 1
We came out of theme voting with an idea about circuit boards, but a lengthy discussion on Google Hangouts lead us to attempting a piratical adventure we're calling "Bits of Eight" (like Pieces of Eight, get it?)
We have a few bits and pieces to show already, including a first render of the pirate ship (which bobs to and fro in the water):
We are hoping to integrate the luscious ocean water implementation from here (and that it will be performant enough).
Meanwhile we're working on the more detailed mechanics which will involve resource management within your ship. This is the schematic view (drawn to match the Blender model):
Bits of Eight - Day 2
Bits of Eight - Day 3
This evening I spent a few hours trying to fix shader bugs in wasabi-scenegraph. The lighting model was pretty much unmodified from the hastily crafted shaders from the Pyweek 16 entry, with a hasty attempt at specular lighting added on that turns out to be quite buggy. With these bugs fixed objects in the game can be properly glossy. Naturally I'll merge this work back into wasabi-scenegraph after the competition so that everyone can use it next time around. The shader work sucked up a lot of time but I think I understand it better and better the more time I spend on it.
For example, it didn't take long to change the properties of the sail material so that light is transmitted through the sail cloth, so sails now receive diffuse illumination from the reverse.
Our Pyweek 16 and 17 entries depended on Lepton and in both competitions I've found and fixed 64-bit bugs that have made it unusable when compiled on 64-bit architectures. We have a number of different use cases for particle effects in Bits of Eight that will require lepton again. As a C extension, it has always been problematic for users to install. Our "spectator" team member Sal has stepped up to package my 64-bit compatible branch of lepton: the hope is you'll be able to find a suitable binary distribution for various platforms on the PyPI page.
With lepton in hand, I've used it to create wake and bow wave particle effects, so that at last you can see your ship moving:
We still don't have a complete combat model, but the graphics engine is now looking pretty solid.
Bits of Eight - Day 4
I spent most of this evening working on the collision detection for our game. Cannonballs can now hit, and the ships can crash into each other. This was all done with spherical collision volumes because the maths is easy and relatively fast. I did this in TDD style with nosetests, which may have saved hours of debugging.
There was only one problem with integrating the physics, which was to do with using a simple translate rather than a matrix transform. To help debug it I made the engine draw the collision volumes... with full lighting, of course:
I also split the model into pieces, which allows the sails to adjust to the wind direction (and also swap out for reefed sails etc):
This actually results in rather more draw calls and material swaps so performance has dropped off a bit. I've started looking for improvements in the renderer eg. grouping by material, but for now it's time to turn in for the night.
Bits of Eight - Day 5
I started this evening by tuning the sailing physics so that heeling works more or less right, and the sail power varies by different points of sail. I like it, but it's rather hard from a combat perspective, because when you're heeled over your guns shoot up into the air at a preposterous angle, or down into the water. I like the sailing physics but it might need some tweaking to make it fun.
The rest of the evening I spent on particle effects, like gunsmoke and shrapnel, which looked pretty good until I remembered that like the key feature of wasabi-scenegraph is the per-pixel lighting, so I added muzzle flash and was completely overawed by how beautiful the results came out.
Adding textures to the ships was actually only a 10 minute job with Blender, now I know how to do it:
Finally I did some massive hackery to create the normal-mapped water we've been dreaming about since day 1:
Tomorrow night is the last night I can spend on Pyweek (though other team members should be around on Saturday), so I'm hoping to finally tune the combat model so we have a game.
Bits of Eight - Day 6
Just a quick update, since I'm so tired. I can't be around tomorrow so I'm wrapping up Pyweek tonight. The rest of my team will carry on.
Tonight I added the rest of the combat mechanics and a basic AI. I made painful progess in spite of having written a few tests: the ships are so slow it's really time consuming to assess whether they are doing the right thing. I found it useful to view the action from high up above:
Meanwhile Arnav was working on the control scheme, which is via a WebSocket server that you access on your mobile device. It doesn't have all the features we dreamed up on day 1, but the concept is there. You can issue orders and see stats (well, one stat, the angle of the wind direction to your ship). This is it running on my Nexus 7:
I hope the team has a good day tomorrow and polishes up some of the rough edges. I'll catch you all in the judging!