{"id":6531,"date":"2025-11-29T15:39:39","date_gmt":"2025-11-29T06:39:39","guid":{"rendered":"https:\/\/blog.criware.com\/?p=6531"},"modified":"2025-11-29T17:53:56","modified_gmt":"2025-11-29T08:53:56","slug":"implementing-a-laser-turret","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2025\/11\/29\/implementing-a-laser-turret\/","title":{"rendered":"Implementing a Laser Turret"},"content":{"rendered":"<p>In this post, we will implement the sound of a turret that fires a destructive laser beam. The sound effect will start with high-impact sounds for the initial energy burst, followed by the continuous sound of the beam. Once the laser beam is stopped in the game, whooshes will be played, adding a convincing tail to the audio of our laser turret.<br \/>\nTo achieve this, we will mainly rely on <em>Polyphonic Cues<\/em>, an <em>On Stop Action<\/em>, and the <em>Envelope Generator<\/em>. You can hear the final result below.<\/p>\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-6531-1\" width=\"640\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/video-1.mp4?_=1\" \/><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/video-1.mp4\">https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/video-1.mp4<\/a><\/video><\/div>\n<p>&nbsp;<\/p>\n<p>For the asset creation, we recorded some synth patches for the laser beam, along with some impacts and sci-fi whooshes for the leading\/ending parts of our sound. These were designed separately, knowing that they would be played by different Cues.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-1-1.png\" alt=\"\" width=\"630\" height=\"461\" class=\"alignnone size-full wp-image-6532\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-1-1.png 1260w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-1-1-300x220.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-1-1-1024x750.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-1-1-768x563.png 768w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/p>\n<p>After importing our wave files as Materials in AtomCraft, we made sure to set the <em>Override Loop Information<\/em> option for the files corresponding to the beam sound, to ensure they loop correctly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-2-1.png\" alt=\"\" width=\"951\" height=\"329\" class=\"alignnone size-full wp-image-6533\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-2-1.png 1903w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-2-1-300x104.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-2-1-1024x355.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-2-1-768x266.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-2-1-1536x532.png 1536w\" sizes=\"auto, (max-width: 951px) 100vw, 951px\" \/><\/p>\n<p>We created a <em>Polyphonic Cue<\/em> called <strong>laser_start<\/strong>, on which we dropped the three impactful sound effects that will play simultaneously when the laser turret is first fired. It is recommended that you adjust the volume of each track to your liking and add fade-outs for a smoother result.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-3.png\" alt=\"\" width=\"836\" height=\"433\" class=\"alignnone size-full wp-image-6534\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-3.png 1672w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-3-300x155.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-3-1024x530.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-3-768x398.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-3-1536x796.png 1536w\" sizes=\"auto, (max-width: 836px) 100vw, 836px\" \/><\/p>\n<p>We also created Polyphonic Cues for the body of the sound (<strong>laser_loop<\/strong>), and its tail (<strong>laser_end<\/strong>).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-4-1.png\" alt=\"\" width=\"841\" height=\"289\" class=\"alignnone size-full wp-image-6536\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-5-1.png\" alt=\"\" width=\"833\" height=\"346\" class=\"alignnone size-full wp-image-6535\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-5-1.png 1667w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-5-1-300x125.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-5-1-1024x425.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-5-1-768x319.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-5-1-1536x638.png 1536w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/p>\n<p>On the 3 tracks that compose the <strong>laser_loop<\/strong> <em>Polyphonic Cue<\/em> (i.e., the looping beam), we added a 1800 ms release in the <em>Envelope Generator<\/em> (EG). Therefore, the loops will continue to play while fading-out over a duration of 1800 ms after the Cue has been stopped.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-6.png\" alt=\"\" width=\"777\" height=\"444\" class=\"alignnone size-full wp-image-6537\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-6.png 1554w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-6-300x171.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-6-1024x584.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-6-768x438.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-6-1536x877.png 1536w\" sizes=\"auto, (max-width: 777px) 100vw, 777px\" \/><\/p>\n<p>In the Cue properties, we added an <em>On Stop Action<\/em>, set it to <em>Play<\/em>, and assigned the <strong>laser_end<\/strong> Cue. This means that each time the <strong>laser_loop<\/strong> Cue is stopped, it will trigger the <strong>laser_end<\/strong> Cue while the <em>Envelope Generator<\/em> fades it out.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-7.png\" alt=\"\" width=\"777\" height=\"467\" class=\"alignnone size-full wp-image-6539\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-7.png 1553w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-7-300x180.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-7-1024x616.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-7-768x462.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-7-1536x924.png 1536w\" sizes=\"auto, (max-width: 777px) 100vw, 777px\" \/><\/p>\n<p>It is time to bring all the pieces together.  We create our main <em>Polyphonic Cue<\/em> called <strong>laser_main<\/strong>. This will be the Cue started and stopped from the game code. It will reference the <strong>laser_start<\/strong> and <strong>laser_loop<\/strong> Cues, the latest triggering the <strong>laser_stop<\/strong> Cue. We position the <strong>laser_loop<\/strong> Cue on the timeline with a short delay, in order to let the turret\u2019s startup energy reach full power.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-8.png\" alt=\"\" width=\"954\" height=\"378\" class=\"alignnone size-full wp-image-6538\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-8.png 1908w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-8-300x119.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-8-1024x406.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-8-768x304.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/11\/screen-8-1536x609.png 1536w\" sizes=\"auto, (max-width: 954px) 100vw, 954px\" \/><\/p>\n<p>We now have our complete audio system for this laser turret. Since only the <strong>laser_main<\/strong> Cue should be visible from the game code, we can mark the other Cues as <em>Private<\/em>. Their IDs will not be exported and they will stay invisible to the programmers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, we will implement the sound of a turret that fires a destructive laser beam. The sound effect<\/p>\n","protected":false},"author":2,"featured_media":6552,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5],"tags":[],"class_list":["post-6531","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adx"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/6531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/comments?post=6531"}],"version-history":[{"count":13,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/6531\/revisions"}],"predecessor-version":[{"id":6556,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/6531\/revisions\/6556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/6552"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=6531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=6531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=6531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}