Sqdef, My Tower-defense Game


reiboul said:
As I wrote it, i suddendly tried to build a lot of barricades to get past level 36... but how can we know their stats? :rolleyes:
Well, it's more powerful than 4 Barricades put together, and has more simultaneous targets.

Quiest said:
Thanks for the game, Alex. My favorite compo entry atm :) Very nicely done, pretty good interface, and your graphics style is wonderful.

But I find it quite hard... its impossible for me to kill a boss in their first way around, and I also haven`t been able to beat the 24 and more wave levels.

I hope you`re going to tweak it a little / make it a little easier.
And please, could you add a infinite money mode, just for the fun of it?
As you are not saving highscores or anything, this should be okay...

Another thing is, could you move the sell building button somewhere else, to like, L+R, I don`t know how often it happened that I wanted to upgrade a tower and accidentally sold it...
Background music would be nice too, something not to loud/distracting maybe.
And how about a fast-forward button, so you don`t have to wait ages for the enemies to get around the level...

Other than that, I think you`ll make first place with the game, this could even be a commercial game (although I hope it won`t).
Hey Quiest, thanks for the kind words, I'm happy you like it :) There will be hiscores/medals for every level, but that shouldn't stop me from making a sandbox mode or something like that with lots of lives or lots of money. It's important to have quick access to the sell button, because often you must sell and rebuild things while a wave is still going on.

I wanted a fast forward button too, and others suggested this as well. Unfortunately, that means 5 or whatever times as many total calculations per second (to keep accuracy), and it can actually slow the game down when there are lots of creatures and towers on-screen in the later levels. I don't want to break consistency. I'll see if I can pull a trick or two out of my hat to make it run a tad faster, and if I manage that, I'll put ffwd in :D
 
Last edited by a moderator:
Quiest said:
But I find it quite hard... its impossible for me to kill a boss in their first way around, and I also haven`t been able to beat the 24 and more wave levels.
Which map? You can easily reach wave 24 on maps like "complicated path", "Night City" or "Double T" (my own ^^ )


Quiest said:
Another thing is, could you move the sell building button somewhere else, to like, L+R, I don`t know how often it happened that I wanted to upgrade a tower and accidentally sold it...
Background music would be nice too, something not to loud/distracting maybe.
And how about a fast-forward button, so you don`t have to wait ages for the enemies to get around the level...
No, I think the Button config is fine as it is. Alex just need to set the default selection in selling menu to "NO" so when pushing, nothing happens ;) Maybe he can change the colours or the appearence of updating and Buying menus slightly different so that we can see instantly, which window we have opened even, when not looking close.
BG Music? Please no, another thing, that costs performance and concentration. If music, than with disable function please. ^^"

Because of the speed up function: I'm against everything, which drops FPS. ^^ I know, that the game runs fine (is it still software SDL? ) now but it's going slow, when building to much Turrets/towers (when you have enough money ;) )
But I could imagine a fast forward option UNTIL the first shot is shoot, for example on a map where the towers at the end, the fast forward works, as long the enemies are not shooted. When the first tower shoot, the speed is normal again and can't be changed. Shouldn't cost any performance then.
While the fight is full in motion, we could watch the detailed stats of the enemies, when they are dying ^^ It would be much fun to see, how they loosing lives with a seperate numeric counter, especially Bosses :)

By the way, the tutorials are a good Idea for the graphical MANUAL function of GMenu2X ;) Or maybe a animated INGAME tutorial? ;)

EDIT: I've survived Wave 41! :)
 
Last edited by a moderator:
Alex. said:
I wanted a fast forward button too, and others suggested this as well. Unfortunately, that means 5 or whatever times as many total calculations per second (to keep accuracy), and it can actually slow the game down when there are lots of creatures and towers on-screen in the later levels. I don't want to break consistency. I'll see if I can pull a trick or two out of my hat to make it run a tad faster, and if I manage that, I'll put ffwd in :D
Oh come on, is it going to slow it down so much if you only keep the non-graphical stuff going? I mean what do you have to calculate for the simulation to keep going? The position of creatures at each "sub frame" (and by this I mean all the iterations of the game that won't necessarily result in a displayed frame in case you're in fast fwd), their distance to the stuff that shoots, the damages they get, I mean, you shouldn't even have to calculate the position of "bullets", except only once per displayed frame, right? Does it really take that much CPU time? Without blitting or anything?
 
Last edited by a moderator:
A_SN said:
Oh come on, is it going to slow it down so much if you only keep the non-graphical stuff going? I mean what do you have to calculate for the simulation to keep going? The position of creatures at each "sub frame" (and by this I mean all the iterations of the game that won't necessarily result in a displayed frame in case you're in fast fwd), their distance to the stuff that shoots, the damages they get, I mean, you shouldn't even have to calculate the position of "bullets", except only once per displayed frame, right? Does it really take that much CPU time? Without blitting or anything?
It does! ;) :

sqdefstresstestez6.png


When building a dozend Laser Towers with 4 laser shoots each, the Frame start to drop heavy. You notice the slowdown, especially with only 15 FPS of 30. (Pics were taken on a early alpha at 166MHz )
Of course it's very unlikely yet, you can build so much Laser Towers. ;)

But if you have Ideas to speed up the game, even with Zillions of projectiles on screen, just let Alex. know. :)
 
Last edited by a moderator:
fusion_power said:
When building a dozend Laser Towers with 4 laser shoots each, the Frame start to drop heavy. You notice the slowdown, especially with only 15 FPS of 30. (Pics were taken on a early alpha at 166MHz )
Of course it's very unlikely yet, you can build so much Laser Towers. ;)

But if you have Ideas to speed up the game, even with Zillions of projectiles on screen, just let Alex. know. :)

No no you don't get my point. It has nothing to do with having lots of laser towers, it has to do with possibly having actually necessary physical/gameplay calculations taking much less time than the rest, such as graphical calculations involved in the display of lots of lasers flying at the same time.
 
Last edited by a moderator:
fusion_power said:
Alex just need to set the default selection in selling menu to "NO" so when pushing, nothing happens ;)
Fine with me :) just make it less likely to sell something by accident :)

fusion_power said:
BG Music? Please no, another thing, that costs performance and concentration. If music, than with disable function please. ^^"
Also fine.

fusion_power said:
But I could imagine a fast forward option UNTIL the first shot is shoot, for example on a map where the towers at the end, the fast forward works, as long the enemies are not shooted. When the first tower shoot, the speed is normal again and can't be changed. Shouldn't cost any performance then.
Thats actually a good idea, because I like to watch my towers shooting enemies, the part when the enemies just walk and nothing is happening (i.e. when they are past my set of towers at the beginning of the level and just need to walk to the exit with nothing in their way, taking lots of time, you should be able to ff with a keypress maybe. should be easy to disable once a enemy is in reach of a tower.

BTW, Alex, do you use MSN or ICQ? I would like to have a word or two with you about SDL coding...
 
Last edited by a moderator:
Really good work Alex.

The game is a little bit slow as I find myself waiting for it to pass through. Adjustable frame rate would be better IMO. Also, the money gain does not adjust with weapons costs. You may rise the price of each enemy solder (something like $5-10 instead of $2-3)
 
Fargo said:
Really good work Alex.

The game is a little bit slow as I find myself waiting for it to pass through. Adjustable frame rate would be better IMO. Also, the money gain does not adjust with weapons costs. You may rise the price of each enemy solder (something like $5-10 instead of $2-3)

Although I used to say there is not enough money, this may be too much :)

With this version I were level 36, not too bad for someone who never played a Tower game since Warcraft 3, years ago :) But maybe 1$ more on each enemies could lower the difficulty without making it TOO easy

Alex what about my idea to bring infinite waves, instead of choosing a fixed number fo round? what if someone goes to level 45 and might want more? :D
 
Last edited by a moderator:
A_SN said:
Oh come on, is it going to slow it down so much if you only keep the non-graphical stuff going? I mean what do you have to calculate for the simulation to keep going? The position of creatures at each "sub frame" (and by this I mean all the iterations of the game that won't necessarily result in a displayed frame in case you're in fast fwd), their distance to the stuff that shoots, the damages they get, I mean, you shouldn't even have to calculate the position of "bullets", except only once per displayed frame, right? Does it really take that much CPU time? Without blitting or anything?
Well, this is what goes on each frame, calculation-wise:

CODE
for each creature
check if it reached end point, and go back to start
check if must change direction angle
advance position

for each building
check the closest creature(s) in range
if it's time to shoot, shoot targeted creature(s)

for each bullet
adjust trajectory angle in relation to targeted creature
check collision with target creature
advance position


I could gain a speedup by only checking creatures in range every 3 frames instead of every frame, and only adjusting a bullet's angle every 2 frames instead of every frame. I saw no need to do this for this version.

In the screenshots fusion_power posted, the game slowed down because of the time it takes to draw all those lines (at 166mhz ;P), not because of lots of calculations. Lasers are the simpler to calculate than bullets, because the only thing you need to check is if the targeted creature is still in range of the tower, no individual bullet angle adjustments.

Anywho, it would likely run well at x2 and even x3 speed, but I think I tried it at x5 or x10, because I wanted to really see the action fly, not just a brief speedup. :D
 
Last edited by a moderator:
Quiest said:
fusion_power said:
But I could imagine a fast forward option UNTIL the first shot is shoot, for example on a map where the towers at the end, the fast forward works, as long the enemies are not shooted. When the first tower shoot, the speed is normal again and can't be changed. Shouldn't cost any performance then.
Thats actually a good idea
Ditto. Great idea.


CODE
for each creature
check if it reached end point, and go back to start
check if must change direction angle
advance position


OK, sounds fine that shouldn't take much time.

CODE

for each building
check the closest creature(s) in range
if it's time to shoot, shoot targeted creature(s)


Since you said "check the closest creatures" I guess it's done in an efficient manner.

CODE
for each bullet
adjust trajectory angle in relation to targeted creature
check collision with target creature
advance position


Do you *have* to do that for every "sub-frame" (frame that doesn't necessarily get displayed if fast fwd is on), in other words, do bullets ever miss their target? My point is, if when you shoot a bullet you know it's gonna reach its destination, then you need to do the whole bullet thing only for every actually displayed frame. Oh well, even then, trying to find an optimisation here probably isn't worth it.

But anyways, the real important question is, have you profiled your game so that you can tell how much physics usually take up, or better, how many FPS do you actually lose when the game is running N times faster?

Oh well, if we use this speed up when nothing shoots anyways, it's not a problem. Plus who cares about the FPS when all you're trying to do is skip a boring part.
 
Last edited by a moderator:
LOL. This game is so great it has caused a huge thread and loads of *discussion*. I have figured it out now. Thanks for the guide, I didnt see it until after I got it though.

It's very hard to choose a winner. I think I would go for sqdef but my missus with no doubt would go for battle jewels. Not that I am putting the rest down as Ruckman is also a hot contender with such polished and sexy graphics and a great alternative of pacman.
 
fusion_power said:
No, I think the Button config is fine as it is. Alex just need to set the default selection in selling menu to "NO" so when pushing, nothing happens ;)
I would have to disagree with this move. Sure it sucks, accidentally selling a tower when you wish to upgrade, but in the interest of "speed of playing" when it comes down to the wire and you have to sell a turret/tower RIGHT AWAY to have the money to build one later down the pathway, or several turrets/towers (or factories) for that matter, you don't want to have to do that extra step each time and will likely screw up trying to sell them quickly.
 
Last edited by a moderator:
Fargo said:
Really good work Alex.

The game is a little bit slow as I find myself waiting for it to pass through. Adjustable frame rate would be better IMO. Also, the money gain does not adjust with weapons costs. You may rise the price of each enemy solder (something like $5-10 instead of $2-3)
I think there could be a problem because the shooting frequency of a tower is calculated per frame. ^^""" More FPS result in more firepower...If I understood the game gight.
I totaly agree, that more money each enemy should give. :)

A_SN said:
Quiest said:
fusion_power said:
But I could imagine a fast forward option UNTIL the first shot is shoot, for example on a map where the towers at the end, the fast forward works, as long the enemies are not shooted. When the first tower shoot, the speed is normal again and can't be changed. Shouldn't cost any performance then.
Thats actually a good idea
Ditto. Great idea.


glad, you like the Idea. :)

For the speed discussion, I think, for the momentary game it is ok. FPS are constant, even at 166MHz. For the future, when we have more waves maybe and people start finding ways to earn much money and building much more Towers and turrets, the game could be "pimped" to be ready for every possible turret configuration without FPS drop. I'm sure, our good old GP2X can easily handle this. :)

By the way, my mind developing a very special Tower, never seen before in a TD game (I hope! ^^ ):
The Drone Tower! This baybe is able to start a drone who can chase, target and shoot a single enemy over the whole map if neccessary. When building the Tower at the beginning of the path, the drone follows an enemy from there till target dies or till it left the screen. It's supposed as Boss killer because it only can trace one enemy at time. (maybe it switches to anoter enemy, when first dies, maybe drone disappears, this needs balance testing...) Drone could be a...whatever "thing" that surrounds a enemy and do constant shooting. I'm sure, even with average 150dmg/sec Drone could be the burner on a map with a long path and a 50.000 HP boss. :)
 
Last edited by a moderator:
fusion_power said:
I think there could be a problem because the shooting frequency of a tower is calculated per frame. ^^""" More FPS result in more firepower...If I understood the game gight.
This is a non-issue. It can easily be adapted.
 
Last edited by a moderator:
Wait... why exactly should the game run at a higher FPS? :-/ I'll do the fast forward thing for the next update, and it will run at something like x3 the normal speed.
 
Alex. said:
b._.o._.b: That's the kind of editor I planned out initially, then scaled back, then ran out of time altogether :D I hope to someday do something at that level.

reiboul said:
MegaTower? WTF? i heard something from a hidden tower... how do you get it? :rolleyes:

Barricades; perhaps I should not keep it a 'secret', I suppose it's quite necessary to get far into the game :D
:
Edit: Never mind, I figuredout how to get the Mega Tower. But I'm not telling without some significant monetary contribution.

Also, I had some ideas:

1. Some sort of real barricade, that you could place in the path of the enemies to block them for a while. It dissolves after the enimies push on it for a while.

2. Color scheme changing for the maps. I've seen the early screenshots, and I thought that those looked nice and that it'd be nice to have an option to choose between color schemes.

3. How about a little "dink" sound for turrets and towers firing? And a cash register "ka-ching" (cliched, I know) for buying and selling? And laser noise for lasers? I'm good at finding and making sounds, so I could send them at you if you wanted them.

There are many I's, all playing a GBAX entry in my mind. The Sqdef one is happiest right now.
 
Last edited by a moderator:
atomicthumbs said:
Also, I had some ideas:

1. Some sort of real barricade, that you could place in the path of the enemies to block them for a while. It dissolves after the enimies push on it for a while.

2. Color scheme changing for the maps. I've seen the early screenshots, and I thought that those looked nice and that it'd be nice to have an option to choose between color schemes.

3. How about a little "dink" sound for turrets and towers firing? And a cash register "ka-ching" (cliched, I know) for buying and selling? And laser noise for lasers? I'm good at finding and making sounds, so I could send them at you if you wanted them.

There are many I's, all playing a GBAX entry in my mind. The Sqdef one is happiest right now.
1. Maybe in a later version, right now there's a lot of other things to keep me busy :D

2. I'll play with it, and see how it works out.

3. A sound each time a turret fires a bullet would be too much I think, equate it to enemy ships playing a sound each time they shoot a bullet in a bullet-hell shmup. I'll look into making funner sounds for buying and selling :)

Thanks for playing, I'm glad the Sqdef 'I' likes the game :lol:
 
Last edited by a moderator:
atomicthumbs said:
1. Some sort of real barricade, that you could place in the path of the enemies to block them for a while. It dissolves after the enimies push on it for a while.
This reminds me of the only TowerDefense game I played before Sqdef, a mod for Warcraft 3, where you used to build tower ON the path, not on the border, so you were making labyrinth with towers to stop enemies, and that gave us lots of strategies on how to place turrets to slower enemies, etc :)

It could be doable, but you'll need to double the path's width and shrink the towers by 2 to have real possibilities, that would totally change the game -_-' so I don't think you'll choose that gameplay :)
 
Last edited by a moderator:
Back
Top