Ben's blog
Software development, games, and all that jazz
Home
Archive
Posts
Pages
Search:
Edit Post
Title:
Body:
<p>The little cuboid people can now trip over if staying upright is getting too tough for them. I had to do some proper maths-y stuff to get it working, which flummoxed me for a while - who would have thought that the maths I learnt at uni would ever be needed in real life?? I needed something that would allow a continuous random chance of something happening based on some measure of 'continuous probability'. Turns out a <a href="http://en.wikipedia.org/wiki/Poisson_process">Poisson process</a> is ideal for this, and though the equations look scary I realised that they can be simplified greatly in some cases, including mine.</p> <p>So, when the island is tilting a lot, people trip up and fall off more often, which is nice (for me, not for them). It looks slightly funny at the moment since it's only taking into account the island's tilt, and not the gradient of the terrain each person is on or their proximity to the tilting edge, which would make things look cooler. That's on my to-do list, but it's not terribly important right now.</p> <p>Also, I've made the people wander a bit more interestingly - they walk (glide) across the island and turn around when they meet a building or an edge, rather than vibrating about. It's looking good. I'll probably put together a video once I've done a few more of these tasks I've got scribbled on my notepad.</p> <p>Next on my list is getting buildings to detach properly. Currently they never get detached, and it looks like OPAL isn't going to be smart enough to do this in a physically-based manner (accumulating joint damage, for example), so I'll do it in a similar way to how it's done for people. For now it's the mechanic that counts, not how good it looks or how smug it makes me feel as a software engineer.</p> <p>That's it for today though, I need to clean the flat before my better half gets back, else she'll beat me or refuse to make me lunch or <em>worse</em>.</p>
Tags:
cities-in-the-sky
Body markup:
Plain Text
Textile
HTML
Markdown
ReStructuredText
Draft: