Staredit Network

Staredit Network -> Concepts -> Unit Train + Movement Detector
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-29 at 20:25:34
Ok, since the new gunner system prototype will require a good way to detect movement as accurately as possible, I cooked up this little unit movement detector prototype for the job. I also tacked on a little unit train sample, to make it interesting. The 'tick' sounds indicate when the triggers detect movement, by the way.

Though it requires a bit of locations, it works pretty well since it can detect movements almost to the pixel. I've also thought of using unit grids and location centering, but both of those have precision and other flaws, and wouldn't work for exact purposes.



If anyone's interested in such a thing, here it is:

EDIT- Found a small error. Fixed.
Report, edit, etc...Posted by sunslap on 2006-08-29 at 20:32:14
i can totaly understand what that text says
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-29 at 20:38:51
Fixed a small error.
Report, edit, etc...Posted by Zeratul_101 on 2006-08-29 at 21:17:52
QUOTE(sunslap @ Aug 29 2006, 06:31 PM)
i can totaly understand what that text says
[right][snapback]553237[/snapback][/right]


right click, save target as, find folder, add .scx to the end of the name
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-29 at 22:36:37
So yeah, nothing special. Just thought I'd share that method. I'll refine it a bit for the actual gunner system prototype, though.
Report, edit, etc...Posted by Zeratul_101 on 2006-08-29 at 22:39:20
jsut curious, how does that have to do with a gunner system?

also, i haven't really examined your map yet, but is it possible to make the formation tighter? so that the units are slightly overlapping?
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-29 at 23:12:22
Yes it is. I could make them tight as a pixel practically if I wanted. I just spaced them out to demo the train effect.

See my other concept thread's latest post for the new prototype outline, and how movement detecting factors in.
Report, edit, etc...Posted by Rantent on 2006-08-29 at 23:46:21
I like it, and after reviewing triggers, I realize its something a lot like a system I had planned for an entirely different purpose. I think I see how this could help in a couple areas.
Report, edit, etc...Posted by KABOOM on 2006-08-30 at 00:50:11
well i was playing the map and i tried to bug it up and i found out that it doesnt always detect when u move, like when i move 1 pixel to some direction it would move and nothing happens then to another and it worked. so just saying
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-30 at 11:39:17
Hmm. Well then, I guess a new prototype is in order.

I think I found a vastly simpler way to do it just now, actually. Can't believe I didn't think of it sooner. Especially since I've already done it before in another form. tongue.gif
Report, edit, etc...Posted by Urmom(U) on 2006-08-30 at 15:09:06
Sometimes it would detect false movement and I would hear random clicks every once in a while but gj.
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-30 at 15:49:02
That's not a trigger bug. That's actually a SC bug with playing certain wavs. Happened in Rush too.
Report, edit, etc...Posted by LazyCoder on 2006-08-30 at 18:24:33
That bug is due to the high quality sound, doesn't do that to any quality lower than 22.050 I think.

What does this have to do with the new gunner system?
Report, edit, etc...Posted by Tuxedo Templar on 2006-08-30 at 23:29:35
Well it's for detecting swarms from multiple players. You know for instance that if a player is moving, they can't be the one firing. Casting and attacking requires being still, after all.
Report, edit, etc...Posted by SuperToast on 2006-08-31 at 01:45:35
Very nice idea there mate... I could have sworn that wasn't true though... Maybe my memory is just faulty, and seeing that I don't have a copy of SC at the moment, I'm bump out of luck to test it...

Still, an extremly intriguing concept if it can be made to work well.
Report, edit, etc...Posted by LazyCoder on 2006-08-31 at 17:41:33
QUOTE(SuperToast @ Aug 30 2006, 11:45 PM)
An extremly intriguing concept if it can be made to work well.
[right][snapback]553827[/snapback][/right]


...but extremely irritating if it doesn't.

I looked at the triggers, and one thing I can't figure out is what's with the 'center location labelled 'whatever' on independent command center owned by player 1 at anywhere. (why independent command center?) huh.gif
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-01 at 09:38:13
Because it's a unit that can't possibly exist in the map (unless specifically preplaced). Whenever a location is centered on a unit that doesn't exist in the other location, it just defaults to centering it to the middle of the other location.
Report, edit, etc...Posted by KABOOM on 2006-09-01 at 14:31:55
just learned something, thank you biggrin.gif and i like the idea for detecting who shot the swarm i hope it works out
Report, edit, etc...Posted by Shocko on 2006-09-01 at 16:09:52
QUOTE(Tuxedo Templar @ Aug 30 2006, 07:29 PM)
Well it's for detecting swarms from multiple players.  You know for instance that if a player is moving, they can't be the one firing.  Casting and attacking requires being still,  after all.
[right][snapback]553801[/snapback][/right]


A number of glitches can come here.

1 possible glitch being if player 2 is swarming player 1 is attacking, they are both standing still. The swarm will be detected for p1?

another glitch could be if you had p1 and p2 swarming it would still come out as p1 over p2?

If its 3 players it could be something like

P1 Attacking, P2 Moving, P3 swarming.

If what you say is true p1 is staying still because its attacking, p2 is moving so it can't be him / her and p3 is staying still because he or she is swarming. Once again its still p1 who gets the swarm?
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-01 at 16:35:04
Here, this describes the method I'm using to prevent swarm mixups. It's basically an intuitive turn-based method.
Report, edit, etc...Posted by Urmom(U) on 2006-09-01 at 19:18:01
That looks like a good idea for the anti-swarm mixup. I sort of have a question though. I was experimenting with center view and your tick idea. Since you say you detect every pixel movement (or approximately every one), could you create a better centerview method so that it centers every pixel pretty much? I added a center view to every location that was smaller than a normal grid size and it seemed to work. Or is it a part of starcraft where you can only center view every grid square?
Report, edit, etc...Posted by fritfrat(U) on 2006-09-01 at 19:32:51
I had always believed that sc can only center view grid squares, and that they just made the screen scroll fast enough that you never notice wink.gif. Don't quote me on that, though.
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-01 at 21:55:13
Center view? You mean center location?

Locations move by starcraft's grid, which is not by the exact pixel unforunately. However I believe locations themselves can be sized by the pixel, so you can work with that fact.
Report, edit, etc...Posted by Urmom(U) on 2006-09-01 at 23:32:29
I'm talking about center view. In most movie maps when the screen scrolls it goes 1 grid square at a time. If you centered a location on a moving observer and used this method, would it be possible to fix that 1 by 1 movement or does Starcraft center by grid squares?
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-01 at 23:54:26
It's not by grid squares. That is, not the full 32 pixel range. It's more like 8 or so pixels... I can't remember exactly. There seems to be a kind of subgrid thing going on, which I believe is also what the tileset tiles use for pieces of each tile (tile data is actually stored in smaller pieces from what I recall, oddly enough).

Someone knows how this crap works exactly and can explain it better I'm sure. I only know what I need to know to use it for making maps. tongue.gif
Next Page (1)