Independent game developers - making Avoyd


Support our work and posts like these through our Patreon

In-game building

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:

  • We've kept shapes basic: blocks in 3 sizes (1x, 3x, 5x), and 3x3x1 walls in all three planes.
  • Building progressively adds material over a couple of seconds until the voxels are full, deleting does the reverse.
  • Only one material is available: a hard 'ceramic'.
  • There's no limit to the amount of building you can do.

To build, ensure you have the latest version installed (download). Start the game. Select the tool: '2' for blocks, '3' for walls, and use:

  • left-mouse to add material,
  • right-mouse to remove.
  • Use the mouse wheel to bring the cursor closer to or further from you.
  • Press the tool number (e.g. '2' '2' '2') repeatedly to cycle between block sizes or wall orientations.

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.

Other updates

(All updates for Avoyd version 0.4.0 are listed in the change log.)

  • If you have an NVIDIA graphics card, you may have noticed glitches in the sky and environment when looking around. We've hopefully fixed that bug but it would be great if you could give us a shout if you notice graphical oddities in version 0.4.0.
  • We've tweaked the procedurally generated terrain (linked boxes) to show the various hardnesses of materials better.
  • We've replaced the player avatar with a more interesting model than a green sphere. It's visible in multiplayer or from the back when you pick the 3rd person view (press 'F1' in-game), and in the screenshots below (front view):

Avoyd in-game building tool with some built structures and bridges, new player avatar and turrets in Avoyd's procedural environment

Close-up of the new player avatar and built wall in Avoyd

Audio progress

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.

Support our work and posts like these through our Patreon

 › 2019
 › Procedural python word generator: making user names out of 4 syllables
 ›› In-game building 
 › Player-deployable turrets in Avoyd
 › 2018
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
 › 2017
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
 › 2016
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
 › 2015
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Feral Vector
 › Normal generation in the pixel shader
 › 2014
 › Python Google App Engine debugging with PyCharm CE
 › Lighting voxel octrees and procedural texturing
 › Patterns and spheres
 › Python Google App Engine debugging with PyTools
 › Interview
 › Domain masking using Google App Engine
 › Octree streaming - part 4
 › Black triangles and nervous_testpilot
 › Presskit for Google App Engine
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
 › 2013
 › LAN discovery with multiple adapters
 › Playing with material worlds
 › Developer Diary archive
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Implementing a static website in Google App Engine
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
 › 2002
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
 › 2001
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready
 › Game Tech
 › Procedural python word generator: making user names out of 4 syllables
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Normal generation in the pixel shader
 › Lighting voxel octrees and procedural texturing
 › Octree streaming - part 4
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
 › LAN discovery with multiple adapters
 › enkiTS
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › RCC++
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Web Tech
 › Procedural python word generator: making user names out of 4 syllables
 › Python Google App Engine debugging with PyCharm CE
 › Python Google App Engine debugging with PyTools
 › Domain masking using Google App Engine
 › Presskit for Google App Engine
 › Implementing a static website in Google App Engine
 › Avoyd
 ›› In-game building 
 › Player-deployable turrets in Avoyd
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
 › Feral Vector
 › Patterns and spheres
 › Interview
 › Black triangles and nervous_testpilot
 › Playing with material worlds
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
 › Avoyd 1999
 › Developer Diary archive
 › Back in 1999
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready