Thanks to visit codestin.com
Credit goes to medium.com

Sitemap
CodeX

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

Creating & loading custom data in Godot/C#

Let’s create our own resource types to improve our tower defense game!

12 min readJan 4, 2023

--

Press enter or click to view image in full size

A few weeks ago, I discussed the fundamentals of creating a 2D tower defense game in Godot and C#. We saw how to setup a basic top-down scene with ships popping regularly from one side, which move along a given path to reach the other end, and with a simple UI to create towers to stop them.

Press enter or click to view image in full size

In this episode, however, we intentionally stuck with hardcoded data, because I wanted to focus on the logic itself. This means that this first version only had one type of ship, and one type of tower…

… which is pretty boring, right?

Indeed, it would be better to design some tools to easily define other types of enemies or buildings, ideally so that they are also tweakable by non-dev game designers ;)

So, today, let’s see how we can do this in Godot and C#, and create our own node types thanks to the Resource class!

This tutorial is available in video or text format — see below for the text version :)

--

--

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 :)

No responses yet