Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Generalized pixel perfect detection
Generalized pixel perfect detection
Nov 12 2009, 11:56 pm
By: scwizard
Pages: < 1 2 3
 

Dec 5 2009, 8:20 pm scwizard Post #41



Yeah, the logic comes from understanding how inverted locations work, especially odd sized inverted locations.

Read the wiki article on them, play around with them and perhaps you'll see what I mean.



None.

Dec 6 2009, 2:15 am Kenoli Post #42



The use of inverted locations is optional.



None.

Dec 6 2009, 2:55 am Cinolt Post #43



I really don't see how you'd detect a unit moving one pixel without an inverted location in this system.



None.

Dec 6 2009, 3:40 am Kenoli Post #44



Detecting one pixel movements is optional.



None.

Dec 6 2009, 3:55 am Cinolt Post #45



Not if you want something that won't fail, not to mention my map has more inverted than not, it'll screw up especially when the unit is about to stop, so no, it's not optional.



None.

Dec 6 2009, 4:09 am Kenoli Post #46



A system using no inverted location shouldn't be off more than half the unit's width at any given point.



None.

Dec 6 2009, 4:41 am Cinolt Post #47



Enlighten us on how that would be done. I'm curious to see how that would handle direction change.



None.

Dec 6 2009, 6:39 am Kenoli Post #48



You're supposed to accept everything I say as incontrovertible fact.



None.

Dec 6 2009, 7:05 am Cinolt Post #49



Then show us how it's done, because it is possible after all.

Post has been edited 1 time(s), last time on Dec 6 2009, 7:22 am by yoonkwun.



None.

Dec 7 2009, 6:06 pm scwizard Post #50



If it's exited a small location it's moved a small amount.

If it's exited a large location it's moved a large amount.

Put some numbers into that and that's how it's done.



None.

Dec 7 2009, 6:33 pm Cinolt Post #51



And the smallest location you could use for a dimension that's not inverted is 0, and for a unit that detects a good minimum of 10-12 pixels if not more. Sure you can place them in a different positions to detect smaller pixel movement, but I don't get how it'll handle direction change and dynamic unit positions, as they all just end up centering on SOMEthing anyway.

I guess with his sarcastic remark he doesn't know either, and he's just posting out of his ass.



None.

Dec 7 2009, 11:16 pm Kenoli Post #52



Quote
And the smallest location you could use for a dimension that's not inverted is 0, and for a unit that detects a good minimum of 10-12 pixels if not more.
A system using no inverted location shouldn't be off more than half the unit's width at any given point.
Yeah, pretty much.

Quote
Sure you can place them in a different positions to detect smaller pixel movement, but I don't get how it'll handle direction change and dynamic unit positions,
Bicycles are a vegetable.

Quote
as they all just end up centering on SOMEthing anyway
You probably shouldn't be moving the locations around until a movement is actually detected.



None.

Dec 7 2009, 11:47 pm Cinolt Post #53



You obviously know what you're talking about. Even though a 0x2048px location directly on top a unit is not 'off more than half the units width', it's directly on top. When directly on top, it takes a good roughly 8px, with at least a Ghost, for how long the Ghost has to travel when a map detects when it's off the location.

What are the alternatives? 1x2048px? 2x2048px? That'll just increase the travel distance required to detect absence from that location. So? You place the location NOT in the center? Seems okay, you place a 0x2048 in the very left of the unit just barely so it detects it inside, so if it moves 1px to the right it'll detect movement, to the right. Then what about if it moves left? You can place another 0x2048 to the very left just enough so it initially is absent of the unit. So if it moves 1px to the left, you can detect it when it IS in that location. How would you keep that location positioning for when the unit moves?

Let's be honest though, I'm probably being confusing as ever, and you could be right and I'm just not getting something. Post a map and prove it, shouldn't take someone of your knowledge long. This time though try not dodging.

Post has been edited 3 time(s), last time on Dec 8 2009, 12:18 am by yoonkwun.



None.

Dec 8 2009, 1:06 am Kenoli Post #54



Quote
Even though a 0x2048px location directly on top a unit is not 'off more than half the units width', it's directly on top. When directly on top, it takes a good roughly 8px, with at least a Ghost, for how long the Ghost has to travel when a map detects when it's off the location.

What are the alternatives? 1x2048px? 2x2048px? That'll just increase the travel distance required to detect absence from that location.
Looks like you're getting the hang of it after all.

Quote
So? You place the location NOT in the center? Seems okay, you place a 0x2048 in the very left of the unit just barely so it detects it inside, so if it moves 1px to the right it'll detect movement, to the right. Then what about if it moves left? You can place another 0x2048 to the very left just enough so it initially is absent of the unit. So if it moves 1px to the left, you can detect it when it IS in that location. How would you keep that location positioning for when the unit moves?
Eww um err

Did I mention it wouldn't detect one pixel movements, hence inaccuracy of, say, 8px or so?



None.

Dec 8 2009, 1:13 am Cinolt Post #55



I guess that's where the problem is, you did say detecting 1px was 'optional', but optional if you want a faulty system, which should equal no system at all, really. Not to mention this is 8px, that will screw up without doubt, it won't be a coordinate system, it'll be a system giving arbitrary, inaccurate numbers.



None.

Dec 8 2009, 1:36 am Kaias Post #56



Quote from name:yoonkwun
You obviously know what you're talking about. Even though a 0x2048px location directly on top a unit is not 'off more than half the units width', it's directly on top. When directly on top, it takes a good roughly 8px, with at least a Ghost, for how long the Ghost has to travel when a map detects when it's off the location.

What are the alternatives? 1x2048px? 2x2048px? That'll just increase the travel distance required to detect absence from that location. So? You place the location NOT in the center? Seems okay, you place a 0x2048 in the very left of the unit just barely so it detects it inside, so if it moves 1px to the right it'll detect movement, to the right. Then what about if it moves left? You can place another 0x2048 to the very left just enough so it initially is absent of the unit. So if it moves 1px to the left, you can detect it when it IS in that location. How would you keep that location positioning for when the unit moves?

Let's be honest though, I'm probably being confusing as ever, and you could be right and I'm just not getting something. Post a map and prove it, shouldn't take someone of your knowledge long. This time though try not dodging.
You should make sure to describe which method you're talking about when you say it can't work without inverted locations. In this case, however, both can work without them, though not as accurately (no one was pretending it would be though).


Lethal's Method:
Compares the distance from the former coordinates of the unit to the distance from the former former coordinates of the unit

This can still be done. Instead of placing the "former" locations by time (one loop after the other), place the new locations by a minimum distance travelled (when the unit exits that 1 pixel length location).
DIAGRAM:


Kenoli's Method:
Takes advantage of the fact that locations of even pixel location lengths cannot perfectly center and therefore have 1 pixel further out on one side than the other; thus allowing us to know how far out it is from a former position and on which side.

Still works, though not always perfectly known.
DIAGRAM:




None.

Dec 8 2009, 1:56 am Cinolt Post #57



I'm talking about Kenoli's method, if it's admitted that it's about '8px inaccurate', does that not mean it won't detect movements lower than 8px? If so then you can't call that working, it's not just 'more inaccurate' if it will be giving useless numbers.



None.

Dec 8 2009, 2:00 am Kaias Post #58



Quote from name:yoonkwun
I'm talking about Kenoli's method, if it's admitted that it's about '8px inaccurate', does that not mean it won't detect movements lower than 8px? If so then you can't call that working, it's not just 'more inaccurate' if it will be giving useless numbers.
Only if you're updating the 'former' location at the end of every loop. Only move it when the unit has moved outside of 1 pixel length location, because once you are outside it you know precisely how far it has moved. Until then you know within the unit's width.



None.

Dec 8 2009, 2:02 am Cinolt Post #59



Thanks that's the part I missed. Now I agree it'll work.

Disregard most of what I said..

Post has been edited 1 time(s), last time on Dec 8 2009, 2:22 am by yoonkwun.



None.

Options
Pages: < 1 2 3
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
Please log in to shout.


Members Online: Roy