Defence Prototype

Community Forums/Showcase/Defence Prototype

Helios(Posted 2008) [#1]
Defence is a very simple concept for a game, its based on the retro 'Defend The Tower' genre of games. Basically there is a long winding path across the map and you have to place weapons down at strategic points to try and kill the enemies that follow the path before they get to the end (where the 'Tower' is).

At the moment this game is still in a very early phase (I only started it yesterday), however it is playable and pretty fun. All the graphics are currently programmer art (made by me :() and the audio is from free sources around the internet. When its done I hope to have far more impressive graphics and a far more featureful game.

Anyhow I just wanted to ask what your thoughts are on the style of gameplay, if you like it or not.

You can get the prototype here;
http://www.binaryphoenix.com/index.php?action=download&id=89

Basic instructions for gameplay;
Simple, at the start of each round you get 5 seconds to buy and place weapons. To place a weapon click its icon in the hud and place it where you want (it must be outside the path, unless its a mine). After the 5 seconds are up the enemies come and you have to hope your defences hold. When all enemies are dead or gone, the cycle restarts. Each round the enemies get harder, and the rewards for killing them greater.

Weapons can also be sold back at 75% of the original price and upgraded, you can do these by selected the weapon and pressing either of the buttons in the bottom-right of the HUD.

Screenshots;




Blitz3dCoder(Posted 2008) [#2]
Sounds cool, Id download it, but i have not had any time lately. You started it yesterday? That is pretty cool.


Triforce Guardian(Posted 2008) [#3]



:O.. That was addicting for awhile there, lol...


Boiled Sweets(Posted 2008) [#4]
Nice one, loved the online flash version...looking good.


Yeshu777(Posted 2008) [#5]
I like this..

EDIT: Just some suggestions

1. Random time before the next attack wave, announce it.
2. Assign the weapon to the function keys, F1 machine gun etc.


Helios(Posted 2008) [#6]
"2. Assign the weapon to the function keys, F1 machine gun etc."
Already got that in the next version :).

"1. Random time before the next attack wave, announce it."
Hum, ok. I shall think about that.


Who was John Galt?(Posted 2008) [#7]
I love it! I've recently given up on the idea of producing the next hit game, realising it's just a lot more effort than I can be bothered with, but seeing something like this put together in a day has re-kindled my interest in at least making a mini-game or two.


EOF(Posted 2008) [#8]
Very neat and addictive game. I do like your 'programmer art' graphics.

Suggestion:
==============
A "MOVE" weapon option (with a small cost of say 10%)


More Weapons:
===============
Permanent Mine - Stays on the ground permantently but only causes small damage

Reverser - Causes the enemies to reverse back up the path for a shot distance (taking more punishment if the reverser is placed strategically!)
The reverser would need to be fairly weak at aiming though. Otherwise all you ememies would never make it to the tower.

Turncoat - Causes enemies to shoot at other enemies


Right .. back to the game for me!!


chwaga(Posted 2008) [#9]
WE WANT SOURCE!!

seriously though, a saving method would be nice (and easy to code, give me the source and i'll code it for you)


Helios(Posted 2008) [#10]
"WE WANT SOURCE!!"
- I'll release it when its done.

"seriously though, a saving method would be nice"
- Do you mean, as in saving the state of all objects? If so that seems somewhat unneccessary, its really meant for short play-sessions so to speak. Saving and resuming seems superflous.


chwaga(Posted 2008) [#11]
I just mean a simple profile-based saving system. You can load or create a new profile at the beginning of a game. After every level save in a .sav file (the extension just scares off cheaters who don't know the open with...notepad method) stamped with the profile name. In it you simply include the level number, money, and object positions. Very simple. Very convenient.


chwaga(Posted 2008) [#12]
what's the tesla cannon do...?


Helios(Posted 2008) [#13]
Look at the top screenshot. The tesla gun fires beams of electricty at the enemies.

As for the profile thing, seems somewhat unneccessary on a small puzzle game?


mindstorms(Posted 2008) [#14]
Why do tesla cannons cost so much but do so little? seems about the same for everything but flak cannon, slow cannon, and machine gun.


Helios(Posted 2008) [#15]
"Why do tesla cannons cost so much but do so little? seems about the same for everything but flak cannon, slow cannon, and machine gun."
- Mainly because they have no reload time, they constantly hurt the enemy. If place in a good place they can do quite a lot of damage. Theres also the consideration that it dosen't actually cost that much, as the further you get in the game the more money you get per enemy killed.

Anyhow I agree it is pretty unbalanced, its quite difficult getting the balance between cost, effectiveness and difficulty right. If you have suggestions by all means give them.


Helios(Posted 2008) [#16]
Heres a new version guys, includes a ton of bug fixs, a proper game over screen, a highscore table, title screen, and so on.

http://www.binaryphoenix.com/index.php?action=download&id=89

Enjoy.


Pete Rigz(Posted 2008) [#17]
I always find these games incredibly addictive. I got a tad carried away:



In the end I started seeing how much I could keep pushing them back till they couldn't even reach the first corner! There are certainly balance issues there, I found that the machine gun and ice gun were the only useful ones as far as cost/usefulness ratio. I only used the laser in the end for visuals, I think a fully upgraded machine gun works out more powerful?

The score and money I have there are over 10000 but the last digit is missing, but I'll guess you've fixed that already. I'll try the new version tomorrow. Nice job!


chwaga(Posted 2008) [#18]
CRAP!!

i was doing UBAR (pete rigz style) and it crashed...


chwaga(Posted 2008) [#19]
some suggestions:
EDIT: (typos)
-make a hotkey to upgrade
-make a option to build units max upgraded(a checkmark in the space between guns and right side buttons?)
-saving!! (i keep crashing at dramatic moments)
-map variations? (when starting a new game, choose a random map)
-extra mode where you have infinite time to set up (don't include these on highscore though!)
-add an UBARgun, shoots tesla speed, 1/2 machine gun damage, but slows like the ice-ray. cost around 1000
-add heals, $10 per 1 health, a total of $1000 for a full heal
-add remote detonators, lay them in prep time, destroy them like a mine by clicking them in gametime

overall, neat game, thanks for sharing!


EOF(Posted 2008) [#20]
Thanks for adding MOVE (although I now think $10 is too much. Maybe $5 is better)


Next suggestion
==================
Make weapons brighter/bigger/thicker-looking when upgraded.
At the moment there is no indication as to the weapons upgrade level

I like the heal suggestion from chwaga too



@Pete
I wouldn't like to be a burglar in your back garden!


Pete Rigz(Posted 2008) [#21]
Just tried the new version and it crashed with a visual c++ runtime error after about 30 rounds. Hmm, the other go I had in the previous version I played in windowed mode without any probs, might try that see if it still has the same problem. Wouldn't suprise me if it's a vista thing.


Pete Rigz(Posted 2008) [#22]
Lasted a little longer in windowed mode, just threw a "This program has stopped working" error.

I was thinking about how to balance the weapons and thought about basing it on Damage per Second (DPS). If you calculate a DPS value for each weapon and then just base the cost of each weapon on the DPS it might work out. Something like DPS*$5 or something. This would assume that spread weapons like the shotgun would have all their shots hit so you'd have to factor in the spread of the weapon and also it's range.

As for the ice gun it's a tough one, as essentially it can nearly double the damage done by all weapons in the vicinity by halving the speed of the enemies.

As the game never ends too, you may as well just keep making the enemies get continuously stronger. After the fat blue ones, go back to little green ones that have more health then the fat blues and start over. Just go for ever until it's game over. This way you're continuously having to build your arsenal until you're overrun, with the basic aim of, how many rounds can you last for.


Helios(Posted 2008) [#23]
Sorry about that bug, it was an incredibly stupid one. Just forgot to change the name of a file it was trying to load.

'i was doing UBAR (pete rigz style) and it crashed... '
- Sorry, the bug is fixed now.

'make a hotkey to update'
- On my todo list.

'make a option to build units max updraged (a checkmark in the space between guns and right side buttons?)'
- Alrighty

'saving!! (i keep crashing at dramatic moments)'
- Shouldn't crash now :). Personally I don't really see the point in saving on thins kind of puzzlish game.

'map variations? (when starting a new game, choose a random map)'
- I'm working on a map selection screen at the moment.

'add an UBARgun, shoots tesla speed, 1/2 machine gun damage, but slows like the ice-ray. cost around 100'
- <.< Posssibly ...

'add heals, $10 per 1 health, a total of $1000 for a full heal'
- On my todo list.

'Add remote detonators, lay them in prep time, destroy them like a mine by clicking them in gametime'
- Sounds good.

'Make weapons brighter/bigger/thicker-looking when upgraded.'
- On my todo list. I really need to get some better graphics first though.

'At the moment there is no indication as to the weapons upgrade level
- Says it in the top-right of the weapon information panel that pops up when you select one.

'As the game never ends too, you may as well just keep making the enemies get continuously stronger. After the fat blue ones, go back to little green ones that have more health then the fat blues and start over. Just go for ever until it's game over. This way you're continuously having to build your arsenal until you're overrun, with the basic aim of, how many rounds can you last for.'
- Already done that. When you get to the moment when all enemies have been shown, they continuously get 5% strong per round.


chwaga(Posted 2008) [#24]
i miss-typed on my suggestion list (twice)

i meant:
-make a hotkey to upgrade
-add an UBARgun, shoots tesla speed, 1/2 machine gun damage, but slows like the ice-ray. cost around 1000


Helios(Posted 2008) [#25]
No problem. I sort of assumed that :).


YellBellzDotCom(Posted 2008) [#26]
Ok, this is pretty damn cool! I got hooked and couldnt stop playin, heheheh. Very well done. I got to Round 99 and didnt place enough mines or upgrade my guns at the back end. 1 guy slipped through on round 100.

My sound stopped working at round 42, I had a bunch of electic shooters on that round.
The Money and Score will roll over once you hit 9999.

Heres the screenies...





z80jim(Posted 2008) [#27]
source so us mac users can try it pleasE?


Helios(Posted 2008) [#28]
'My sound stopped working at round 42, I had a bunch of electic shooters on that round.'
- Yeh I need to fix that badly. Basically each tesla has a constantly playing sound channel with its soundfx, I just change the channel volume. I know this is a terrible way of doing it but it sounded really odd if I used PlaySound every time I wanted it to play.

'The Money and Score will roll over once you hit 9999.'
- Yeh I never really expected people to get over that so I limited it. When I've balanced the game properly its unlikely you will get higher than that.

Also your screenies don't work :S.

'source so us mac users can try it pleasE? '
- When I've finished it I'll release the source and get someone to build executables for mac and linux.


z80jim(Posted 2008) [#29]
ok thx :)


Helios(Posted 2008) [#30]
Another new version. Same download link. This one just adds 8 new maps (which are randomly chosen, until I finished a selection menu).

http://www.binaryphoenix.com/index.php?action=download&id=89


Pete Rigz(Posted 2008) [#31]
Cool. It still crashes for me though after about level 25ish. No real obvious error message, just the usual this program has stopped working.


Perturbatio(Posted 2008) [#32]
This is good.

It crashes for me too, around level 27 the sound went then around level 60 it dropped out with no error.

Maybe a memory leak to do with sound?


Helios(Posted 2008) [#33]
Hum odd. Probably to do with that tesla cannon hack I made. I'll rewrite the soundfx code later today and see if it fixs it.

EDIT: Alright I've changed that code now, try downloading it again and see if this one crashs.


Pete Rigz(Posted 2008) [#34]
Haven't tried the new version but it crashed for me without using a Tesla. I had loads of machine guns though that make a hell of a racket :) so maybe it could still be sound related. Having said this though the first version I played was fine.

Will try again when I'm back from work tonight.


Perturbatio(Posted 2008) [#35]
still get the same problem, only this time I sold some stuff to get my name on the high score board :)


Helios(Posted 2008) [#36]
Hum ... I really have no idea what causes it. The whole game code is wrapped in a try/catch block so you should at least get a message box giving you exception info.

Oh well I'll keep looking :).


Pete Rigz(Posted 2008) [#37]
Yeh, still same problem here too.


Perturbatio(Posted 2008) [#38]
I was wondering if it was related to the bullets rather than just the sound.


Helios(Posted 2008) [#39]
Right, I've just played from level 1 to 100, and it hasn't errored out, as such I can't find the prob. To rectify this I'm posting the source in the hope that somebody with the error could compile it in debug mode and check what it is for me. As this isn't really a proper build you will notice the source needs some tidying up.

Anyhow enjoy, please tell me when / if you find the problem :).

http://www.binaryphoenix.com/index.php?action=download&id=90

Oh and now that you have the highscore submission functions, please don't abuse them and send fake results :). If you do I'll have to change the key in the next release and reset the highscore table.


chwaga(Posted 2008) [#40]
could this be converted to blitz3d by any chance??


Helios(Posted 2008) [#41]
If you had enough time I guess.


Pete Rigz(Posted 2008) [#42]
Quite odd this, ran it in debug and it gets to round 64 and grinds to a halt, memory just keeps going up so there's a leak there somewhere. The leak doesn't seem to happen till later in the game though when there's a lot more bullets and enemies on screen.

Will delve in some more at some point.


Perturbatio(Posted 2008) [#43]
I'm not getting a leak, so no crash this time, but the sound does still die at around level 30


Helios(Posted 2008) [#44]
Ech, I hate problems like this. Impossible to find if I can't recreate them >.<.


chwaga(Posted 2008) [#45]
sound dies later for me, around 60-70, I forget. I had a freaking sweet score, over 20,000 points, i should have taken a screenshot...


Helios(Posted 2008) [#46]
Anyone wana take another attempt at debugging the code? I've been unable to recreate any of these problems, so I'm finding it really difficult to find out exactly whats causing it.


Who was John Galt?(Posted 2008) [#47]
No problems here and ran it for hours.


z80jim(Posted 2008) [#48]
I'd love to :( but I can't open rar format... I have no application to do so lol. I'm not even sure what rar format is...


Who was John Galt?(Posted 2008) [#49]
z80jim get hold of 7zip off the net. It's free... it's great.. the only zip manager you'll ever need.


z80jim(Posted 2008) [#50]
that's only for pc's... I have a mac which is probably the problem in the first place.


z80jim(Posted 2008) [#51]
I found a program to unzip it and I have all the code but I can't get it to run it's finding errors left and right...


Helios(Posted 2008) [#52]
Sure you have the latest version of blitzmax? Modules all syned up?

Theres no platform dependent code within the game as far as I'm aware so it *should* work.


z80jim(Posted 2008) [#53]
I do have the latest, the only extra module I have is GUIMAX so I have MAX2D and GUIMAX. When I first tried running it, it had a problem with this line.
SetGraphicsDriver D3D7Max2DDriver()
I'm not sure what it is but it sounds like an extra module that I need to purchase to compile it. After commenting that out, it has a problem with your very first type it says error type tsettings, which TDefenceGameSettings is an extent of, can't be found, so I'm assuming it'll have a problem with each successive one it comes across. I'm trying to compile it from TDefenceGame.bmx.


Who was John Galt?(Posted 2008) [#54]
Commenting that out shouldn't cause you a problem - it's setting the game to use direct X, whereas you just want it to default to OpenGL. The rest I have no idea.


Helios(Posted 2008) [#55]
Don't compile from that file, compile from Defence.bmx.

You may also have to remove the DirectX7 driver initialization (thats what the SetGraphicsDriver D3D7Max2DDriver() code does), as that is obviously not going to work in mac.


z80jim(Posted 2008) [#56]
by commenting out that line then compiling defence.bmx it worked. btw, the spelling is defense not defence thats a mistake I make all the time too lol.
It looks really great, but most tower defense games allow for buying towers during the round too... I only played about 5 levels, so I didn't reach the bugs some mentioned but from what I saw you did a really great job :)


Helios(Posted 2008) [#57]
Maybe in the US, but the correct English spelling is Defence.

Oh and BTW, if you have got it running on mac, make sure to upload some binarys for everyone else :).


z80jim(Posted 2008) [#58]
binarys.... you mean the compiled product? Sorry not good with terminology lol.


Helios(Posted 2008) [#59]
Yar.


z80jim(Posted 2008) [#60]
I tried and it didn't work when I downloaded and tried running it. It froze and I had to force quit it. I will try to get it working as soon as possible for you though!
And yes, in the US it is defense I prefer english spellings of words to US lol.


Firstdeathmaker(Posted 2008) [#61]
Hmm, the machinegun towers are too strong. You can always survive just building a lot of them in the beginning without upgrading them. That shouldn´t be! Maybe you could make the damage difference between the standart machine gun towers and the other special ones much more bigger?

Or make more upgradelevels and increase the health of the creeps much faster.

Very nice game, I kept addicted about 4 Hours playing one single map!


Helios(Posted 2008) [#62]
Alright, I'm going to try and balance most of the system. But at the moment I'm more concered with finding the bug that appears to be crashs it on numerous computers.


Jesse(Posted 2008) [#63]
I tried the executable you posted and it crashed on me after round 24. then after I downloaded your source code and compiled it and it worked fine. I played it up to round 86. with out any problems sound or crashing. could it be you don't have bmax properly setup or you forgot to incbin something?


Helios(Posted 2008) [#64]
No the source code and media is in the exact state it was compiled in :S. And as far as I know BMax is setup fine, I've used it on several projects, all of which work fine.


Firstdeathmaker(Posted 2008) [#65]
Your Server seems to be unavailable. I cant load the source and I cant submit Highscores.

Edit: I found another bug: If I reach 10.000 Points, the counter is jumping down to 0.


z80jim(Posted 2008) [#66]
"Hmm, the machinegun towers are too strong. You can always survive just building a lot of them in the beginning without upgrading them."
that's weird... I tried it for about 5 rounds, all I did was build machine gunners as fast as possible, but I was dying anyways. I was putting them at strategic locations too....

helios I noticed another thing that sets yours apart from most. Most ones almost never or simply can't miss their target, but I'm experiencing lots of misses with yours. Is this intentional, or do you just not feel like doing all that math? lol.

PS. If you want them to always hit but dont want to do that math, simply make them "homing" bullets. If the bullet moves fast enough no one noticed.


Helios(Posted 2008) [#67]
'Your Server seems to be unavailable. I cant load the source and I cant submit Highscores.'
- Sorry, server has been experiancing down time recently. Should work now.

'If I reach 10.000 Points, the counter is jumping down to 0. '
- Yeh it pads it to 5 characters, meaning if you go over 5 it shunts the 1 it the left. I'll fix it when I get a chance.

'helios I noticed another thing that sets yours apart from most. Most ones almost never or simply can't miss their target, but I'm experiencing lots of misses with yours. Is this intentional, or do you just not feel like doing all that math? lol.'
- Yeh its intentional, rather than have the bullets home in on the target, it fires at the last known position of the target. Its meant to make it slightly harder, meaning you have to have a good line-of-sight to hit the target. I think it just makes it more of a pain in the arse though.


Who was John Galt?(Posted 2008) [#68]
No Helios! I thought the guns missing was annoying at first, but in the end I thought it was good as it adds to the tactics of the thing. Maybe you should start with big, weak ships and end on smaller, tougher ones that are better at avoiding the bullets. Track prediction could be added as an upgrade.


z80jim(Posted 2008) [#69]
I was gonna say that nomen lol it IS a pain but they should get better with each upgrade, and maybe have a special sniper turret that's 99% accurate.