Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Seeing in the "dark"
Seeing in the "dark"
Jun 12 2009, 6:19 pm
By: scwizard  

Jun 12 2009, 6:19 pm scwizard Post #1



For any map that's going to use some kind of darkness system, where you don't have vision to yourself. The way of having torches and lanterns is having some sort of unit that belongs to a player that the player does have vision with.

If you're carrying a "torch" for instance lets say a burrowed zergling, then you want to move that burrowed zerglings under the player constantly. However if you do that, then the player's movement slows down.

How do you make it so that moving a burrowed zergling under a player won't slow their moment down? Do it only every so often? Do it only when they move?



None.

Jun 12 2009, 6:52 pm Roy Post #2

An artist's depiction of an Extended Unit Death

Yes, the only way to minimize the movement lag is to decrease the frequency.




Jun 12 2009, 6:57 pm BiOAtK Post #3



I use a 1x1 pix location and whenever the unit leaves, it moves the ling. I find it works, and unless you are doing some gosu micro it won't affect much.



None.

Jun 12 2009, 6:58 pm Pyro682 Post #4



You could use a location/coordinate grid. That basically accomplishes the same thing, minus the slowdown.



None.

Jun 12 2009, 6:59 pm scwizard Post #5



Quote from Pyro682
You could use a location/coordinate grid. That basically accomplishes the same thing, minus the slowdown.
Could you elaborate?

I know what the grid is, but I would I use it for vision purposes?



None.

Jun 12 2009, 7:04 pm JaFF Post #6



Or you can create/move some unburrowed ground unit to your hero's location (meaning that it will end up very close to your hero), remove/move_back that unit and move your burrowed vision-unit to the location where the unburrowed unit was. This will cause a little offset in your vision, but it will be constant and not lag. Just don't forget to have a system that detects when you're surrounded by ground units, in which case you should move your vision unit directly underneath your hero.



None.

Jun 12 2009, 7:07 pm scwizard Post #7



Quote from Anonymous
I use a 1x1 pix location and whenever the unit leaves, it moves the ling. I find it works, and unless you are doing some gosu micro it won't affect much.
I'm tempted to go with this method, if it works as advertised, except using an inverted location.

Then I'll try something else depending on whether any lag is noticeable or not.



None.

Jun 12 2009, 7:19 pm Vi3t-X Post #8



Kaias has explained that the properties of how vision is given. To reduce the amount of slow-down, you just move the unit every (99?) ticks.



None.

Jun 12 2009, 7:21 pm scwizard Post #9



Quote from Vi3t-X
Kaias has explained that the properties of how vision is given. To reduce the amount of slow-down, you just move the unit every (99?) ticks.
Where is this explained?



None.

Jun 13 2009, 12:16 am Roy Post #10

An artist's depiction of an Extended Unit Death

I couldn't imagine using a location grid in a practical sense for this...
Quote from JaFF
Or you can create/move some unburrowed ground unit to your hero's location (meaning that it will end up very close to your hero), remove/move_back that unit and move your burrowed vision-unit to the location where the unburrowed unit was. This will cause a little offset in your vision, but it will be constant and not lag...
Last I tested (which was earlier today, actually), this causes "flickers" of no vision every few seconds (using hyper triggers, of course). I was using "move;" maybe "create" has a different, beneficial result.
Quote from scwizard
Quote from Anonymous
I use a 1x1 pix location and whenever the unit leaves, it moves the ling. I find it works, and unless you are doing some gosu micro it won't affect much.
I'm tempted to go with this method, if it works as advertised, except using an inverted location.
The more sensitive you make it, the more lag the unit will experience. A 1x1 pixel is a decent refresh rate.

Quote from Roy
Yes, the only way to minimize the movement lag is to decrease the frequency.





Jun 13 2009, 11:07 am JaFF Post #11



Quote from Roy
Last I tested (which was earlier today, actually), this causes "flickers" of no vision every few seconds (using hyper triggers, of course). I was using "move;" maybe "create" has a different, beneficial result
Odd. Last time I worked with these things, it was exactly the opposite: if you create/remove the vision unit, you get frames vithout vision once in a while; however, if you keep the same unit and just move it, there were no such problems.



None.

Jun 13 2009, 4:20 pm rockz Post #12

ᴄʜᴇᴇsᴇ ɪᴛ!

Like this
see also http://www.staredit.net/topic/6771/



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

Jun 13 2009, 4:50 pm scwizard Post #13



Quote from name:Zachary Taylor
It'd be more helpful if you linked to a post within the thread that you want me to read, instead of just the whole thread. And also if you explained how your map does it instead of just posting the map.

Anyways a lot of these answers have been helpful, but none have been too conclusive, so I'm going to start with some testing after I get back from grocery shopping.

What I'm leaning towards though, is using a mobile grid to make it so spidermines are constantly moved NSEW of the hero. First I'd like Zachary Taylor to explain what his map is doing and why it works though.

EDIT: One of the questions I'd really like to know the answer to, but that only DoA or Heinermann could answer most likely, is WHY moving a unit over/under a ground unit causes movement lag.

Post has been edited 3 time(s), last time on Jun 13 2009, 5:00 pm by scwizard.



None.

Jun 13 2009, 5:12 pm JaFF Post #14



Quote from scwizard
What I'm leaning towards though, is using a mobile grid to make it so spidermines are constantly moved NSEW of the hero.
Remember that creating a mobile grid over your hero would cause lag also, so do it when your hero has moved some set distance.



None.

Jun 13 2009, 5:18 pm scwizard Post #15



Quote from JaFF
Quote from scwizard
What I'm leaning towards though, is using a mobile grid to make it so spidermines are constantly moved NSEW of the hero.
Remember that creating a mobile grid over your hero would cause lag also, so do it when your hero has moved some set distance.
Oh geez it would.

Wow, I feel really stuck here.



None.

Jun 13 2009, 5:30 pm Pyro682 Post #16



Basically, you can detect Where the Marine or whatever unit is. Then, you detect a location Right next to it, depending on where it's facing.
Both Lethal and I tried utilizing this to make a "Field of View", if you understand my meaning.
I used mobile grids, and the unit got slowed down.
Lethal used A location grid to tell which direction the unit was facing, and then the unit didn't get slowed down. However, it pretty much whores the rest of the locations on the map. It's a bit difficult to make, but you'll never need another location again.

It's a trade on/off.



None.

Jun 13 2009, 6:24 pm scwizard Post #17



Quote from Pyro682
Basically, you can detect Where the Marine or whatever unit is. Then, you detect a location Right next to it, depending on where it's facing.
Both Lethal and I tried utilizing this to make a "Field of View", if you understand my meaning.
I used mobile grids, and the unit got slowed down.
Lethal used A location grid to tell which direction the unit was facing, and then the unit didn't get slowed down. However, it pretty much whores the rest of the locations on the map. It's a bit difficult to make, but you'll never need another location again.

It's a trade on/off.
Well, there's an less location intensive way to tell which direction a unit is moving. It's used in that pixel perfect movement detection map that Lethal showed me.

So once you detect what direction the unit is moving in what do you do next? Just make it so it's created behind the unit? There's a much easier way to do that. Just move the spider mine before you center the location.

Hmm, let me try this.



None.

Jun 13 2009, 7:23 pm rockz Post #18

ᴄʜᴇᴇsᴇ ɪᴛ!

http://www.staredit.net/140902/

Sorry, I had assumed it wasn't too hard to read the thread.

You can read the better description there, but suffice it to say the vision resets ever 100 frames. Hyper triggers run every other frame, which makes it easy. By creating a death counter which adds 2 every cycle, we can number the frames. On frame 99, all vision is updated. That means on frame 98, you make a unit (or give vision), then on frame 100, remove that unit so you can't see it. Everyone has noticed that vision updates ~every 4 seconds, and when you give a unit to a different player, there is a small delay before you can see the unit if it is cloaked somehow. By leaving a unit with vision on frame 99, you get the vision there for 4 seconds.

When you make a unit on top of another unit, if it is displaced at all, there is no slowdown. It has to do with the center being used by multiple units, and starcraft doesn't like that much. Creating burrowed lings on a ground unit will make them AROUND the ground unit, not under.

Finally, you can't use blind ever if you do it this way. Just the way it is. Try using different burrowed units/cloaked units for various visions. You can also have them cloaked somewhere via an arbiter, then move them away.



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

Jun 13 2009, 7:35 pm Lethal_Illusion Post #19



Why not use this method? It's by far the easiest and most efficient suggested so far.

Quote from JaFF
Or you can create/move some unburrowed ground unit to your hero's location (meaning that it will end up very close to your hero), remove/move_back that unit and move your burrowed vision-unit to the location where the unburrowed unit was. This will cause a little offset in your vision, but it will be constant and not lag. Just don't forget to have a system that detects when you're surrounded by ground units, in which case you should move your vision unit directly underneath your hero.

Here it is in action:

Attachments:
Vision Test.scm
Hits: 21 Size: 38.82kb



None.

Jun 13 2009, 8:45 pm rockz Post #20

ᴄʜᴇᴇsᴇ ɪᴛ!

Because you can see the zergling. Through a little bit of effort, you can fix that.



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

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Roy, Oh_Man, Risingvge