Juliette Foucaut - Doug Binks - 25 Mar 2019
In-game building is finally here. It's taken us a lot of time to refine and the result seems pretty simple, but we went through a number of iterations for getting in game building working fluidly and intuitively in six degrees of freedom - how do you build a 'floor' when rolling around in space?
Taking the floor example, we started with detecting which surface was currently the player's 'floor'. We then used ray casts to find how far the 'floor' was below the player. When the player held down the build button we clamped the floor axis so they could move around freely whilst building on that plane. When this worked well it was wonderfully easy, but there were a lot of edge cases. For instance when the player was on a corner the auto floor axis detection would flicker between one axis and another. We fixed this by adding some hysteresis. This removed the oscillations, but we still found it hard to use under some circumstances.
In the end we dropped the clever auto-axis detection code we'd been working on in favour of a simple axis select for the floor/wall tool. We kept the 'clamped axis' approach where once a player starts building, the axis perpendicular to the surface they're building is locked. The other build tool, 'Blocks', doesn't lock the axis (it uses symmetrical blocks) which enables more freeform building.
In summary, for now the build system works as follows:
To build, ensure you have the latest version installed (download). Start the game. Select the tool: '2' for blocks, '3' for walls, and use:
Eventually we plan to add more materials along with some form of resource management for building, and evolve the gameplay to make building a more integral part.
(All updates for Avoyd version 0.4.0 are listed in the changelog.)
We started working on in-game audio using the open-source library SoLoud. We have some pretty atmospheric rumbles for the drones, which improves gameplay immensely as now you can hear them searching for you.
Playing with audio has also led to amusing results, such as the accidental purring turrets (a.k.a. purrets, thank you reddit) which we're thinking of keeping. You can hear them in action in this video:
Video recorded in-game at low resolution (1280x720). It features the player setting turrets and turrets scanning the environment and shooting at enemy drones. The shooting sound is extracted from the original Avoyd (1999). The purring sound was supposed to be a looping intermittent beep (two sets of descending square waves) which was accidentally slowed down programmatically and ended up sounding like a cat purring.Whilst working on audio we've encountered some minor technical difficulties such as clipping issues when there are many entities around however, so we decided to postpone releasing the audio until we've resolved these.