PDA

View Full Version : [Single Player Map] Slither Madness (TD-Pacman-Bomberman + AI) v1.03



an7hraxjax
01-30-2011, 02:28 PM
Welcome to the World of Slither Madness !

I am making some single player mini-games to learn how the editor works ...

Download links (you need both files)
!!! WARNING : the base.gamemechanics is old and might bug your game - solution : put base.gamemechanics in the resources folder of bomberman.s2z (this is just a zip file). I will fix this when my new version is ready.
Part 1 : Download Slither Bomber Pacman Party, with prototype AI ! (v1.03) (http://www.mediafire.com/?yd4hy5698j7hdhq)
Part 2 : Download part 2, containing music and base.gamemechanics (http://www.mediafire.com/?0bg9lfjc5clux5m) (same since v1.02)

Featuring MadSlither, Runes, Pacman Noms and ... MadBomberAI (very basic though :D) ...
Also, I've got a maze generating algorithm, with automatic entitylist and entity generation.
So if you're bored by this one, reply in this topic and I'll post more maps!

How to play :
- download
- put the bomberman.s2z mapfile in C:\Program Files\Heroes of Newerth\game\maps
- put resources1.s2z in C:\Program Files\Heroes of Newerth\game (rename it to resources1_bomberman.s2z if you want)
- create game on practice mode, with the map "Bomberman 1_3"
- disconnect and create again. this is because the custom files won't be loaded the first time
- ???
- profit !

Let me know what you think about it, I'm open for suggestions !

Goal of the game :
Collect Noms and try to kill the Bombers by outsmarting them! Use mines (1st ability) to damage them, escape with blink (2nd) and get map control with wards (3rd)
Start careful and put some wards :) then collect Noms to gain experience and level your bombs ... carefull though. They hurt.

http://img849.imageshack.us/img849/5429/shot0002.jpg (http://img849.imageshack.us/i/shot0002.jpg/)

Changelog :

v1.03 (small update)
- Give items to MadBombers with your Fortification key
- This results in 7 levels of difficulty !
- Beware : they only get stronger, you cannot inverse this (yet)
v1.02
- MadBombers wanderrange reduced, no more Path Finding error console spam
- added respawn point for the MadBombers
- AI uses the spells a bit more often
- adjusted MadSlither Stats to scale a bit
- wards are flying now to give more sight, can be upgraded 3 times
- added awesome music :D
v1.01
- automatic maze generation with python script,
automatic generation of entitylist, location gadgets and states
==> a new map in 5 seconds :D
- first AI version : in every field there is a Gadget_Location_x_y ,
with a small aura, applying a state that commands (aggressive_wander)
where to go (up,down,left,right)
- Pacman Noms now sometimes drop Powerups providing a short boost
- first official release
v1.00
- creation of MadSlither, with 4 directional spray bombs
- grid based map, optimized for snaptargettogrid="256"
- Pacman Noms code, based on Balphagore
- mushrooms ...To do (as soon as I get some feedback on this game):

- make the original bomberman,
where you blow up crates (mushrooms) to get bonuses ...
but the AI is quite a bit harder here. I won't provide AI for this one.
AI is easy to code for pacman, it's harder to code it in HoN for bomberman (dynamic terrain)
- more bonuses : swap, kick bomb, bouncy bombs, teleporters, drifters, bombdrop sickness, trigger bombs, immunity
- levels and items on the AI
- a cooler/nicer map
- more heroes, more spells ... feel free to do this,
it's not very hard now the main script is working.This started as an easy Tower Defence game where you play as Slither and try to kill the creepwaves before they kill your racks. I am pretty new with the editor, and my goal is to get this map working asap.
This implies I'm not looking at cosmetics and content at the moment, all I want is a working TD. Feel free to make a nicer map with a better grid.

After a few hours of research, I was able to make a map, where you start as slither immediatly (no hero pick stuff), with creepwaves going to the racks.

Old problems :

The creeps stop moving when I attack them, how can I make them ignore Hero & ward attacks? I think it's in base.mechanics combattables, but I have no clue what to change.
Fixed by using attacktargetscheme="enemy_buildings"
Also, the creeps are Supercreeps from the start, even though the spawner has both melee and range racks as target.
But maybe I have to define the custom waves already (I hoped I could skip this for now)
Entity_CreepSpawner needs a laneNode, 2 enemy racks and an enemy Entity_CreepSpawner spawner as target0-3
How to code my own creepspawner, since the default requires an enemy creepspawner.
Look at Oloko's post in the Castle Defence Thread
How to make the creepspawner to spawn creeps that get stronger over time
(example : first minute = 200 hp, second minute = 300 hp + 2 armor , ... and so on)
Severon's TD explained this quite well.
How to use gold in spells ?

<foreachplayer>
<setent1 name="player_hero" />
<setgold entity="target_entity" value="200"/>
<givegold target="ent1" amount="100"/>
</foreachplayer>
and mess around with this. Alternatively, use a scriptvalue for all gold requiring spells and then use

<onframe>
<setgold entity="target_entity" value=some_script_value />
</onframe>not sure if the second one works though.
I used a mana system now and it works pretty good. You can upgrade the wards if slither has enough mana.
How to make typical Bomberman bombs .. spawn 4 toxic sprays, with direction north east south west. Preferably with a delay of 3 seconds.
Spawn Dummy units with offset and push_entity="true", spawnprojectile target=stack_entity


My current problem :
Some pathing errors. No big deal atm.
Also, if some could look at the end of my game_info.entity ... I made an attempt for a winning condition ... but it doesn't work yet :)

Credits :
Oloko, Bangerz, ElementUser, Idejder for the great guides
Hot_To_Go for the youtube vid that got me started
FlameStick for the pacman concept

Tnx!

FlameStick
01-30-2011, 02:35 PM
I think by making Slither and wards invurnable to all damage will make them being ignored by creeps.

And the other part im not quite sure.

Btw looks good nice to see more people working on some projects :)

an7hraxjax
01-30-2011, 02:59 PM
I'll try adjusting the aggrorange first. Seems easier.

IamKongor
01-30-2011, 03:07 PM
Yea do it! I wanna try this map :)

an7hraxjax
01-31-2011, 10:46 PM
If someone can help me out with this one :
How to make the creepspawner to spawn creeps that get stronger over time
(example : first minute = 200 hp, second minute = 300 hp + 2 armor , ... and so on)

I am using the creepspawner described in the castle fight thread. I made a state that gets applied to the creeps, but how can I make this dynamic - change the bonuses it gives ?

Oloko
01-31-2011, 10:53 PM
Wouldn't you want to spawn a different kind of unit rather than only upgrading them? If that's the case, then you can look at the script in my Enfoes or at Severon's tower defense map (since he uses my script too it should be the same).

If you really want to give a bonus over time and not spawn different units, then I can tell you tomorrow when I have the time to, I need to go now.

an7hraxjax
02-01-2011, 07:09 AM
allright, tnx ! I didn't know that TD was already working ..

I'm good to go for a while now :)

an7hraxjax
02-01-2011, 10:39 AM
The creepwaves are working now, but I would like to know if it's possible to write in ability.entity:



<onimpact>
<condition test="charges eq 0">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Interval" target="source_entity" continuous="true" />
</condition>
<condition test="charges eq 2">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Wave1" target="source_entity" continuous="true" />
</condition>
<condition test="charges eq 4">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Interval" target="source_entity" continuous="true" />
</condition>
<condition test="charges eq 6">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Wave2" target="source_entity" continuous="true" />
</condition>
</onimpact>
...

as something like this

<condition test="charges %2 eq 0">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Wave # FtoA(charges/2,0)" target="source_entity" continuous="true" />
</condition>

it looks cleaner, but my syntax is wrong. Can someone help me out?

Oloko
02-01-2011, 01:47 PM
The creepwaves are working now, but I would like to know if it's possible to write in ability.entity:



<onimpact>
<condition test="charges eq 0">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Interval" target="source_entity" continuous="true" />
</condition>
<condition test="charges eq 2">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Wave1" target="source_entity" continuous="true" />
</condition>
<condition test="charges eq 4">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Interval" target="source_entity" continuous="true" />
</condition>
<condition test="charges eq 6">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Wave2" target="source_entity" continuous="true" />
</condition>
</onimpact>
...as something like this

<condition test="charges %2 eq 0">
<addcharges entity="this_entity" />
<applystate name="State_Spawner_Wave # FtoA(charges/2,0)" target="source_entity" continuous="true" />
</condition>it looks cleaner, but my syntax is wrong. Can someone help me out?

Sadly, I don't know of any way to do something like this.
I don't know how you could use a value, add it to a string and use that result as a name. I doubt that you can actually do something like this.
That is why I made so many conditions in mine.

an7hraxjax
02-09-2011, 02:45 PM
I'd like to bump this with these questions :

- how to make a spell that COSTS gold ? i can produce gold but not consume it :s.. maybe there is a way around by auto-buying a dummy item or so ? i'm stuck on this one.

- my main focus was on the slither wards, each of them has 4 upgradeable passive aura-skills like attack damage, speed, poison and slow. The problem is that it's a skill (at slither) that has a skill (at the ward) .. on upgrading i can set the level (this works ok), but at spawning, the ward skill levels are already maxed (not ok).
The skill level at spawn is the sum of slither skill + ward skill lvl (= 2 at least) ... i want it to be lvl 1 ...

I'll upload my map, since I've got some nice working and commented code to start singleplayer maps right away (skipping lobby and hero select), this might be usefull for other people.
Probably I won't take this map much further, since it's quite hard to balance a whole new TD, and I don't feel the need with the massive load of real good TD's out already. But it's a fun project with some code mechanisms that might be usefull to you if you want to make a map.

Oloko
02-09-2011, 04:38 PM
I don't know of a way to make spell cost gold. The only workaround right now for this is to make the player buy them rather than use a skill. :(

I want to make sure I understand the other point you mentioned. What you want is to level you ward skill and it will spawn a ward that is always level1. Then that ward can level by itself when making kills an such? I doubt it's what you exactly want to do, since leveling the ability doesn't seems to make much sense to me (ward would do the same damage at every level and all the same stats).

an7hraxjax
02-09-2011, 05:54 PM
Tnx for the help Oloko. I've uploaded my map, you can see for yourself if you want to.
To do so, just put a ward and activate the first 2 spells to lvl the auras, but you'll see that the aura's are lvl 2 atspawn. In further lvling they are ok.
The reason to put the levels explicitly is because the wards are related to the level of slithers 3rd ability (= spawn a ward).
I disabled further leveling slithers' 3rd ability here, but if you allow more levels, it goes like this :

assume slither 3rd is lvl 4. you put a ward, that has baselvl 1 in the definition, but if you look at the aura ... it's already lvl 5 !
The lowest lvl for slither to put a ward is 1 ... and with baselvl = 1 of the ward .. this sums up to lvl 2 automatic total baselvl onspawn.

Now my problem : i cannot reset it to lvl 1 in total ... maybe i should spawn an entity which lvl is not related the lvl of the spawning spell. Maybe S2 can add a variable to break the lvl relation between both, but i doubt this is needed.

Oloko
02-09-2011, 08:30 PM
You can remove the baselevel="1" from the gadget abilities, since it already has every ability level 1 when it spawn, so it only level it to 2.
With this now, when you spawn a ward level 1 it will have every ability level 1.

So if you want to be able to level Slither's 3rd ability to level 4 but spawn wards level 1 you can do the following:


<projectile
name="Projectile_Ebulus_Ability_03_Seed"

speed="2000"
gravity="15000"

modelscale="1.5"
model="/heroes/ebulus/ability_01/effects/model.mdf"

traileffect="effects/trail.effect"
>
<onimpact>
<spawnaffector name="Affector_Ebulus_Ability3" level="1" target="target_position" />
</onimpact>
</projectile>

We change the <onimpact> of the projectile to spawn an affector rather than spawning the ward. This let you use the level attribute to spawn the affector. Its sad, but you can't do this with <spawnunit>.

Now the new affector:

<?xml version="1.0" encoding="UTF-8"?>
<affector
name="Affector_Ebulus_Ability3"

lifetime="0"
>
<onspawn>
<spawnunit name="Gadget_Ebulus_Ability3" count="1" target="target_position" />
</onspawn>
</affector>

So you will have a ward level 1 at every level of Slither 3rd spell. But your ward will do the same amount of damage every level. I don't know if it's really what you want.

an7hraxjax
02-18-2011, 12:34 PM
It's been a while since I posted an update, well I've got a mana based upgrade system working. I'm now trying to make a slither bomberman :)

... but i've got some troubles with the explosion spell. Can someone help me to make activation of the first spell to spawn 4 toxic sprays, with direction north east south west. Preferably with a delay of 3 seconds.

I'm using a pharaoh inspired version now, but it doesnt work yet...
it spawns 4 dummy gadgets around and facing slither with angle 180 ... but i'm stuck there.

Oloko
02-21-2011, 10:01 AM
I think you could use something like this:

<setpos0 position="target_position" offset="250 600 0" offsetspace="source_entity" />
<spawnprojectile name="Projectile_Ebulus_Ability1" source="source_entity" target="pos0" />

<setpos0 position="target_position" offset="0 600 0" offsetspace="source_entity" />
<spawnprojectile name="Projectile_Ebulus_Ability1" source="source_entity" target="pos0" />

<setpos0 position="target_position" offset="-250 600 0" offsetspace="source_entity" />
<spawnprojectile name="Projectile_Ebulus_Ability1" source="source_entity" target="pos0" />

Here there is only 3 of them, but I think you get the idea. About the delay of 3 sec, do you mean they spawn one by one at every 3sec? If that is the case, maybe you should do a channeling spell with a state that impact every 3sec. With an accumulator and a bit of conditions, you could know what offset should be set to the projectile every 3sec.

an7hraxjax
02-21-2011, 12:19 PM
Tnx! Using these positions is better than what I did ..
Before this, I made a big mess of it ... I had an ability spawning 4 gadgets, each with an ability proccing a state to trigger a <useability ...> and popping a projectile.. it was terrible. But I know how projectiles work now :)

The delay is like a bomb in bomberman ... I'll look at bombadier's spell for this.

The cool thing is that it's easy to upgrade the bombs, just by increasing the lifetime (or ms) of the projectiles.

And the creeping model in ebulus ability_01 is so awesome. :)

Edit: somehow, it doesn't work with positions ? It's like I cannot spawn projectiles with an ability with actionttype="self_position"
setpos0 works well.

The ability :

<?xml version="1.0" encoding="UTF-8"?>
<ability
name="Ability_MadSlither1"

statuseffecttooltip="State_MadSlither_Ability1"
icon="/heroes/ebulus/ability_01/icon.tga"

anim="ability_1"
casttime="1000"
castactiontime="200"
casteffect="/heroes/ebulus/ability_01/effects/cast.effect"
maxlevel="3"
baselevel="1"
requiredlevel="1,2,3"

actiontype="self_position"

manacost="5"
cooldowntime="2000"

range="700"
forcerange="700"
>
<onimpact>
<spawnunit name="Gadget_Dummy_Explosion" target="source_position" offset="800 0" pushentity="true"/>
<spawnprojectile name="Projectile_MadSlither_Ability1" target="stack_entity" source="source_entity"/>

<spawnunit name="Gadget_Dummy_Explosion" target="source_position" offset="-800 0" pushentity="true"/>
<spawnprojectile name="Projectile_MadSlither_Ability1" target="stack_entity" source="source_entity"/>

<spawnunit name="Gadget_Dummy_Explosion" target="source_position" offset="0 800" pushentity="true"/>
<spawnprojectile name="Projectile_MadSlither_Ability1" target="stack_entity" source="source_entity"/>

<spawnunit name="Gadget_Dummy_Explosion" target="source_position" offset="0 -800" pushentity="true"/>
<spawnprojectile name="Projectile_MadSlither_Ability1" target="stack_entity" source="source_entity"/>

<!-- after a few times you can level this spell, to see the effects (range etc) at other lvls -->
<setent1 name="player_hero" />
<giveexperience target="ent1" amount="50"/>

</onimpact>

</ability>

The projectile


<?xml version="1.0" encoding="UTF-8"?>
<projectile
name="Projectile_MadSlither_Ability1"

speed="250"
gravity="0"
lifetime="1250,2250,3250"

impacteffect="/heroes/ebulus/ability_01/effects/impact.effect"
traileffect="/heroes/ebulus/ability_01/effects/trail.effect"
model="/heroes/ebulus/ability_01/effects/model.mdf,/shared/models/invis.mdf,"
modelscale="3.0"

canturn="true"
flying="true"
pathing="false"
flyheight="100"

touchradius="1"
maxtouchespertarget="1"
touchcliffs="true"
touchtargetscheme="all_other_units"
toucheffecttype="Magic"
touchradiusdiradjust="true"
>
<ontouch>
<damage effecttype="Magic" amount="50,70,90,120" />
<popup name="poison" a="result" source="target_entity" target="source_entity" />
<kill target="this_entity" source="" />
</ontouch>
</projectile>

It works here, with a dummy gadget to spawn the projectile to. If you can get it working with positions, plx let me know !

an7hraxjax
03-05-2011, 07:06 PM
Bump because it's updated :)
Newest map with AI running around
Download Here! (http://www.mediafire.com/?pjbkmrguzdq45qw)

an7hraxjax
03-17-2011, 09:27 AM
Updated to v1.02, with music, and less errors in console -.-
Link in OP.

Rubidxx
03-19-2011, 06:52 PM
Lool this game is great, had fun while playing it, but i think it becomes very easy at the end, when all i have like vision over everything on the map. Do you think you could like, set difficult yourself, like make 3 mazes on 1 game, and you can choose to play on 1 of them whitch is easy, medium or hard? that would be cool

Mattisamo
03-20-2011, 02:59 PM
I downloaded this mad today and I can only say that it is awsome!
next time make it possible to play several peoples where everyone is Slither and the one with most Cookies(nom-noms) eaten/most kills wins the game or first to a set amount of Cookies(nom-noms) or kills.

an7hraxjax
03-20-2011, 05:42 PM
Oh big tnx for the feedback guys. You made my day !
I can make a winning mechanism as you describe it, but I wanted to wait until there is multiplayer support.
Also I've played Atomic Bomberman from 1997 a lot with mates lately, and I'm planning to port that gameplay.
This means:
- no more noms ... the pacman concept is because it's quite a bit harder to make bomberman bots compared to pacman bots (that just run around). The dynamic terrain in real bomberman is one of the problems to tackle.
+ mushrooms that drop power-ups and upgrades
+ one bomb at a time (upgradeable to more, like in-game slither wards)
+ kick bombs (sliding), throw bombs, bouncy bombs
+ illness : bomb farting, slow ms, mini bombs, fast bombs, silence, swap
when you are sick you have to spread your illness by touching other players
+ custom skins, like balphagore, andromeda, soulreaper have skills that can easely be edited into bomberman bombs, just look at my code.
+ more areas.
+ custom scoring system. This is quite hard now, I'm waiting for a guide, with custom scoreboards etc.

A lot of stuff that I could do, but I'm working on a secret project full of awesomeness atm. And on my Age of Empires port.

I'm hoping someone can explain to me howto use the <onlevel> tags ... if you got them working, let me know!

haschisch
03-20-2011, 10:32 PM
i didn't test the map. i just visited this topic because i read in the short description in the forum's startpage "[single player map]Slither..." and thought that it might be a map with enemy heroes running in typical patterns and the task was to hit them with different levels of your slow at different ranges.
ergo a training map with scores depending how good you do and increasing difficulty (boots or just higher ms on the targets, haste on targets, random usage of blinking abilites from the targets).

i know this is a bit off topic, but wouldn't it be a great opportunity to learn how to script several things with the editor? after the basics are done it could be turned into quite a big project, including other skillshots and evasion from skillshots.

an7hraxjax
03-21-2011, 08:12 AM
If you look for a map to practice skillshot to a random moving bot, I suggest you look at the valkyrie wars map. But the concept of training maps for HoN ... I don't think that will be very exciting.
Making the bots more intelligent is quite hard as well. It is possible, but the xml style scripting is not ideal to script complex algorithms. I need a bit more functions (fe modulo operation) and information about the available functions (setposX needs some love). The big guide isn't complete yet.

In the end, I could put a lot of effort in improving the bots a bit, but I don't think it's worth it atm.

KLIM
03-24-2011, 11:08 AM
Fun game, it got some potential :)
But it's to easy though, and can you make it possible for the both your self and bombadiers to destroy the wards?
I placed a ward on top of a coin, which make it unpossible to collect.
Maybe spawn the bombadiers a bit faster.

an7hraxjax
03-24-2011, 11:38 AM
Tnx for feedback!
Your bombs can kill the wards.