Page 1 of 4

[3.1.1+] Tower Defense (engine and maps)

Posted: 04 Dec 2013, 10:45
by NoQ
I think i have it finally working and challenging. This is a "tower defense"-style survival challenge: enemy throws infinite number of tanks at you, you loose when your command center is destroyed, and you need to build towers on highground to kill enemy tanks to prevent them from reaching the CC.

Previous attempt, if i remember correctly, was in this thread.

Scenario script is very simple; under 700 lines of javascript, mostly comments. So it should be very easy to make more similar challenges, or even tower defense campaigns.
  • screenshot.jpg
    screenshot.jpg (54.42 KiB) Viewed 47135 times
Installation:
  • Does not work on 3.1.0! Try 3.1.1 (RCs are fine too). Will most likely not work on master/3.2 yet.
  • Install as a challenge map. That is, i had to put the file to both maps and mods/autoload folders to make it work.
  • If you installed everything correctly, you can go to single player challenges menu and choose the tower defense challenge.
  • Save/load games: not supported yet! Not sure why it crashes, will investigate.
Game rules:

Due to wz2100 pecularities as a game and non-omnipotence of our scripting API, some of the game rules are quite different from common tower defense games, and i find some of these twists quite fun.
  • Enemies fire back! If enemy carries a weapon that can fire on move, he will not hesitate shooting at your towers or even trucks a few times while passing by. This gives a variety of choices between stronger and weaker towers carrying the same weapon (put bunkers where enemy flamers don't reach, put hard towers first and high-damage towers second, etc.), requires managing trucks to repair towers, and managing repair tanks and facilities to repair trucks.
  • Researching base structure upgrades will make your CC harder. But any HP% it looses is unrestorable! You would like to upgrade hardcrete also to make your towers stronger, and probably even upgrade tank armor to make tanks stronger. Only upon researching auto-repair will you be able to restore your command center.
  • Most indirect-fire enemies would not fire at your towers. But beware of enemy long-range arty: it will shoot your CC from a distance as soon as your CC is in sight range of other enemies!
  • Droid design is disabled, but you are still given some fixed templates, including better trucks and repair tanks, and even some VTOL templates!
  • Nexus tower would allow you to take control of enemy tanks, good luck.
  • Enemy does not use VTOLs yet (not sure how to script their return after each run in 3.1).
  • The engine supports regenerating enemies (by giving some enemy players auto-repair at start) and enemies coming from multiple directions, but not quite yet multiple command centers. Difficulty can also scale up with armor upgrades.
Distribution:

The engine and maps in this thread are distributed under Creative Commons CC-0 license. I'd throw engine updates with new maps, not sure it's worth it to post the engine separately somewhere on github (and how to do it when half of the code is map-specific).

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 04 Dec 2013, 10:46
by NoQ
First map to check it out.
  • Three sorts of enemies using different bodies are coming from three directions. You have a few good spots for early towers, and a shortcut for enemy hovers.
  • You get around $100 for destroying every wave of enemies, this includes both normal waves and boss waves. You may seem to have a lot of money at start, but later money will be more and more valuable. You also have an oil derrick for continuous income, which makes you want to research power upgrades.
  • Enemy receives one layer of armor upgrades every 5 minutes.

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 04 Dec 2013, 15:31
by crab_
Very interesting!
I like Tower Defense :)

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 04 Dec 2013, 17:37
by montetank
What a nice surprise. Thanks NoQ. :-)

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 05 Dec 2013, 22:03
by crab_
Played 1 hour and 30 minutes.
My defenses was stronger than enemies.
Did not noticed 'boss waves'

NoQ are you sure you upgraded armor of attacking units? :)

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 05 Dec 2013, 22:26
by NoQ
Ah, at least someone managed to run it (:
My defenses was stronger than enemies.
Yeah, i also think this first challenge is too easy.
Do you feel that faster progression is necessary, or just make stuff overally stronger?
Did not noticed 'boss waves'
Every 10th wave should have less-but-stronger units. You should have been seeing light cannon retribution as the first boss.
NoQ are you sure you upgraded armor of attacking units?
No idea. I do completeResearch(...) on enemy players, and it usually works as i expect ... :hmm:

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 05 Dec 2013, 22:29
by crab_
NoQ wrote:I do completeResearch(...) on enemy players, and it usually works as i expect ... :hmm:
just noticed at 1:46 my half-upgraded bombard damaged 20% per-shot to enemy mantis half-tracks.
I think enemy armor was not upgraded well.

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 05 Dec 2013, 22:42
by NoQ
Maybe tomorrow :stressed:

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 05 Dec 2013, 22:49
by crab_
NoQ wrote:AYeah, i also think this first challenge is too easy.
Do you feel that faster progression is necessary, or just make stuff overally stronger?
I think you can increase armor of enemy units. And increase hp 5 times.
Enemy waves die very fast.

May be add few more types of towers...

Certain weapons are overpowered.. e.g. i think rocket tech is best choice

Most dangerous wave is seraph tanks

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 05 Dec 2013, 22:51
by crab_
I want team TD game.
Do this mod will work as map-mod?

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 06 Dec 2013, 00:06
by montetank
I survived only 70 minutes-because my wife began to be angry :lol2:
Yes- i think it is to easy. I cheated later with biffer baker and saw, that the archangels and other artillery of the enemies didn`t fire. There are no sensor-units. And yes-seraph is most dangerous. Nothing changed after 4 hours: more and more units but no dragons for example.
The tower defense makes fun-a very interesting challenge. But maybe the idea of a time limit is possible. For example: If you survive 2 hours you win the challenge.

Greetings and as usual sorry for my bad english

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 06 Dec 2013, 18:54
by NoQ
Figuring out why upgrades don't work. Still don't understand: eg. when i unlock autorepair for the enemies in a similar way it gets applied instantly.
I think you can increase armor of enemy units. And increase hp 5 times.
Enemy waves die very fast.

May be add few more types of towers...

Certain weapons are overpowered.. e.g. i think rocket tech is best choice

Most dangerous wave is seraph tanks
Changing the game data is not really the first thing i like to do. I think it's necessary for the fun to have the game work on vanilla stats first; though some later maps would probably find good use for different data.
the archangels and other artillery of the enemies didn`t fire. There are no sensor-units.
I already covered this in the description. Sensor units won't help until they actually reach close enough to your CC; but in this case normal tanks would work almost equally well, i did test that. Would be much more fun when i figure out how to implement VTOLs, then they would trigger arty fire as well.
Nothing changed ... no dragons for example.
Give a second example of what has not changed? (:
Just did not touch dragons yet.
I want team TD game.
Do this mod will work as map-mod?
I'm planning multiplayer support, but not yet sure if there would be no blocking issues with sync. Most importantly, i wonder how to implement smooth enemy strength growth without hardware-specific floating-point arithmetics, given javascript does not support integers at all.
But maybe the idea of a time limit is possible. For example: If you survive 2 hours you win the challenge.
Not really time limit, but rather campaign mode: a puzzle consisting of limited number of pre-defined (and well designed) waves. We can do that already.

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 06 Dec 2013, 20:47
by montetank
I am sure-you will find the best way- this challenge makes fun. Thats what i want to see here. Thanks NoQ. But--You are wrong with the sensors. Archangels and rippelts don´t work without sensors. Only the howitzers can work without sensors under command of....and the seraphs. So i saw about 5000 thousand archangels and ripples and stupid howitzers without an idea....try to attack me-but i lost the interessest.
This mod is a very nice one. Want to see more. Maybe a map with 2 oil derricks- i need 4 trials to see, how to solve this chellenge.
However-thanks NoQ-and i hope, that there will be some more maps with this idea. The Campaign-idea for the future is great :-D

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 06 Dec 2013, 20:55
by NoQ
Archangels and rippelts don´t work without sensors.

Re: [3.1.1+] Tower Defense (engine and maps)

Posted: 06 Dec 2013, 23:23
by montetank
Boom!!-without joking, NoQ-where are all my towers gone? :lol2:
I am sure, that you will find a way for this problem-as for the savegame too.
So far-it whould be nice to see more of this challenges. More maps-.thanks for the Remember of tower defense.