It is my privilege to welcome my first contributor to the website, William Allen aka 7thSage!
What & Why
Hi, I’m William Allen aka 7thSage, you may notice I’m not the regular author here, though you may have seen me in the comment section here and on the forum, commenting on tweaks or fixes in the Tactics tutorial here on the site. Like many people, I’ve recently been looking at other engines for ‘reasons’ and have been checking out Godot. For the past couple weeks I’ve been learning some of the ins and outs of the engine, and getting a feel for how it compares to Unity. In a lot of ways, the engines have a lot of similarities, but they also have a lot of differences.
So what brings me here? Well in my process of learning Godot, I’ve begun converting the Unity Tactics RPG Tutorial from this site. I’ll be documenting the full journey here for anyone who wants to follow along, whether you’ve gone through the original tutorial or not. My initial idea was to keep my progress posted on the forum, but Jon asked if I would like to post up something here instead. So until he kicks me out, I’ll be doing my best at documenting and explaining the steps along the way.
My goal is to faithfully reproduce as much of the original tutorial as possible. Though there will be some small tweaks and fixes, and with any luck, not too many new bugs. I’m still relatively early in the project, but so far technically speaking everything seems doable.
About Me
Who am I? I’m a hobbyist 3d Artist and Programmer. I’ve been in love with Tactics/Strategy RPGs since Shining Force 2 came out on the Sega Genesis. I played a ton of Final Fantasy Tactics and have a few copies floating around, though my favorite is still the original Playstation version. Even though the new translation may be a bit more easily understood, the fake Shakespearian dialog grates on my nerves like nails on a chalkboard.
I’ve been dabbling at creating my own game for ages, starting with RPG maker back when the only english version was not officially available. From there I used Sphere, an open source 2d Engine that scripted in javascript. Jumping to 3d I went into the deep end and used Ogre3d for a while using C++. After not having much luck getting lighting and shadows to play nicely, I moved on to Unreal/Unity. I liked that Unreal used C++, but my video card(which was probably more to blame with my shadow issues in Ogre than it was) also did not play nicely with Unreal. It was too old and slow and didn’t like all the fancy graphics. While Unity might not be as efficient, it played better with my system, and I found this really nice tutorial for a tactics game on theliquidfire.com, who knows what that site is.
As for Unity. My hackles were raised when they merged with Iron Source. Around that time is when I first heard about Godot. I knew a lot of people that switched then, but I still held out. I was on edge though, and it didn’t help that when they send out an email talking about new exciting features, its for the gambling side. So I’ll hang out in Godot for at least a while.
Artistically I’m much like I am with programming. I like to dabble and tinker and probably spend too much time building off other people’s projects instead of working on my own, but that’s not likely to end anytime soon. I primarily focus on Hand Painted Stylized artwork, and have been starting to get into sculpting lately.
If you’d like to find me around the web or support me in some way here are the main places I’m at & I’ll be creating a video version of this series as well, so be on the look out for that on youtube.
- https://twitter.com/7thsage
- https://opengameart.org/users/shadowfeign
- https://www.youtube.com/@digitalworkbench
- https://ko-fi.com/7thsage
- https://www.patreon.com/7thSage
Prerequisites
Some knowledge of code is definitely going to help here. I’ll be writing most code in Godot’s Gdscript, so familiarity with that or Python will help. Godot does also have some support for C# and we may need to jump back and forth between the two to gain performance in certain areas. Gdscript is tied closer to the engine, so I’ll focus on that for the most part though.
Downloading & Running
I am using Godot 4.x for this tutorial. You can download Godot here – https://godotengine.org/ Click the link to Download the 4.x version(at the time of writing that is 4.1.3) From there you will be presented with two options “Godot Engine” and “Godot Engine -.NET”
The .NET part is what allows us to use C# so I would suggest going that route, although it is up to you as I’ll be working hard on making everything possible with Gdscript alone(as long as performance allows it). Do note that if you do choose the .NET version, you’ll be asked to download .NET from the Microsoft website if you don’t already have that version from some other software installed.
Once downloaded you’ll notice that there is no installer for the engine. Unzip the folder and click on the program .exe(it should be something like “Godot_v4.1.3-stable_mono_win64.exe”) to start it. Move the folder someplace safe, and if you’re on Windows, you can right click on the file and pin it to someplace such as the start menu, or the taskbar.
Project Setup
Open Godot and click on the New Project button. A bit of a quirk, when choosing the project name and directory, the directory needs to include the folder you want for your project. So just be warned, it doesn’t automatically create a folder based on your project name. You can click the “Create Folder” to have it create a folder with the project name in the directory you have selected though. It’s also using its own file browser, so you won’t have access to any bookmarked directories.
For Renderer, I chose Forward+ because I think it is somewhere between URP and HDRP. We’re not really doing anything with shaders or post processing in the tutorial, so depending on where you want to take the tutorial later, its really up to you which you choose.
Choosing .git under Version Control Metadata will add a .gitignore file to your project. If you aren’t using git you can select none, though I do highly recommend using some sort of version control for your projects.
Folder Setup
I’m gonna keep folder organization pretty close to the original. As Jon said, keeping organized is important, especially for a large project like this. One small difference we’ll be using here is that instead of an “Editor” folder, we’ll be using “addons”, as this is the default editor plugin directory for Godot. We’re also not bound to using the Resources folder like we are in Unity, so I’m going to use the folder “Data” instead since that makes more sense to me. Resources just feels like it should be things like 3d Models and Textures, but if you want to stick with the original, that’s fine.
To create a folder right-click inside the FileSystem pane and select New Folder and add these folders
- addons
- Materials
- Prefabs
- Data
- Scenes
- Scripts
- Settings
- Textures
We’ll add a few more folders inside these as we continue the project.
A couple quick notes. The “res://” folder in the FileSystem pane is the root of your project folder. The FileSystem pane will ignore any files that are not file types that Godot recognizes. For instance it does not see the project file, or the .gitignore file or the .godot folder. It appears that any folder with a “.” at the beginning will be ignored(only folders though, recognized file types are fine starting with a “.”)
Import Assets
For this part we’ll be mostly using the assets from the original tutorial, although we won’t be able to use the animation scripts, but we’ll leave that for later in the project.
The first thing to download will be the sprites and textures from the original tutorial. Luckily it was not created as a unity package, so we’ll be able to use it without much work. 02_TacticsRPG_Textures.zip
Unzip the folder and move Dirt.png into the Textures folder. Create a folder inside the Textures folder called “UI” and move the rest of the files from the zip into that.
If you attempt to drag from the zip file directly, Godot will not move the files into the folder.
Next, lets replace the default Godot icon for our project. Download Icon.svg and replace the original file with it. This is a resized and scaled version from this CC0 art set from OpenGameArt.org https://opengameart.org/content/characters-11
Create Materials
As with the animation scripts, I’ll put off slicing the sprites until we need it for the UI portion. For now, we’ll create the textures for the 3d objects.
We’ll start with the Dirt texture. Right-click on the Materials folder and choose Create New -> Resource. In the search field type in Material and choose StandardMaterial3D. Click create at the bottom and give it the name “Dirt.tres”.
There are a couple settings we need to change. Under Albedo there is a field for texture. Click that and select load and locate the Dirt.png texture in the file browser. Under UV1 we need to set the scaling. In Unity the basic cube uses the same texture for all faces, but in Godot each face is unique, so to tile the texture so the complete texture is on each face, set the U,V, and W values to 3, 2 and 1 respectively. You will need to click the chain icon to allow non-uniform scaling. The last value we need to change is the roughness to 1(the opposite of the Unity tutorial where we set smoothness to 0)
In the Inspector where we are editing the material, there is a save icon at the top. You can either click that, or once you are done editing all textures, you can click save scene in the Scene menu and it will save any unsaved materials.
Next are the two materials for the hero and enemy units. These ones don’t need any scaling. Create one naming it “Ally.tres” and give it a green color on the Albedo such as RGB{86,200,88} Hex#{56c858} and I think a roughness of around .5 looks similar to the original. For the next name it “Enemy.tres” and give it red color on the Albedo such as RGB{183,43,61} Hex#{b72b3d}
Both the Allies and Enemies will use the same texture for the eyes. Create a texture for them naming it “Eyes.tres” and we’ll leave it a white color RGB{255,255,255} Hex#{ffffff}
The last material is for the selection indicator. Create a new material and name it “Selection.tres” and to give it a yellow color we’ll set the Albedo to something like RGB{255,255,0} Hex#{ffff00}
Save any unsaved materials.
Create Objects
The last thing left for now is to create the prefabs we’ll be using. Here is an area where Godot differs a little bit. In Godot everything is basically a node, even scenes are a node. In fact, for object prefabs, what we’ll be creating are scenes that we’ll instantiate nested into our main scene.
So let’s create the first one. Right-click on the Prefabs folder and Create New -> Scene and for Root Type select 3D Scene and give it a name “Tile” and select .tscn in the dropdown for type. In the Scene panel right-click on the Tile node and click Add Child Node. Type in mesh in the search and select MeshInstance3D. In the Inspector tab, under where it says MeshInstance3D, for the “Mesh” field, select New BoxMesh from the dropdown.
To add the material we can drag “Dirt.tres” from the FileSystem panel onto the object in the scene, or you can look at the mesh in the inspector, and under the Geometry field, find the field Material_Override and click on the dropdown and select Load. From there find the material “Dirt.tres”.
Save the Scene. Click on the menu option “Scene” at the top and select Save Scene.
Now the next few meshes require us building up several meshes and scaling and positioning them, and while these specific objects won’t be affected, its a good time to discuss the differences in Unity and Godot’s coordinate system. Both Unity and Godot are Y-Up systems, meaning our ground plane will still be on the X and Z axis. However Unity is a Left-handed coordinate system, and Godot is Right-handed. What this basically means is that the X axis is mirrored from unity. Since our objects are mirrored anyway, it won’t matter that we are doing the board in a different order. For the most part aside from +x going left instead of right, we won’t notice much difference in the project aside from a couple variables in the camera and input.
If you are curious why its called Left or Right Handed. Hold out your hands with your thumbs up. This is your up axis, in this case Y. The index finger points forward, that is your forward vector, in this case Z. The middle finger points in. That is our positive X vector.
Right-click on the Prefabs folder and create another scene. Name this one “Hero”. In the Scene tab right-click on the Hero node and add a new child node. Scroll to the top and choose the type Node3D. Right-click on the node and rename the new node “Jumper”.
Next add a new child node to Jumper. This will be the main body, give it a name something like “Body”. We won’t be referencing this directly in code, so the name here is more for organization. Search for mesh and again choose MeshInstance3D. This time in the inspector instead of choosing BoxMesh, under the category MeshInstance3D->Mesh choose “New SphereMesh” Scroll down in the inspector to the section that says “Node3D”. Expand the section that says “Transform” and change the Scale of the sphere to XYZ {0.8, 0.8, 0.8}. Like before under the Geometry field, find the field Material_Override and click on the dropdown and select Load. From there find the material “Ally.tres”.
Next create a child node of the body and name it “Eye”, for the type choose MeshInstance3D again, and in the Inspector under MeshInstance3D->Mesh choose “New SphereMesh” again. This time set the Scale to XYZ {0.25, 0.25, 0.25} and still in the Transform section, set the Position to XYZ {0.17, 0.32, 0.3}. Set the Material_Override to “Eyes.tres”. Once finished right-click on the Eye node and choose duplicate. Click on the new Eye and under Transform change the Position to XYZ {-0.17, 0.32, 0.3}. Save the Scene.
If you can’t see the character, click the 3D tab in the middle at the top.
Once the Scene is saved, right-click the “Hero.tscn” file in the Prefabs folder and select Duplicate. Give it the name “Monster.tscn” Open the new scene and select the body. Under Geometry->Material_Override load the material “Enemy.tres”. Save the Scene.
The last object we’ll make is the Tile Selection indicator. Create a new scene in Prefabs and name it “Tile Selection Indicator”. Create a new child node with the type “MeshInstance3D” and for the mesh type this time, We’ll choose BoxMesh again. Under Transform change the Scale of the box to XYZ{0.1, 0.1, 0.3}. Again, you’ll have to click the chain to allow non-uniform scaling. Give the Box the material “Selection.tres”. Don’t worry about setting the position or rotation, we’ll do that in the next step. Duplicate the box until you have 8 in total. Be sure you’ve set the material and scale before duplicating, otherwise you’ll have to set it on each individual box one at a time.
Use the following transform values for the boxes:
- Position{0.5, 0, 0.4}, Rotation{0, 0, 0}
- Position{0.4, 0, -0.5}, Rotation{0, 90, 0}
- Position{-0.5, 0, -0.4}, Rotation{0, 180, 0}
- Position{-0.4, 0, 0.5}, Rotation{0, 90, 0}
- Position{0.4, 0, 0.5}, Rotation{0, 90, 0}
- Position{0.5, 0, -0.4}, Rotation{0, 180, 0}
- Position{-0.4, 0, -0.5}, Rotation{0, 90, 0}
- Position{-0.5, 0, 0.4}, Rotation{0, 0, 0}
Save the Scene.
And that is it for this section. If you are using version control, be sure to commit the changes you’ve made.
I created a repository of the project on github in case you would like to compare your project with mine. I’ll try to keep it fairly in line with the structure of the original tutorial as well.
Summary
That’s all for this time. In this lesson we got Godot up and running and have set up the organization we’ll use to keep the project maintainable in the future. We’ve imported and created several assets that will be useful in the coming lessons. We’ve started to understand nodes a bit better, and in the next lesson we’ll start attaching scripts and see some more differences between Unity and Godot.
Whoa, this is super cool to see! Great work, y’all. The Liquid Fire Tactics tutorial is still my most linked Unity tutorial, and I feel like this will end up being an often linked Godot tutorial of mine.
If I can request a small point of interest for this tutorial as well. In the original tutorial, it was very cool to add monobehaviours to items (etc) to create amalgamations of effects – in fact, the system is built for essentially just that. Because this leads to creating interesting effects so easily within the editor that can then be saved as objects, it naturally leads to programmers, in their experimental expansions, to want to implement the ability to modify items at runtime. This, too, works great – until it’s time to save the object with the character, going in and serializing individual components. Adding runtime saving considerations could be a good addition for that section.
Looking forward to seeing (and doing) the Godot Tactics tutorial in full! This will help a lot of people (myself included, looking to dive deeper into Godot)
I’ll keep this in mind as I go forward. There are definitely some areas that I’ll expand a bit, but also some that I will simplify. And I’ll try to point out some areas where things could be added or tweaked. For the most part though the plan is to stick fairly close to the original. I’ll probably be pointing out the most stuff in the pathfinding section, since that’s the area I’ve spent the most time tweaking and getting to know in the original tutorial, but I’ll be looking at other areas too.
This is fantastic news! Having a quick read of this post, my background from a gaming perspective growing up was almost identical (although I was first introduced via Shining Force 1 rather than 2) I originally found this site a couple of years ago while looking for material to assist with making a tactics game that i’ve been planning for years.
I had been learning unity as a hobbyist for a couple of years producing some varied simple games, then had finally started to work on a tactics game. I had to take a break for a while due to work and just as I was about to come back to development, the latest unity news broke and I felt really disillusioned with the engine as a result.
I’ve moved over to start learning Godot (with C# rather than GDScript) over the last month and finding it really fun, but I’m not quite confident enough to tackle the re-creation of my tactics game to where I had got to in Unity. Seeing you posting this to run through the development of a tactics game in Godot is fantastic and super exciting for me to be able to run through alongside my other learning, no doubt it will be incredibly valuable for helping me get up to speed with things and feel confident in my own development.
I’m really looking forward to undertaking this and keeping an eye out for the parts that follow!
Yea, I’m hoping choosing GDScript doesn’t come to bite me, but so far it seems like it is working. I think the only reason I feel confident enough in this is that I’ve already spent a fair amount of time breaking down the original tutorial making tweaks. I wish I had started with the original. I only got to play it a little bit by renting it, and after playing the second, the invisible walls in the overworld made the game feel broken, and I spent way too long being stuck trying to figure out what to do to progress the story early on at one point as well. I didn’t manage to fully play it until much later on the GBA. We picked up Shining in the Darkness from a pawn shop on a whim hoping it might be related to Shining Force and got lucky. After that we went to playstation instead of saturn though, so missed most of the other early Shining games.
Omg, there’s no way!!
I started doing exactly that a few days ago!
Here’s my git as a proof of good faith!! https://github.com/Axelgoris99/TTRPG_Godot
Amazing, I’ll be keeping a close eye on this and if you ever want to speak about it for whatever reason, feel free to send me a text!
Thanks a lot 😀
Main difference being, I’m using C# for everything (and trust me, plugins in C# are a bit of a pain…)
But if you ever have an issue or whatever, just want to talk about it, really don’t hesitate!
(I was a Unity hobbyist but Godot is slowly getting Unity’s place in my heart!)
That’s really cool. It looks like we’re thinking the same way on a lot of parts. I see you went with Vector2i for the pos as well. I’ll have to keep an eye on your progress. If you want to see a rough draft of my gdscript, I’ve got the files for the board creator on the forum. Be careful on using resources for saving user data though. Because you can add code to it, sounds like it could be possible to load arbitrary code into a project. It should be fine for editor stuff though.
Hey!
I’ll give it a look, never really used the forum yet.
Oh indeed, never thought about that!
Is that bad in any way? Considering this is a game and not really critical or online, it should be fine, no ?
Thanks a lot!
Let’s keep in touch 🙂
I think the danger mostly comes if a user tries to download a save file off the internet that has something inserted into it, and depending on how concerned you are with cheating, it could also be used to inject cheats. Although I don’t know all the details to know exactly how much an issue it would be, or different ways to exploit it. It may even be fixed already? I’m not entirely sure. I think on an engine standpoint, it shouldn’t be too hard to say if the file is in the project folder, it can be used more freely, but outside of that, it gets sanitized a bit more. I think the thing that makes it potentially more vulnerable in the first place is that it sounds like the object has access to awake and update methods, so the game opening it doesn’t have to call specific functions for it to be able to work.