Tower Defense Full Version!

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Rate the Difficulty of this game:

Too easy
11
46%
Too hard
1
4%
Just right
12
50%
 
Total votes : 24

Re: Tower Defense Full Version!

Postby grimlog » Wed May 12, 2010 7:02 pm

I really love this game. I am looking through the .ged file and I am trying to find the path the creeps take every time the level begins. I wan to change the path, but I cannot seem to find the script that handles the path following or is something else going on to which I am completely oblivious too. Which is a great possibility 8)
How do I adjust the creep health, speed?
Thank you for your time and answers.
User avatar
grimlog
 
Posts: 10
Joined: Mon May 10, 2010 10:22 am
Score: 0 Give a positive score

Re: Tower Defense Full Version!

Postby grimlog » Wed May 12, 2010 7:24 pm

Okay, found it. It is in the control script, where the case changes and then there is the turn x turn y for each difficulty level, to achieve those coordinates, did you first draw the path over the path object, then enter those into the script or does game-editior automate that by the path finder? I ask becuase when i click on the path menu in GE, I find no existing path.
User avatar
grimlog
 
Posts: 10
Joined: Mon May 10, 2010 10:22 am
Score: 0 Give a positive score

Re: Tower Defense Full Version!

Postby DST » Wed May 12, 2010 10:20 pm

No, i made those paths by hand (programmed the numbers in ).

In retrospect, a level editor would be a better way to do it.

In my newer games, my pathfinding works like this:

All squares start as 0.
The start of the path is square 1.
The next block is square 2, then square 3, and so forth. Turns do not have to be labelled as turns anymore.

All the way up to the final block, at which the creep returns to square 1.

In this way, keep the creep looking for the largest block it can find; at any given point, that will be the next one, whether it is in front or turns.

You can even split paths using this method, where say at block 10, we split into two, so there are 2 block 11's. Program the creep to pick one randomly whenever it finds two of the same number.

So the left path goes from 11-20, but the right path is shorter, say, 11-18. The block that joins the paths again will be block 21, so no matter which path you came from, it's still the highest number.

And as well, you can then program a 'threat' option in the tower targeting, where they pick the creep with the highest 'mysquare', the block the creep has determined itself to be in. This would be the creep closest to the finish.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Tower Defense Full Version!

Postby grimlog » Thu May 13, 2010 2:03 pm

Yes, that sounds amazing, would really open the dynamics of game play. I was thinking of adding a firing mechanism to the creeps along with health meters to the towers. I was also thinking of adding some traps for the creeps to walk over, but are manually set off for interactivity. The control script is the script to change creep health, speed and such? I suppose I just change the variable value?
Are the laser beams drawn by the script or are they animated? How can they be altered?

Again, thank you for such an education and uploading the files, this helps tremendously in my learning curve. :mrgreen:
User avatar
grimlog
 
Posts: 10
Joined: Mon May 10, 2010 10:22 am
Score: 0 Give a positive score

Re: Tower Defense Full Version!

Postby DST » Thu May 13, 2010 7:07 pm

The lasers are drawn by canvas; with series of semi-transparent lines.

So make another array, and in this one, you can store the trap value of the cell;

In the creep script, have two values: mycell, their current cell, and prevcell, the last cell they were in. So then a creep looks at the other array(s) only if the two do not match; then at the end of its draw frame, set prevcell to mycell;

So now the creep will take trap damage, or terrain speed adjustments, only once upon entering the cell.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Tower Defense Full Version!

Postby grimlog » Fri May 14, 2010 1:21 pm

is that what the laser1 and laser 2 region frame type things are for? I have made the paths different from the defaults with my own artwork, and I have made the towers themselves 20x20 instead of 32x32, in the draw actor script is specified 20 20 as well, but now it seems not to place my towers flush with the path. Do I need to readjust some grids, my prefs are ste now for a 20x20 grid. but still no flush placing, I know I am missing something. My path is independent of the bg picture, it overlays perfectly with it. Is there a path size call out in the script I am not finding?
User avatar
grimlog
 
Posts: 10
Joined: Mon May 10, 2010 10:22 am
Score: 0 Give a positive score

Re: Tower Defense Full Version!

Postby DST » Fri May 14, 2010 2:06 pm

The laser 1 and laser 2 are canvas actors, they draw the lasers and health bars.

If you look in the tower>draw actor, you can see the lines that say:

x=(round(xmouse/32)*32)+16;
y=(round(ymouse/32)*32)+16;

this snaps it to 32 x 32. To snap to 20, the code would be
x=(round(xmouse/20)*20)+10; //snap to 20 and then offset by 10 (because actors' xy is their center).
y=(round(ymouse/20)*20)+10;

However, you also need to change the size of the tower arrays, because the tile number is 300, but you need a much bigger grid than that. 24 across by 24 down, (and no longer including the menu). So that's 576 for the tower arrays.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Tower Defense Full Version!

Postby sonicfire » Sun May 16, 2010 9:23 pm

Simply amazing ... tried it and am now playing it for 2 hours already :D Excellent job!!
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Re: Tower Defense Full Version!

Postby DST » Sun May 16, 2010 10:16 pm

:D thanks!
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Tower Defense Full Version!

Postby sonicfire » Sun May 16, 2010 11:04 pm

sonicfire wrote:Simply amazing ... tried it and am now playing it for 2 hours already :D Excellent job!!


...5 hours and counting :lol:
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Re: Tower Defense Full Version!

Postby Hblade » Mon May 17, 2010 2:11 pm

This is very nice! :D thanks :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tower Defense Full Version!

Postby Hblade » Mon May 17, 2010 2:24 pm

This game has inspired me to make an adventure type TD game... Where there is a story :o Thanks DST :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

80000+

Postby Hblade » Mon May 17, 2010 3:51 pm

hey look :3 round 2 pwnt
pwnage.JPG

pwnage2.JPG

lol.. Just thought I'd share that >.>

Look at the damage on this lazer xD
trtrhtrhtrh.JPG

I'ma firen mah lazar!

yeah its 32,000+ now :3 It's gonna continue to get higher too xD



Edit again 41,000+

Edit again...
64,000+ damage per frame... no boss alive can beat that xD
125,000+
244,000+ damage per frame
478,049 damage per frame is the highest I can get it xD
scrensafafadfg.JPG



Heres one with over 2,600,000 damage per hit...
26mill.JPG


xD :D Fun... but now it got boring for a while lol
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tower Defense Full Version!

Postby foleyjo » Tue Nov 30, 2010 4:02 pm

Hi

I was wondering if you could give me a bit of advice.

This is a great game but I've been looking through the code and there's one thing that I can't figure out.

How are you creating the lasers and health bars.

I found something that suggested they are done by using canvases laser 1 and laser 2. However they all seem to work independent of each other which I thought wasn't possible
KISS -Keep It Simple Stoopid
foleyjo
 
Posts: 275
Joined: Mon Jul 09, 2007 1:15 pm
Score: 15 Give a positive score

Re: Tower Defense Full Version!

Postby friedfish » Sun Apr 01, 2012 2:59 am

is DST still active? or anyone that know the workings of the game... I'm trying to find how he did the health bars found on the head of the creeps and i wanna see how he is doing it but i can't seem to find it... i dont know if posting here is ok but if anyone knows it would be great... thank you so much!... :)
User avatar
friedfish
 
Posts: 75
Joined: Wed Mar 14, 2012 2:31 pm
Location: UK
Score: 7 Give a positive score

PreviousNext

Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest