[WIP] A Turret defense type game dev blog

Update: Test the latest dev demo here
Playing link is same: kalel.itch.io/turret-defense-ty … sword=test

Hi there,

I’ll make this thread as a development blog for the upcoming turret defense type game. It doesn’t have a name yet, and it’s still far from finished at this point. The posts may not always completely reflect the chronological development order (e.g. some things are already in the works which are not displayed yet).

Here’s a little screenshot of the first map in development:

The green value is just used for debugging at the moment, but in its place score will be displayed normally.

Here’s a screenshot of the game over screen:

More to come later. :slight_smile:

Turret upgrade screen WIP:

#2

Nice writting font ! Where did you found it ? :slight_smile:

I like the graphics textures :stuck_out_tongue: keep it up! :laughing:

The font is a free font from Google fonts. I think it’s called “Bangers”, but not 100% entirely sure as I have downloaded a few.

Thank you! More is coming, but right now most of the time is spent on getting the game logic working. After that, it should be somewhat easier to add levels, or even new Turrets or Enemies.

Here’s a little animation of the first map gameplay so far (this might change a little or even a lot during development):

There are no sounds as of yet, so the only thing lost in the GIF are some colors, and frames

Did you make the turret sprites in Blender or in a paint tool? I like the shadow.

Yes, the turret sprites are in blender. It’s the easiest way to get 360 frames (one for each angle). Theoretically we could do with less, but… this works and 2 degrees would at the very least look like a fairly poor accuracy at some distance.

Game has taken a bit of a downgrade in terms of dimensions in order to make it more viable. That is, loading times were too big for 360 images for each turret. To solve that, I went with a more complete 2D solution instead. It’s still not fully implemented, so for now the entire turrets rotate (rather than just one part), and they might not be positioned properly.

There’s no sound yet, and many things are yet to change (balance, costs, performance, graphics possibly, and etc). Some types of pointers are missing (e.g. if you can’t afford a turret, it simply won’t be shown atm in the shop rather than displaying a dim image with names and prices and In the end). It’s supposed to be a small minigame rather than any kind of full-big title so it might not get too polished.

The last map will not teleport you to the next map, as there is not yet any next map.

By typing the password “test” you can try this demo:
kalel.itch.io/turret-defense-type-game

It uses cocos2d, as this is what I plan to use to compile the game for Android, if fortunate enough that everything works well in the end. :slight_smile:

I’m sorry to hear that, the turrets were looking really good :frowning:
I had the same experience when I was developing a 2.5D isometric RPG game in GDevelop and I also tried to go for the smooth and detailed 3D look for characters. But for the exact same reason I had to drop the idea of making this game in GDevelop and realized for 3D look always best to go with a 3D or 2.5D engine that allow you to use animated 3D models.

But in your case you might don’t need to drop the 3D look completely. Maybe you could make a static bottom part of the turrets 3D with a nice shadowing to look good, also everything that is static and make only moving and rotating parts flat 2D with some smart art design to not pop out that conspicuously…

Regarding the actual gameplay one thing that I would like to suggest is to pick the enemies that are closest to the end of the road or whatever need to be protected or closest to the turret and keep the turrets focusing on that while they can… For example one time an enemy just passed by a turret and the turret decided not to follow that tank any more and jumped on the next one was coming but the next one was actually more far off than the one just passed. I didn’t like that. In case it is going to be important not to let any enemy pass or get to something, it is going to be important to make the turrets follow an enemy until the last moment… Actually, it could be a nice little touch if the player could decide also how turrets pick and follow enemies. It could be some deploy options to choose when you deploy the turrets.

Also you might need to consider to let the player start the wave whenever it ready with the turrets :slight_smile:

Thanks for your feedback!
Graphic stuff is a bit messy (I loved the 3d turrets too, but this is a limitation I might have to accept and might not affect gameplay) so I’ll comment on the gameplay parts

You’re right, they are simply targeting the closest enemy right now. So if an enemy passes, another enemy might become closest and then the turret will “forget” about the passed enemy, and the enemy will pass unless there’s another turret for which it is the closest. It’s not ideal for sure, but it’s the simplest to make. If it makes the gameplay too difficult or silly, and thanks for the advice, I might have to change that so that it keeps following a single unit until the unit is destroyed or out of range. But this could cause other problems, e.g. what if a turret that cannot really defeat a target (e.g. for now the first turret can’t hurt the large enemies in level 2, and in the future maybe some other types of vehicles will need specific turrets) then this turret shouldn’t keep shooting at this target, because then it will be useless. Of course, more logic can be added so that turrets target only the proper enemy types, but it is one more layer of complexity. As for selecting strategies (e.g. closest, strongest, etc) that is fun for players and I have noticed the selection option in some games, but then some of the greatest tower defense games (gameplay quality wise) don’t have that selection, so it’s worth considering whether the additional work would improve gameplay significantly or not (to see if it’s really worth it).

Definitely, this and possibly those speed up/down options are not difficult to implement. I just didn’t implement them yet. I’m still exploring how feasible these projects are in Gdevelop, and it helps a lot to keep things as simple as possible. You don’t have the object oriented language organizational advantages (objects, or even functions in HTML 5), but on the other hand simpler tasks (without too much complexity) are likely easier in Gdevelop, although it’s hard to compare as I didn’t make many projects of this type at all.

P.S. you don’t necessarily need an engine that supports 3D models, you could have one large image spritesheet for each pseudo-3D object, and one large image is much faster to load than 360 separate images. :slight_smile:

I uploaded a new version. Now turrets tend to aim towards the target closest to the exit (but also closer to the turret).

Also, added airplanes to the currently third map.

Playing link is same: kalel.itch.io/turret-defense-ty … sword=test

I believe the turrets should stay on target until the target is out of range or get destroyed because the current way sometime the turret just switch target right before it would be destroyed and game over because the enemy with 0.01% health brake through the defence :laughing:

Well, I believe all the turrets should cause some degree of damage to any enemy. In my opinion it would be a mistake to make turrets completely useless against certain enemies especially if the turrets are the ones you begin with. But obviously, if a turret is completely useless there must be other options to choose, maybe more expensive alternatives available and upgrades to make otherwise useless turrets actually effective.

To avoid the problem though, the only thing I can think of what you have mentioned, to make the turrets pick specific enemies but instead of pick specific enemy types I would personally go for stats like shield, fire power, speed…
So in case for example I upgrade the fire rate and rotation speed of a turret, I would expect it to target fast enemies (their speed is greater than X) in first place and in case I upgrade the fire power I would expect it to target enemies with shielding (their shield, health is greater than X) in first place…
So, instead of simply pick the closest enemy or a specific enemy, I would pick all enemies within a range and see which enemy fit the preferred stats better and target that one. If find multiple ones, target the closest. If find no enemies within range that is meet the preferred stats, just target any enemy that is closest but keep looking in that case…

Regarding selecting targets, if you have doubts about turret options, how about if the player could select target for each turret manually during the game just like in a strategy game. Player could select a turret and select which enemy to target or select an enemy and select a turret to be targeted by. So the turrets would do their job automatically on their own but let the player to intervene if wish to do so… The turret made a bad decision, no problem just change target to whatever I think would be the best by clicking on the turret and the enemy…

Anyhow, this kind of game need smart and advanced turret AI for sure to make it fun to play.

Yeah, but GDevelop doesn’t have that and frankly I doubt it going to come in near future. This year is most likely going to be dedicated to the new IDE and the game 4ian is making and I bet next year going to be dedicated to improve HTML5 runtime. Unless 4ian going to need this feature him self in the game his making or someone contribute to GD, I can’t see it coming very soon :frowning:

Thanks for your thoughts and ideas again.

I’m trying to make the game relatively simple to develop and I realize that simplicity can affect how fun the game is to play. However, it also affects the time and complexity of making it so of course there’s a trade off. Targeting the enemy nearest to the bottom of the screen might be sufficient as a simple solution, if all enemies are going up to down in all levels (they can have more complex paths in some levels, but if the path always starts on the top part of the screen and finishes on the bottom part of the screen, regardless of what happens in the middle, then targeting the lowest enemy will always be effective). The current implementation also considers the turret position so it’s not always targeting the lowest enemy and may need a change. There is a slight randomization of targeting angle however, so a turret will not always hit a target. and there will be some chance for an enemy to escape in some circumstances (e.g. close to the bottom of the screen, only 1 turret targeting it, and perhaps missing that final bullet). Like in some games, this means that if you play the same wave a few times with similar style, it might have a different outcome, so it’s a slight unpredictability.

The manual aiming option sounds fun. Not many games have this, and it might be fun indeed.

Maps and enemies also need some time to create, so gameplay vs content amount tradeoff is never simple to balance with such projects (with larger projects there’s different organization of course).

I’m not too sure if it a bad or a good thing. I mean, tower defence games are strategy games require resource management and good defence strategy. Not too sure if I would be happy after all the planning and resources spent on deploying and upgrading if the turrets would randomly miss the target for no real reason.

You might need to consider to randomize the wave instead and maybe even the layout of the level so it require different plan to win instead of “force” different outcome for the same plan.

Perhaps it sounded a bit too randomized in my description. What I meant to say is that no cannon is perfectly accurate (every shot = hit). Instead, there is a fixed accuracy across all of the turrets at the moment (although it might be separated across turrets later if needed). This accuracy is built the simplest way possible, that is, a slight random value is applied to the turret angle before firing the shot. That way the turret could fire up to a couple of degrees to the left or to the right, rather than finding the perfect point every time.

This doesn’t mean that planning properly should result in losing the game, but just that the user needs to account that not every turret is 100% accurate, and some may be more accurate than others (although all are equally accurate at this point). I know that some tower defense games do seem to hit the target with a 100% chance each time, but others have turrets that can miss from time to time.

I have added a new map to the game, so it now features 4 maps. Since gameplay is still work in progress (e.g. enemy configuration amount is not finalized, turret commanding is not finished yet, turret upgrading is not finished) it’s not very difficult to finish the demo.

The link to try the demo (if you do, any feedback is welcome) is still the same: kalel.itch.io/turret-defense-ty … sword=test

Map 1:

Map 2:

Map 3:

Map 4:

Regardless if it done by purpose or planned to improve in the final game, this is the things that I don’t like about the game right now:

-I don’t know the stats of the turrets like fire rate, fire power and range
-I don’t know the stats of the enemies like health and shield
-I don’t know what enemies to expect (I can’t really plan just see and wait)
-I can’t speed up the game to get the result faster or quit/restart the map in case I already see my strategy won’t work
-Turrets miss the targets too often in my opinion
-Turrets don’t priorities the targets, sometime they are focusing on the distant slow enemies while the close fast enemies pass the defence, they may attempt to target them but too late, it normally happens when we have lot of enemies on screen
-Turrets start shooting enemies even when they are outside the screen, in my opinion they should start firing when they enter the screen or let me scroll the screen so I can see them
-I don’t like that the position of the turrets on the map is already made, maybe limit the number of the turrets I can use but let me choose the position
-It seems to limited what turrets I have access on the map regardless how much credit I have. Let me access any turret I have unlocked in case I have the credit to afford
-enemies might also need to attempt to attack the turrets and destroy them, not just try to sneak through the defences right in-front of the turrets, in that case turrets also going to need shielding or integrity that can be upgraded in the final game
-after 4 levels, the design of the levels is boring already, I hope to see more variations (something other than empty desert) in the final game :slight_smile:

Good luck!

Thanks for trying the game multiple times already and also for the suggestions. :slight_smile: Some of the points are definitely related to the game being unfinished and should/need to be implemented, but I’ll also see what can be done about the others.

I can only try to clarify two points so far:

There’s no info (name, price either) in the shop yet, just the images, but you could see the current stats from the upgrade screen (which is also work in progress). To access the upgrade screen, click on a turret that is already placed on the map. Upgrade functionality should work, but currently there’s no check for current credits, so that upgrading can be tested infinitely. This will also need careful balancing (cost for upgrade). It’s also worth noting that the initial turret stats (and enemy stats) will likely be adjusted as well later on when testing and adjusting the game.

You should be able to access any turret on any map (if not, there’s a bug). However, currently only those turrets appear which you can afford (e.g. if you have credits only to purchase the first turret, just the first turret will appear in the shop). This will later be changed to unavailable turrets being grayed out or otherwise marked, but that should be done after the shop is further finalized (e.g. turret cost displayed and such). In some games you can access all turrets, with how many of which you can place depending on credit amount and initial credits for a particular map, and that will probably be the case here too.

I’ve just uploaded the next development demo version. These are not finished versions, just a way for you to follow the changes and share any thoughts or ideas you may have.

kalel.itch.io/turret-defense-ty … sword=test

Now there’s a start button you can press to start the enemies on each map.
Also, there’s a normal and fast button to adjust the enemy speed.

  • Turrets will not shoot at enemies outside of the map as before. This makes the game more difficult as turrets have less time to hit the target, but it will be balanced later on (e.g. when turret and enemy stats and enemy formations are further adjusted).

As always, please feel free to let me know any other feedback. :slight_smile:

P.S. “Fast” button is half covered by debugging stats, but those will definitely be removed in the final game.