Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Question of large numbers of a single unit being owned by one pl
Question of large numbers of a single unit being owned by one pl
Sep 25 2017, 9:09 am
By: m.0.n.3.y  

Sep 25 2017, 9:09 am m.0.n.3.y Post #1



Question of large numbers of a single unit being owned by one player and tracking them individually

Here's the situation: I have multiple scourges being created throughout the game for a single player 7 computer. The scourges are being created simultaneously at times or at very near intervals. So after about 30 seconds the map is filled with scourges owned by player 7.

What I would like to do is track each scourge that is created and after 10 seconds kill that scourge.


I don't know of a way to do this because you can't center a location on the scourge and then create a timer because multiple scourges are owned by player 7 at the same time. So if you center a location then it will go to the upper left most scourge which means it probably won't kill the one that it should.This won't do. I'd like to track each individual scourge dynamically as it is created, and then kill that specific scourge after 10 seconds.

The only pseudo solution I've come up with is the create a grid of locations across the map. When when a scourge enters that location start a timer for that location specifically. When that timer reaches 10 seconds, and no other scourges have entered that location since the first scourge's arrival, then kill the scourge in that location.

The problem with this it only tracks scourges that have stopped moving in a location for 10 seconds and have been there uninterrupted the entire time, and then kills them.

It'll will do the job I suppose, but it leads to situations where a scourge could be flying for 15 seconds, and then stop, and then die after 10 seconds. Thus it was alive for 25 seconds instead of the 10 I wanted it to be. Also it leads to situations where the scourge could be there for a very long time if other scourges keep entering the location and setting the time back to 0.

Also it requires a very large number of death counters because I have to create a separate timer for each location.

So, does anyone have a better way of doing this?

Thanks so much! :D



None.

Sep 25 2017, 9:48 am NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Ugh, this is a tough one. While you *can* track individual units the application is limited and you break a lot of them with your setup. :P

The usual solution: You center a 1 pixel location, on a unit and recenter it at itself each trigger loop.

This fails when either thing happens:
- The scourge moves more pixels per 2 frames (= 1 trigger loop) than half the size of its hitbox. Then it effectively outran its location. Happens only for units that are small and fast. Scourge are that. This can be somewhat mitigated by using a larger location. The bigger that location is, the bigger the risk another scourge enters it and overtakes both sets of tracking locations.
- 2 scourge fly over another (or close enough together). Then the leftmost one will "capture" both (sets of) tracking locations.
- You run out of locations

possible Alternatives:
- Use hallucinations. Drawback: They can't attack and will take a lot longer to "die" than 15s.
- Use slow ground units. Drawback: Not scourges.
- Create the scourges irradiated. Drawback: Looks funny. Needs storage area that provokes science vessels into casting it. Can be unreliable. Doesn't work for high hp.
- Use statistics to determine which scourge to kill when. Lets say you have 30 scourges flying around, and each one should die after 15 seconds, that means on average every 0.5 seconds a scourge should die. Now just pick a random scourge every 6 trigger loops and kill it. Drawback: Doesn't at all do what you asked, but maybe it simulates what you actually want well enough? :P At least it's easy to do and costs no resources, except maybe a few locations, depending on your randomization method of choice.




Sep 25 2017, 4:07 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

Option 1) get a new system that's not as convoluted.

Option 2) develop ~32+ paths for the scourges to follow which take exactly 10 seconds to navigate. Randomize which path each scourge should take. You can also increase this to 64 if you want. You can use a single location a burrowed units to do this. certain tiles which don't overlap will be "kill tiles" which will kill any scourge that touches it. Make sure the tiles are either smaller than 1 pixel (inverted) or 1 pixel to ensure the size is extremely small. It might be possible to create multiple decisions based on a random number generator as well. For example point AB and point AC are equidistant, so you can have the scourges go to either location. It would increase the entropy in the system to provide the JYD effect without being impossible to track.

Your best bet is psuedorandom or statistics.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 25 2017, 4:25 pm m.0.n.3.y Post #4



Quote from NudeRaider
Ugh, this is a tough one. While you *can* track individual units the application is limited and you break a lot of them with your setup. :P

The usual solution: You center a 1 pixel location, on a unit and recenter it at itself each trigger loop.

This fails when either thing happens:
- The scourge moves more pixels per 2 frames (= 1 trigger loop) than half the size of its hitbox. Then it effectively outran its location. Happens only for units that are small and fast. Scourge are that. This can be somewhat mitigated by using a larger location. The bigger that location is, the bigger the risk another scourge enters it and overtakes both sets of tracking locations.
- 2 scourge fly over another (or close enough together). Then the leftmost one will "capture" both (sets of) tracking locations.
- You run out of locations

possible Alternatives:
- Use hallucinations. Drawback: They can't attack and will take a lot longer to "die" than 15s.
- Use slow ground units. Drawback: Not scourges.
- Create the scourges irradiated. Drawback: Looks funny. Needs storage area that provokes science vessels into casting it. Can be unreliable. Doesn't work for high hp.
- Use statistics to determine which scourge to kill when. Lets say you have 30 scourges flying around, and each one should die after 15 seconds, that means on average every 0.5 seconds a scourge should die. Now just pick a random scourge every 6 trigger loops and kill it. Drawback: Doesn't at all do what you asked, but maybe it simulates what you actually want well enough? :P At least it's easy to do and costs no resources, except maybe a few locations, depending on your randomization method of choice.

These are some good solutions! I really like the irradiate idea! Only problem is I have computers, red and blue, creating scrouges, and you need to be able to tell the difference between them. The irradiate kind of makes them look all the same though, but hmmm could be interesting.

Actually hallucinations would work perfect, if only they didn't last so long... Maybe if I spawn them with less health they'll die faster?

Actually the main problem with the hallucinations trick is that they can't be detected by conditions!!?!!! AHHHH I hate these stupid nuances lmfao. Is there any way to do this?

Post has been edited 1 time(s), last time on Sep 25 2017, 4:44 pm by m.0.n.3.y.



None.

Sep 25 2017, 5:45 pm m.0.n.3.y Post #5



So the irradiate options looks like it's going to be the best! Wow I would have never thought of this haha. They all have a little green tint but you can still tell the difference between red and blue.

Thanks so much Nude! You just saved me hours of time and countless locations! :D



None.

Sep 25 2017, 9:58 pm NudeRaider Post #6

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

np.

You could use hallucinations when you create them ahead of time in a storage area. Actually make it multiple areas so you can track how much lifetime they have left. So you create 10 scourge at A, after 10s you move 10 scourge to location B, after the next 10s you move 10 scourge from B to C and 10 from A to B. And so on.

It's possible to detect hallucinations, although its tricky. I forgot the exact process but I think it went like this: Create a real scourge to the right of where you want to find the hallucinated scourge. Now center another location on scourges in a location that large enough to encompass both scourges (real and hallucinated). Now if conditions detect no scourge at the location you just centered on it, then you just found your hallucination. If bring says there is a scourge then there was no hallucinated scourge it could find, so it scanned further to the right until it found your real.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:46 pm]
RdeRenato -- ty
[05:06 pm]
Dem0n -- You have to create your account on their website, and then use those credentials to log into the server on Starcraft.
[04:59 pm]
RdeRenato -- Even if I don't confirm it, I go in and it tells me: wrong password
[04:59 pm]
RdeRenato -- Does anyone know how to create an account on iccup? the confirmation email never reaches me
[2020-3-31. : 4:56 pm]
RdeRenato -- If someone can help me, it will make me very happy xd
[2020-3-31. : 4:55 pm]
RdeRenato -- they are right. I don't know how to describe my level but it is difficult for two things: 1. crazy enemies 2. multiple defensive points
[2020-3-31. : 11:01 am]
Sie_Sayoka -- both because of low skill and population on west
[2020-3-31. : 11:01 am]
Sie_Sayoka -- tbh a lot of the korean maps are impossible to play with pubs
[2020-3-31. : 5:14 am]
jjf28 -- forcing players to be quicker means they'll have to multi-task more/up the APMs and use less safe approaches or have gotten the approaches down to an art so they can perform them quickly without much time to think
Please log in to shout.


Members Online: Roy, KrayZee, BeatMeistro, fritfrat