Staredit Newtork
Community
StarCraft
Games
Site
Favourites
Direction continuation

Creator: Kaias
Time: Jul 5 2008, 6:38 pm

Post #1     Kaias Jul 5 2008, 6:38 pm

[Avatar]
Thats not going to happen
 offline contact
Does anyone know of a good way of keeping units along their current trajectories?

For instance, if I wanted an observer to move from my unit to an enemy unit but continue past the location on him, what would be the best way of going about this? (Units being in any given spot at any time, of course) After giving some thought into it, the only plausible thing I could come up with is to make a mobile grid around the target, detect where the observer is before it hits and then tell it to move within the grid according to previous location. This could be a real pain though, and I'm guessing pretty inaccurate.

Got anything better?

Edit: While I'm here, may as well ask if there is a way to slow down air units like you can ground
Top

Post #2     Falkoner Jul 5 2008, 7:30 pm

[Avatar]
Taking StarCraft Map Making to the Limit!
 offline contact
Nah, the mobile grid method is really the best way, and I think it will be quite accurate. Of course, if more than one observer can be hitting him at a time, that may be a problem, can more than 1 hit him at a time?
Top

Post #3     JaFF Jul 5 2008, 8:44 pm

[Avatar]
Anonymoose DELIVERS.
 offline contact
Quote from Falkoner
Nah, the mobile grid method is really the best way, and I think it will be quite accurate. Of course, if more than one observer can be hitting him at a time, that may be a problem, can more than 1 hit him at a time?
Quite accurate? Are you kidding? The grid gives only 8 possible directions (16 if you make it a 5x5). The most accurate way is to follows these steps:
1. Detect the coordinate of the unit the ovserver is flying from
2. Detect the coordinate of the unit the observer is moving to
3. Calculate the X and Y difference between them using binary countoffs.
4. Add those X and Y differences to the unit's coordinates (any unit from the two) until you leave the 'arena'.
5. Order the observer to move to the coordinate calculated in the previous step by using either mobile grids or location grids, or a combination of those.

Of course there is a question of this being rational... is what you're trying to do really essential for your map? If yes, then use it; if not don't use it or use the so-so accurate methose Falkoner posted.

Also forgot to say that with my method, you can handle any amount of observers heading at the same player, as long as you do all the desctibed actions for every observer.
Live as if you were to die tomorrow. Learn as if you were to live forever. ~Mahatma Gandhi

Don't be afraid to care. ~Pink Floyd
Top

Post #4     Kaias Jul 5 2008, 9:06 pm

[Avatar]
Thats not going to happen
 offline contact
I'll use the coordinate system, if I find more use for them in other things.
Top

Post #5     Bolshevik Jul 6 2008, 2:23 am

[Avatar]
 offline contact
quick question, what are the triggers for the grid system?
Top

Post #6     Kaias Jul 6 2008, 2:38 am

[Avatar]
Thats not going to happen
 offline contact
Quote from Bolshevik
quick question, what are the triggers for the grid system?
http://www.staredit.net/?p=tutorials&tut=47

Then you'd just have to do some math to find your trajectory (Or is this what you wanted to know?)
Top

Post #7     O)CecilSunkure Jul 6 2008, 2:42 am

[Avatar]
Truth isn't defined by opinions or numbers of them..
 offline contact
Quote from JaFF
Quote from Falkoner
Nah, the mobile grid method is really the best way, and I think it will be quite accurate. Of course, if more than one observer can be hitting him at a time, that may be a problem, can more than 1 hit him at a time?
Quite accurate? Are you kidding? The grid gives only 8 possible directions (16 if you make it a 5x5). The most accurate way is to follows these steps:
1. Detect the coordinate of the unit the ovserver is flying from
2. Detect the coordinate of the unit the observer is moving to
3. Calculate the X and Y difference between them using binary countoffs.
4. Add those X and Y differences to the unit's coordinates (any unit from the two) until you leave the 'arena'.
5. Order the observer to move to the coordinate calculated in the previous step by using either mobile grids or location grids, or a combination of those.

Of course there is a question of this being rational... is what you're trying to do really essential for your map? If yes, then use it; if not don't use it or use the so-so accurate methose Falkoner posted.

Also forgot to say that with my method, you can handle any amount of observers heading at the same player, as long as you do all the desctibed actions for every observer.


Allright thats the math part.. but can you detect where the observer is heading/is with EUD's, and order the unit to move to the new coordinates? If not, would you have to grid your entire map with locations?
-Clan Orig Map Maker-
Top

Post #8     Falkoner Jul 6 2008, 2:44 am

[Avatar]
Taking StarCraft Map Making to the Limit!
 offline contact
Yeah, that's the same problem I noticed, also, I realized that if you want to make it more accurate, you could do a ground unit grid, providing the ground units are placeable.
Top

Post #9     JaFF Jul 6 2008, 8:32 am

[Avatar]
Anonymoose DELIVERS.
 offline contact
Not necessairly a ground unit grid. You can make the X and Y coordinate axis with pre-placed units for both coordinate detection and setting the final destination location (first travel on one of the axis and then move with a mobile grid from there).
Live as if you were to die tomorrow. Learn as if you were to live forever. ~Mahatma Gandhi

Don't be afraid to care. ~Pink Floyd
Top

Post #10     Clokr_ Jul 6 2008, 1:02 pm

[Avatar]
Omg got a title!
 offline contact
You could try to implement something like this http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
It is a very simple algorithm which draws a line given its source and destination points. I think it only uses additions and substractions (no multiplications or divisions).

Although the map could become very complex.
_______________
G T C A A G T C \__________________________
C A G U···/ŻŻŻŻ\ A G T C G A G A T C A G T
··········\____/ T C A G C T C T A G T C A
C A G T T C A G
/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Was anyone missing my DNA signature? :P (yeah it is broken, I know it :/)

Top

Post #11     Ahli Jul 6 2008, 1:58 pm

[Avatar]
Master of 239.242 D1 Items
 offline contact
lethal_illusion just showed me a map where he used that.
maybe you should ask him :bleh:
(user posted image)
Top

Post #12     Kaias Jul 6 2008, 11:23 pm

[Avatar]
Thats not going to happen
 offline contact
Quote from Kaias
While I'm here, may as well ask if there is a way to slow down air units like you can ground
Anyone?
Top

Post #13     NudeRaider Jul 7 2008, 11:16 am

[Avatar]
Write your own destiny, or else someone will write it for you!
 online contact
Quote from Clokr_
You could try to implement something like this http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
It is a very simple algorithm which draws a line given its source and destination points. I think it only uses additions and substractions (no multiplications or divisions).

Although the map could become very complex.
You'd still have the problem where your ending point is - the point the unit you're trying to intercept is flying to.
(signature image)
http://sonsofwar.pyrom.net/index.html___0% (user posted image) 100%
Top

Post #14     Clokr_ Jul 7 2008, 12:41 pm

[Avatar]
Omg got a title!
 offline contact
Yeah, of course. If there's no other method you could let it fly for a given amount of time then use its current position as the end point. It would be quite accurate.
_______________
G T C A A G T C \__________________________
C A G U···/ŻŻŻŻ\ A G T C G A G A T C A G T
··········\____/ T C A G C T C T A G T C A
C A G T T C A G
/ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

Was anyone missing my DNA signature? :P (yeah it is broken, I know it :/)

Top

Post #15     Falkoner Jul 7 2008, 7:47 pm

[Avatar]
Taking StarCraft Map Making to the Limit!
 offline contact
Yeah, you can get it accurate, just not THAT accurate.

Quote
While I'm here, may as well ask if there is a way to slow down air units like you can ground

Not really, the only ways I know of make the player have to reselect it or keep clicking rapidly to make it move at all.
Top

Post #16     Zombiechao Jul 16 2008, 3:39 am

[Avatar]
 offline contact
(WARNING UNTESTED)I got a good idea but it'd only work for drones scvs and probes. Center a 1 pixel big location on a power up (that the drone carries) and order the drone to move to it. The drone will never reach it because the drone carries the power up in front of it. It is like a carrot on stick.
Top

Post #17     FoxWolf1 Jul 16 2008, 4:17 am

[Avatar]
In an infinity of snow, each flake has but one life.
 offline contact
Quote from Zombiechao
(WARNING UNTESTED)I got a good idea but it'd only work for drones scvs and probes. Center a 1 pixel big location on a power up (that the drone carries) and order the drone to move to it. The drone will never reach it because the drone carries the power up in front of it. It is like a carrot on stick.

I tested this with a drone and a crystal, and it doesn't work. Nice idea, though.
(user posted image)
Top
0 members in this topic: None
+ 0 guest(s)


[02:51 am]
Greo -- My role sucks!
[02:49 am]
WoAHorde[MM] -- LA MAFIA HAS BEGUN
[02:45 am]
OMC)Anonymous -- hey lord malvanis, your posts suck balls :D
[02:24 am]
Centreri -- NerdyTerdy is Average.
[02:06 am]
TassadarZeratul -- Especially NerdyTerdy.
[02:06 am]
TassadarZeratul -- Town fails in Speed Mafia.
[01:54 am]
Lord Malvanis -- thanks, thats one of my favorite maps, its very old
You must log in to shout.

©2003-2008 Staredit Network.
Starcraft & Starcraft II are trademarks of Blizzard Entertainment.
Site Index   |   Terms of Service   |   Privacy Policy   |   Contributions