A touchpoint: I’m still quite glad that I picked Construct 3 as my way to launch into game development.
It clearly has a lot of powerful tools for more complicated games and more experienced developers (their Twitter account linked to a new tutorial about using JSON arrays that went right over my head), but they also have some nice, simple stuff for beginners like me.
Case in point: turrets.
To save time and energy for the greenhorn developer, Construct gives you a whole host of “behaviors” you can give to an object to make it behave like things you already know. It takes some of the guesswork out.
For the two mini-golf games, I relied heavily on the “Physics” behavior to make the ball and obstacles behave realistically (technically, everything you’re seeing had to have gravity set to 0, otherwise the ball would just fall to the bottom of the screen – Physics!). For this game, however, I didn’t even realize that where was a built-in option for tower defense until I was well into my demo.
That’s right. Turrets!
When you assign the turret behavior to an object, it lets you pre-fill a lot of options that I was dreading having to figure out on my own, since I’m not using a tutorial this time (Target Mode: First in Range is especially exciting).
But even with this ease of use, you still have to learn the language of what’s going on in the code or else you’re going to run into problems.
For instance – as I was setting up my turrets, I found that each turret would fire for about one second and then stop firing. I couldn’t figure out why for the life of me, and found no help in any of the Construct forums.
So, I tinkered with each variable independently trying to see what changed – no dice. Changing rate of fire meant that I could have more or fewer shots in that one second, but never more than that second.
So what was the problem?
Originally, I did not specify to Construct that the Turret should only acquire a new target if it doesn’t have one already. (The left side condition says that every tick the turret DOES NOT HAVE A TARGET [hence the red X] it should acquire a Skeleton object target.)
So the turrets were stuck in a flurry of indecision: every tick I’m telling it to pick a new target, and after one second had elapsed – based on the speed I had given to the skeletons – the turret had TWO targets to choose from, and it just freaked out.
As soon as I added that “does not have target” condition, everything sorted itself out. The turret only looked for a new target if it didn’t have one, and was happy to chase its current one down.
This was one of a couple interesting problems I faced in making this new TD demo, and I’m excited to release that file very soon! Until then.