[3.1.1+] Tower Defense (engine and maps)
Posted: 04 Dec 2013, 10:45
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.
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.
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).
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.
- 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.
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.
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).