day/night cycle
Apr 30 2017, 4:13 am
By: theskinsurf  

Apr 30 2017, 4:13 am theskinsurf Post #1



I'd like a cycle where your vision radius restricts at night. I assume these systems are done with turning on/off self-vision, and turning on vision with a computer light source. the solution I'm imagining involves handing off your vision to a blinded, burrowed unit that stays under your hero. are there other ways of accomplishing this? I'd like to consider all options.



Current project: Star Rogue
Other projects: Triumvirate Defense, Skirmish Islands

Apr 30 2017, 6:01 am Zoan Post #2

Math + Physics + StarCraft = Zoan

If you use the solution you mentioned, constantly moving the blinded, burrowed unit underneath your player's unit would make them move very slowly.

A good solution used in The Architect is the following: the player's unit is always blind, but during the day a ground unit is created and removed at the player's unit repeatedly so that it appears they have more vision than they actually do.

This method though causes the vision to occasionally 'blink,' though it doesn't happen that often.

If your map has day/night segments (e.g. chapter 1 takes place in the day, chapter 2 takes place during the night), then the best solution is to have the player's units be spawned and immediately blinded during night segments and otherwise just spawned normally during day segments.



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Apr 30 2017, 6:48 am theskinsurf Post #3



how often is the unit spawned/removed for vision, in hypertrigger ticks?



Current project: Star Rogue
Other projects: Triumvirate Defense, Skirmish Islands

Apr 30 2017, 9:41 am NudeRaider Post #4

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

If you want to be really fancy you keep track of vision update cycles. rockz analyzed that quite throughly a while ago.

The trick is, the game updates vision at fixed intervals and whenever a unit is blinded. So if you control the blinding you'll always know when vision updates and just before (or during?) that cycle you create your vision unit and remove it right after.

Now go and search for posts by rockz about vision. :P




Apr 30 2017, 11:24 am Oh_Man Post #5

Find Me On Discord (Brood War UMS Community & Staredit Network)

I think rockz' method is impossible if you have to reblind units in the game, because due to the weirdness of AI you can never precisely predict when a Medic will fire off the Optical Blind unless it's at the start of the map (ie not dynamic blinding). My map uses dynamic blinding because of the respawn system, having to re-blind the unit, so I never could solve the flicker problem. Of course Blizzard could save us a lot of hassle if they just made Blind something you can toggle on and off via a trigger!! :flamer:




Apr 30 2017, 11:25 am Wormer Post #6



Oh yes, I do remember it was quite an epic stuff from rockz! If only triggers were executed every frame instead of every second frame, then we wouldn't have such problems. Damn, Blizz can't fix even this :(

EDIT:
I have had a test map (download) that forces medics to blind. The vision updates more quickly. It looks like medics cast blind quite regularly, maybe with some tinkering it's even possible to create the vision revealer unit exactly at those times.

Post has been edited 3 time(s), last time on Apr 30 2017, 11:44 am by Wormer.



Some.

Apr 30 2017, 7:31 pm theskinsurf Post #7



has anyone been able to solve the "flicker" that occurs when creating/removing sighted units on blinded hero at small intervals?



Current project: Star Rogue
Other projects: Triumvirate Defense, Skirmish Islands

Apr 30 2017, 7:42 pm Wormer Post #8



Honestly I'm not sure how to approach this. Even if let's assume we know when vision is getting updated, but triggers aren't getting to run at that particular frame (because they are running every second frame). What can we do about it? In my opinion it looks like a stalemate.



Some.

Apr 30 2017, 7:45 pm theskinsurf Post #9



the solution I may fall back on is my original idea, the system where I turn off player vision and move a blinded, burrowed unit under them. this will require either wasting three burrowing units (3 players to track), or cycling two burrowed units under each player at small intervals. edit: actually, even tracking the cycled units would be hard, so i think the most stable/reasonable solution is, unfortunately, to sacrifice three burrowing units.

Post has been edited 1 time(s), last time on Apr 30 2017, 7:56 pm by theskinsurf.



Current project: Star Rogue
Other projects: Triumvirate Defense, Skirmish Islands

Apr 30 2017, 8:15 pm Oh_Man Post #10

Find Me On Discord (Brood War UMS Community & Staredit Network)

The way you remove the flicker is instead of create/remove a vision giving unit every frame, you leave that unit there for the duration of when the flicker would normally occur (instead of removing it). Then you go back to create/remove every frame. What this means is people will briefly see a burrowed unit (or w/e you're using to provide vision) appear and disappear for the duration of that flicker, which I believe is six frames or so (someone find that thread where rockz had the exact numbers).

That may imo be uglier than the flicker itself, having a burrowed unit briefly appearing every 100 frames or so... You could create/remove a map revealer instead, but the vision radius is much larger, and ignores terrain height restrictions.

Also keep in mind it is the medic blind that resets when precisely the flicker occurs. If you have medic blinds going off at random intervals in your map you won't be able to accurately know when the flicker is and won't be able to use the above method to disguise it.




Apr 30 2017, 8:46 pm theskinsurf Post #11



Quote from Oh_Man
That may imo be uglier than the flicker itself, having a burrowed unit briefly appearing every 100 frames or so... You could create/remove a map revealer instead, but the vision radius is much larger, and ignores terrain height restrictions.

if I'm going to show the burrowed unit temporarily, I feel like I should just bite the bullet, show the unit all the time, use the first system idea, and simplify my life. :P



Current project: Star Rogue
Other projects: Triumvirate Defense, Skirmish Islands

Apr 30 2017, 9:21 pm NudeRaider Post #12

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

IIRC rockz' method avoids ever seeing a unit or flicker. At the cost of limited, or better yet disabled blind. Yes, someone dig up his thread. :P




May 15 2017, 5:43 am LoveLess Post #13

Let me show you how to hump without making love.

Quote from NudeRaider
IIRC rockz' method avoids ever seeing a unit or flicker. At the cost of limited, or better yet disabled blind. Yes, someone dig up his thread. :P
http://www.staredit.net/topic/16034/

This one?



None.

May 16 2017, 7:01 am Lethal_Illusion Post #14



Quote from LoveLess
Quote from NudeRaider
IIRC rockz' method avoids ever seeing a unit or flicker. At the cost of limited, or better yet disabled blind. Yes, someone dig up his thread. :P
http://www.staredit.net/topic/16034/

This one?
I made a vision map somewhere back in the thread LoveLess linked that's relevant here. People seem to be thinking of this problem backwards. You can't "legally" read when the vision timer updates, but that shouldn't matter. You can just have a unit that is guaranteed never to be revealed to provide vision.

I've attached a test map that demonstrates this. When you start, blind the Marine. After five seconds or so, you will own a Zergling next to your Marine, but it will never be visible because it's cycled out with others just before it is revealed, and the vision will never blink. Of course, the vision could be extended by changing the Zerglings to Hydralisks or Defilers.

If you want to further test what happens when the vision is constantly updated, continually blind the Devouring Ones near the Medic. As mentioned in the other thread, the key is the units' indices. The main problem with this system is if you create or kill any unit at an index after the vision unit, it could screw up the reveal order. (You can see this by killing ~20 Machine Shops and waiting a minute.) You can mitigate this problem by having the vision units at the highest possible indices.

If anyone wants a fuller explanation that's not provided in the other thread, I'll try to create a wiki entry dedicated to vision mechanics later this week or early next week.

Attachments:
PerfectVision.scx
Hits: 4 Size: 39.45kb



None.

May 16 2017, 8:01 am rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

Here's my vision map.

It should be perfect, with the exception of blinded units.

Essentially it's in a few triggers:

Turn off vision for the player.
Turn on vision for a "vision" computer.

Whenever the unit moves out of a location, create a burrowed unit or cloaked unit on the location, then remove it to automatically update vision upon moving.

Have a death counter count to 50, and on DC=0, leave the unit there for a single trigger run, then give it back/remove it to keep the vision of the unit.



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

May 17 2017, 12:32 am Oh_Man Post #16

Find Me On Discord (Brood War UMS Community & Staredit Network)

Quote from Lethal_Illusion
You can mitigate this problem by having the vision units at the highest possible indices.
Welcome back.

What does this mean, exactly?




May 17 2017, 1:34 am LoveLess Post #17

Let me show you how to hump without making love.

He means the unit index. The higher the index number of the vision unit, the better (I believe).

My question about the index, and I should know this from EUDs but never came across a time when I had to know is... If you just preplace a lot of junk, then remove it once the game starts, do units shift down in the index? Or do they stay at their index number, then new units just fill in the gap?



None.

May 17 2017, 4:41 am Lethal_Illusion Post #18



Quote from Oh_Man
What does this mean, exactly?
Quote from LoveLess
He means the unit index. The higher the index number of the vision unit, the better (I believe).
Yeah, you believe correctly.

Quote from LoveLess
My question about the index, and I should know this from EUDs but never came across a time when I had to know is... If you just preplace a lot of junk, then remove it once the game starts, do units shift down in the index? Or do they stay at their index number, then new units just fill in the gap?
Once the unit is assigned an index, it stays at that for its entire lifetime. There's a separate cloak reveal/hide table/array that's built every 300 animation frames that starts at the highest unit index, which is why you need the vision units with high unit indices. The preplace and remove trick will work as long as those vision units stay alive (just try to keep them in groups of 30).



None.

May 17 2017, 5:50 am Oh_Man Post #19

Find Me On Discord (Brood War UMS Community & Staredit Network)

Where is a list of units and their indeces? This isn't like killscore?




May 17 2017, 6:07 am Lethal_Illusion Post #20



Quote from Oh_Man
Where is a list of units and their indeces? This isn't like killscore?
The system works for any unit. When I say "index," I mean the unit's slot in the unit array. The first unit placed on a map is index 0, then 1, then 2, all the way up to ~1700. SCMD2 shows the list as the 5th column after you select a unit and press enter. I didn't mean the Unit Id (eg. Marine=0, Zergling=107) if that's what it sounded like.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: jackwrwn85, zzt