logo enkisoftware
Independent game developer making AVOYD
en  fr

Player-deployable turrets in Avoyd

Juliette Foucaut - 26 Jan 2019


We've released a new version of Avoyd, 0.3.4 (download link). The main addition is turrets, which can be seen in action in a short video.

We've also fixed some visual bugs as well as a problem with the collision system which made it difficult to hit targets (details in the changelog). In this post we'll talk a bit more about the in-game user interface and how the turrets work.

In-game screenshot of Avoyd showing turrets scanning space for enemy drones

In-game building progress

But first a word about what's not yet released: the in-game building tool. We decided to delay it as we felt it needed more work. Most of the progress is hidden but some of the changes we've made in preparation for it are visible in 0.3.4: a 'Max' tool in the Voxel Editor and the in-game tool selector.

Tool selector

Players will notice a new HUD (head-up display) at the bottom of the screen consisting of four boxes. Each corresponds to an in-game tool they can select using their keyboard (those selection numbers may change):

  • '1' is for the weapon tool
  • '2' and '3' are currently deactivated. They're reserved for building.
  • '4' is for spawning turrets

The symbol in the crosshair at the center of the screen changes according to the tool selected.

Screenshot of Avoyd showing the in-game HUD selection tool and different crosshairs for firing and spawning turrets

Turrets properties and how to deploy them

To spawn a turret, players select '4' on the keyboard, then click with the mouse. The turret will appear in front of them.

In-game screenshot of Avoyd showing a turret deployed by a player

  • Turrets can be deployed on surfaces and in space. They don't change position even when the terrain is destroyed around them.
  • Turrets are very strong and have a higher firing rate than the flying drones. They're susceptible to friendly fire.
  • Players can spawn up to four turrets, with a cooldown between spawns.
    • The number of turrets available to spawn is shown at the bottom of the turrets tool box. The counter decreases each time a turret is deployed. When a turret is destroyed the count goes up by one.
    • Once the max number of turrets is reached the cooldown lengthens and the next spawn replaces the first turret deployed and so-on.
    • The turret cooldown is shown as a small progress bar at the bottom of the turret tool box. The crosshair symbol also becomes darker during cooldown to remind players they have to wait before they can spawn the next turret.

Screenshot of Avoyd showing the in-game HUD tool selector progress bar and dimmed crosshair symbol during turret cooldown

Turrets AI, networking and HUD tech

Turrets use a similar very basic AI system to the other drones in the game, except without any movement. The turrets randomly pick a potential target which is in view, and in range to fire at. If they can't they spin around looking for one whilst avoiding looking at the ground.

The spawning of turrets uses a new 'ToolSpawnSystem' (Avoyd uses a component system approach), and on the client this sends a spawn request message which is processed on the server. Avoyd uses messaging internally, so a stand alone client or a client which is also acting as a server also uses the same system. Clients track the number of requests they've made to prevent superfluous messages, and reliable messaging is used. The server sends a message back to the client to inform them which entity their spawned turret is for book keeping and eventually permitting more refined client side control over their turrets along with better turret information displays.

The in-game HUD uses NanoVG with a very light C++ wrapper so we can use our own math primitives. Whilst we use dear imgui for the rest of the UI, NanoVG is better for animated content and the lack of automatic layout and input handling isn't an issue for HUD elements.

In-game screenshot of Avoyd showing turrets firing at an enemy drone

Conclusion

Eventually turrets will tie into the other build and resource features of the game, but they already offer a significant upgrade. Playing with turrets in the game opens up a surprising number of tactical choices and we think it substantially increases the fun of playing.

 › 2023
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
 › 2022
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
 › 2021
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › 2020
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › 2019
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › 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
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › 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++
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › 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
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Boxes in Space: procedural generation of abstract worlds in 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