Sitemap
CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Follow publication

Member-only story

Godot 1–01: Spawning 2D Enemy Waves (Godot 4/C#)

19 min readOct 23, 2024

--

Image made by AI

Have you ever wondered how all those nice tower defense game create massive waves of enemies for your towers to deal with? Well, today, we’re going to discover how easy it is to code in Godot 4 and C#!

In this tutorial, we’re going to see how to spawn enemies at regular intervals according to some pre-determined list, how to make them walk along a simple top-down path, and how to check if the wave has ended.

So by the end of this article, you should have all you need to setup a basic tower defense game prototype ;)

As usual, since we’ll be coding our logic in C#, make sure that you have a version of Godot with .NET enabled:

Download a version of Godot with .NET support, to be able to program in C#! :)

And of course, don’t forget that you can get the demo scene and all the assets from this demo on my Github 🚀 with all my other Godot tutorials :)

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Mina Pêcheux
Mina Pêcheux

Written by Mina Pêcheux

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)