After looking at the map itself, I think this will probably be as far as my contributions go. Map's a little too small for my liking and I'm not at all a fan of maps I can't make mazes in.
We make a trigger by ourselves and then look it over with the community and tweak it? Because i see several possible options for this, im just not sure how far I can take it without coming to a random roadblock of glitches, like most of my spawning systems come to where it decides not to listen to me.
Your spawn system seems solid, but there is a problem with the guidance system. If there is a wall between the unit being ordered and the destination, AI pathing will take over and can produce undesirable results.
It would almost seem easier to just place a point at every directional change and, when the unit is spawned, order it to move to every point in order (after existing orders.)
EDIT: I've made the following changes to the spawn trigger -
That would work, then just apply the path to every route if a unit spawns randomly across the map. FOR EXAMPLE:
Save Random integer between (routes 1- X amount) to data table
If then else
Random integer (data table) =1
Create unit (any unit) im sure you could use this to spawn more types of units randomly, more on this after i get home :)
Issue Order (Move) last created unit Point 1
Then just add on to that and tweak it to fill its slot.
You could use control triggers to make sure the amount of units are saved and then just turn the trigger off when it gets to whatever you feel like.
But thats just my idea. Im sure another could work.
Edit: For some reason i avoided the idea of waves entirely, I will now attempt a TD with using waves MUAHAHA! Genius...
There will not be any mazing in this map, whilst I love being able to maze, the concept isn't easy to grasp for many players and I would like to create something simple that everyone can play. So the roads are going to be unbuildable. creeps will travel on their own towards their destination the only threat to them is the towers bombarding them from the sideline
you can do that or you can look over others and tweak theres and reupload, but we want to be heading towards a final result that is efficient and clean
Take a look at the map :) this won't be possible, everything will be working same cliff level, and all towers are going to have small range, cliffs arn't ideal
Mmmm don't plan on races, just one race. adjusting difficulty and what map you do shall be enough variation :) Try to keep this thread trigger based, in the main community thread you can bring up ideas :)
@BasharTeg: Go
I expect some kind of building blockers on the lane, it should be impossible to block the creep, so if adjusted my system should always work
without any offense, yours is not a good solution, I'm trying to tell why:
-you double the saved points.
why do you want to copy all points from one array into another whenever a player selects a map? just use the map[player_selected_map_id].points[i] where you have to save all points on init instead of the later copy points[player][i].
-arrays aren't flexible. I have thought about some kind of arrays too, until I took a look at the actual map and it is hard to guess the number of points a map needs. creating a long array for every map, even if it just don't need any, like the 3rd is bad.
-biggest flaw: your method only allows one set path and no random left rigth at crossways (saving every possible path into an array is stupid)
this leads to the need of a dynamic, relative, endless scaling system
my way is a good start I guess, there are some thing to optimize, but it is easy to add new maps, you just copy some points and add them to the directional movement trigger as event
and it works with regions as well. you could just add an entered region go_south event to the existing triggers
Is it possible to use units instead of points? Since you could use the uservalue of the units for the path. Example:
Unit 1 (start) uservalue index 0 = 1. That means there is one possbile path. Index 1 = id of the next unit.
Unit 2 (node) uservalue index 0 = 2. That means there are two possible paths. Index 1 = first unit, Index 2 = second unit.
End the end unit has a index 0 = -1 or something like that.
the idea to use units is nice, but I don't like the idea of a defined path.
the advantage of units instead of points is, there are triggers like:
get all units in region of type (maybe left) create region at unit
add last created region to run left regiongrp
event unit enters region
if triggering region is in regiongrp run left
order unit move left
Path Unit UserValue Index 0 = 2 ( there are two possible ways )
Index 1 = Way one.
Index 2 = Way two.
You chose the way throught a random int.
Btw. does stun interupt the order queue? If not you could set the path on creep creation through queueing the movement orders.
You could also use unit comes in range event and different unit types. But you would need many unit types. ( left, left or right, left or right or up ... )
hm but you have to set the user value for every path unit. this is a lot of work, if you have 20 maps with 4-20 movementpoints each
stun does interrupt movement, this is why we should use 0.001 movementspeed isntead of a real stun
you would need 10 unittypes, 4 NESW, 4 diagonal, 2 random
if you use the uservalue you have to set 400+ user values all by yourself and if you move a single unit the path is broken
if you want to cover every possible cross-way, it is going to be 8*7 = 56 random units
not good, but still way better than 400-500 uservalues you have to initialise in a trigger
or is it possible to set the uservalues in the editor, if you double click a unit?
The performance with my way (uservalues) is way better than your way. You have to create 56 units, I have to create 1. You have to create 56 different triggers or one trigger with 56 ifs. For my way you have to initialise only these paths you will need in this games. So only the amount of players you have. Then you have an additional problem. What happens if ther is something like a "H" so there is a way that they can come from the the base of the H and walk up to the first cross way. There they go left or right and when they reach the other side they can walk back and forth again ...
Your way would need like 20 times more time to load then mine. Since you want to create also rects and have to laod 56 times the units I have. And the most of my code would be loaded when the player chooses a map...
And I wouldn't say your method is faster to do. I mean 56 units are a lot. And you have to search always the right one. And creating them uses also time.
Btw. I've begun with writing my idea in galaxy. (need it also for my self).
@b0ne123: Go
After looking at the map itself, I think this will probably be as far as my contributions go. Map's a little too small for my liking and I'm not at all a fan of maps I can't make mazes in.
We make a trigger by ourselves and then look it over with the community and tweak it? Because i see several possible options for this, im just not sure how far I can take it without coming to a random roadblock of glitches, like most of my spawning systems come to where it decides not to listen to me.
@b0ne123: Go
Your spawn system seems solid, but there is a problem with the guidance system. If there is a wall between the unit being ordered and the destination, AI pathing will take over and can produce undesirable results.
I'll keep looking at it...
It would almost seem easier to just place a point at every directional change and, when the unit is spawned, order it to move to every point in order (after existing orders.)
EDIT: I've made the following changes to the spawn trigger -
Move Points[][] is an array of points which are set for each player when he chooses the map he wants to play on.
Map Chosen By Player [] is a region array of every map in the game and is set at game initialization.
@BasharTeg: Go
That would work, then just apply the path to every route if a unit spawns randomly across the map. FOR EXAMPLE: Save Random integer between (routes 1- X amount) to data table If then else Random integer (data table) =1 Create unit (any unit) im sure you could use this to spawn more types of units randomly, more on this after i get home :) Issue Order (Move) last created unit Point 1 Then just add on to that and tweak it to fill its slot. You could use control triggers to make sure the amount of units are saved and then just turn the trigger off when it gets to whatever you feel like. But thats just my idea. Im sure another could work.
Edit: For some reason i avoided the idea of waves entirely, I will now attempt a TD with using waves MUAHAHA! Genius...
@Saeris: Go
There will not be any mazing in this map, whilst I love being able to maze, the concept isn't easy to grasp for many players and I would like to create something simple that everyone can play. So the roads are going to be unbuildable. creeps will travel on their own towards their destination the only threat to them is the towers bombarding them from the sideline
@Zoombiekilla: Go
you can do that or you can look over others and tweak theres and reupload, but we want to be heading towards a final result that is efficient and clean
If the path is un building just make the actual path a different cliff level......
then you just need to tell the units to go from point A to point B.
@SouLCarveRR: Go
Take a look at the map :) this won't be possible, everything will be working same cliff level, and all towers are going to have small range, cliffs arn't ideal
Is there gonna be races? Should be a ghost, Slow strong long rage snipe tower :) or at least longer range then the others XD
@Zoombiekilla: Go
Mmmm don't plan on races, just one race. adjusting difficulty and what map you do shall be enough variation :) Try to keep this thread trigger based, in the main community thread you can bring up ideas :)
@BasharTeg: Go I expect some kind of building blockers on the lane, it should be impossible to block the creep, so if adjusted my system should always work
without any offense, yours is not a good solution, I'm trying to tell why:
-you double the saved points.
why do you want to copy all points from one array into another whenever a player selects a map? just use the map[player_selected_map_id].points[i] where you have to save all points on init instead of the later copy points[player][i].
-arrays aren't flexible. I have thought about some kind of arrays too, until I took a look at the actual map and it is hard to guess the number of points a map needs. creating a long array for every map, even if it just don't need any, like the 3rd is bad.
-biggest flaw: your method only allows one set path and no random left rigth at crossways (saving every possible path into an array is stupid)
this leads to the need of a dynamic, relative, endless scaling system
my way is a good start I guess, there are some thing to optimize, but it is easy to add new maps, you just copy some points and add them to the directional movement trigger as event
and it works with regions as well. you could just add an entered region go_south event to the existing triggers
@b0ne123: Go
What happens if the lanes wern't straight though? if diagonal lanes got implemented in a map?
still no challenge :)
copy one of the directional triggers and change to move order to move 30.0 / 30.0 for north-east
Is it possible to use units instead of points? Since you could use the uservalue of the units for the path. Example: Unit 1 (start) uservalue index 0 = 1. That means there is one possbile path. Index 1 = id of the next unit. Unit 2 (node) uservalue index 0 = 2. That means there are two possible paths. Index 1 = first unit, Index 2 = second unit.
End the end unit has a index 0 = -1 or something like that.
the idea to use units is nice, but I don't like the idea of a defined path.
the advantage of units instead of points is, there are triggers like:
get all units in region of type (maybe left) create region at unit
add last created region to run left regiongrp
event unit enters region
if triggering region is in regiongrp run left
order unit move left
Why sould the path for the creep be defined?
Path Unit UserValue Index 0 = 2 ( there are two possible ways ) Index 1 = Way one. Index 2 = Way two. You chose the way throught a random int.
Btw. does stun interupt the order queue? If not you could set the path on creep creation through queueing the movement orders.
You could also use unit comes in range event and different unit types. But you would need many unit types. ( left, left or right, left or right or up ... )
hm but you have to set the user value for every path unit. this is a lot of work, if you have 20 maps with 4-20 movementpoints each
stun does interrupt movement, this is why we should use 0.001 movementspeed isntead of a real stun
you would need 10 unittypes, 4 NESW, 4 diagonal, 2 random
if you use the uservalue you have to set 400+ user values all by yourself and if you move a single unit the path is broken
why only 2 random? You would need a random unit for every possible combination. Because ther might be a path that goes N and NE and NW.
if you want to cover every possible cross-way, it is going to be 8*7 = 56 random units
not good, but still way better than 400-500 uservalues you have to initialise in a trigger
or is it possible to set the uservalues in the editor, if you double click a unit?
The performance with my way (uservalues) is way better than your way. You have to create 56 units, I have to create 1. You have to create 56 different triggers or one trigger with 56 ifs. For my way you have to initialise only these paths you will need in this games. So only the amount of players you have. Then you have an additional problem. What happens if ther is something like a "H" so there is a way that they can come from the the base of the H and walk up to the first cross way. There they go left or right and when they reach the other side they can walk back and forth again ...
Your way would need like 20 times more time to load then mine. Since you want to create also rects and have to laod 56 times the units I have. And the most of my code would be loaded when the player chooses a map...
And I wouldn't say your method is faster to do. I mean 56 units are a lot. And you have to search always the right one. And creating them uses also time.
Btw. I've begun with writing my idea in galaxy. (need it also for my self).