Staredit Network

Staredit Network -> Concepts -> New type of Selection System
Report, edit, etc...Posted by Zeratul_101 on 2006-09-30 at 13:42:00
rich20edit.dll or something like that. moonlighturtle tried to help me with it, no success. unless SCMD2 wasn't made to totally support windows 2000

ADDITION:
anyhow, has anyone found an intersection formula? i went for a little look, but didn't find anything.
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-30 at 14:50:27
Yes I linked to it in an earlier post. Do the algebra to figure that out and it'll make sense.
Report, edit, etc...Posted by Zeratul_101 on 2006-09-30 at 14:56:37
goddamnit, so much math...
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-30 at 15:04:05
Heh. Don't be intimidated by the numbers and symbols. If you can understand one part, try to understand another one that's connected to it. Keep doing that until you understand all connected parts, then try to understand what the connection means. That's how you learn.
Report, edit, etc...Posted by Zeratul_101 on 2006-09-30 at 15:06:08
oh, don't get me wrong, i understand all of it. its just not gonna be pretty for me to make it.
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-30 at 15:09:55
No, it isn't. Once you have the formula you'd need to use gobs of arithmetic triggers combined together and pray it works. Certainly not impossible, but woe to ye if you have to debug them for whatever reason. tongue.gif

Don't worry, I'll give it a shot later. Once I can get the slope finder part working, at least.



The best part is it'd only need to be made once. Then you could use the template for it with almost any map, as long as you don't plan on changing the map size or needing map edges for whatever reason. tongue.gif
Report, edit, etc...Posted by Zeratul_101 on 2006-09-30 at 15:23:00
so our formula would be 'ax + b' where:

b = y intercept
x = x location
a = slope

b and x are predetermined.


if so, then i could make the calculator while you work on the slope finder. i already have a little bit of experience with stuff like this already.

the problem with these calculations are decimals. have you found a way to easily use them or otherwise avoid them?


ps, i'm in principles of math 11 so i understand graphing already.
Report, edit, etc...Posted by Tuxedo Templar on 2006-09-30 at 15:38:08
For decimals, what I just do is add a few place values to the number, and treat the extra amount as its decimal amount. It's a little bit tricky to work that way at first, but I've done it before.
Report, edit, etc...Posted by Zeratul_101 on 2006-10-01 at 00:51:32
so i'll work on the intersection equation and you'll work on slope finding?

ADDITION:
the formula is 'ax + b' right?
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-01 at 01:41:22
No. That's the equation for a line. And in fact, I think that's the wrong thing to look at, now that I've done a bit more research. The math for this is daunting, but as long as we don't end up using powers or roots or anything like that it should still be possible, and therefore only a matter of time and energy. I've got the way to find the two points of the line each unit is traveling in (pretty accurate too, which I outlined earlier, but a bit tricky to implement), so getting the math out of the way is all we really need.

Someone gave a good explanation of it, which you can find in a discussion here. So far, this is the best specific explanation I can find for it, though. Yeap, lots of maths. tongue.gif



Still not quite simple, but I've got an idea how I could get that to translate to triggers. Boy, this'd be the most complex thing ever done with triggers if it gets pulled off. tongue.gif


EDIT- If it helps simplify things, the demoninator of the ua and ub equations are the same, and the two factorials (x1 - x3) and (y1 - y3) are reused as well. You could just copy the triggers for those, really.
Report, edit, etc...Posted by Zeratul_101 on 2006-10-01 at 01:56:57
ya, my bad, i meant that'd be our linear equation. although it is flawed. i'm gonna read over your post later

ADDITION:
were you thinking about using all four quadrants or just quadrant 1(the 'standard' one with positive y and x axises)

ADDITION:
anyhow, i'm thinking something like this would be better:

y = a(x + p) + q

where p = negative x offset and q = y offset. a = slope and x = well, x.

ps, i just made this off the top of my head.

ADDITION:
hehe, i think it works!

ADDITION:
i recommend this since the only data we will actually have are the slope, and the vector's location on the grid.
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-01 at 02:03:11
Quadrants: Positives only.

The data we'd have is two points to define each line. We have to use those to find all the other information up to the intersection. I'm working on that now.
Report, edit, etc...Posted by smasher25 on 2006-10-01 at 02:04:16
QUOTE(Lethal_Illusion @ Sep 24 2006, 07:41 PM)
This is a selection system allowing you to select any part of the map at any time. It also detects who selected that place.

The concept is that you would have 2-12 air units seperated around the map. To select an area, you simply select them (via hotkey), and order all of them to move to the desired spot. You would then use different engines to detect what direction each was heading in and pinpoint that location, then move then back to their resting place. You would then do the desired action (depending on what you selected, or function you had set) at that set spot.

Some things this could be used for are:
1) Easy to-use Gunner System
2) Selection System (you could even 'select' text on you screen if the screen was centered on the hero...)
3) Menu System
4) Item System (simply click on your hero to switch weapons)
5) Information System (right click on an enemy unit to view its stats)
and many more...

I still need help working out the details (such as best way to pinpoint the area), so any help would be... well... helpful.

And no, I don't care if anyone uses this (that is, if they can find a way to impliment it tongue.gif).
[right][snapback]567555[/snapback][/right]


I dont know exactly what you're talking about there. Er could you be a little more specific?
Report, edit, etc...Posted by Zeratul_101 on 2006-10-01 at 02:05:42
you mean we only need the two points to find the slope...

we could easily input vector location data, and it'd help enormously with next to no effort and save alot of processing time.

ADDITION:
QUOTE(smasher25 @ Oct 1 2006, 12:03 AM)
I dont know exactly what you're talking about there. Er could you be a little more specific?
[right][snapback]570494[/snapback][/right]


when you find out exactly how gps works, get back to us.
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-01 at 08:44:34
Hmm. Ok, one thing I've determined is that for large maps or high precision, it takes like 4-5 seconds just to find the lines with my current model. I can't really improve that unless I can find a faster air unit or something. Otherwise, it's got good precision, though.

There's a chance this single-click method might not be efficient enough to warrant all the work it'll take compared to doing a multi-click method, though. But either way, it's not gonna be a true real-time system it seems. Waiting 5 seconds to target isn't good enough for a proper gunner system, I think.

ADDITION:
Heh, I just thought of a really crazy idea! I'm gonna do a bit more research on this one, and report back if it'll work or not.

One word: Comsats (not what you think).

ADDITION:
Ok have a look at this real quick to see roughly what I'm getting at. Note that they're attacking floor traps; not each other.

[attachmentid=21252]
Report, edit, etc...Posted by Lethal_Illusion on 2006-10-01 at 10:52:43
QUOTE(smasher25 @ Oct 1 2006, 01:03 AM)
I dont know exactly what you're talking about there. Er could you be a little more specific?
[right][snapback]570494[/snapback][/right]


You would be able to right click on a place in the map to select it.
Report, edit, etc...Posted by Zeratul_101 on 2006-10-01 at 18:15:44
just what model are you using tux, the one with strip locations?

does that mean you actually completed the concept already?

ps, would you mind pming me the map?

ADDITION:
why was desperado saying you only need two vectors? cause if they're coming straight toward each other, you won't be able to detect where on that line they're gonna stop. unless i'm missing something...

ADDITION:
ps, the' ax + b' formula they had in the example won't work because everytime a changed, b would change as well. hence why we need the ' a(x + p) + q' formula. a and x are still the same, but instead of relating to the y intercept, p and q refer to the vector's location.

ADDITION:
ps, the intersection equation with my linear equation takes 9 steps to complete crazy.gif . 6 to find the x and 3 to find the y.

ADDITION:
also, we need a name for the system tongue.gif
Report, edit, etc...Posted by Urmom(U) on 2006-10-01 at 18:43:45
Hmm at first I didn't really know what you guys meant at first with this system. Kenoli showed me what he meant with his test map and all I have to say is that it is a great idea. Kenoli isn't detecting slope though, he is just brute forcing it with all of the combinations on where the scourges can go.
Report, edit, etc...Posted by Zeratul_101 on 2006-10-01 at 18:52:45
lmfao, that noob tongue.gif i'll probly have defined slopes but still end up doing the math for my template. the thing is though, he'll still probly have less triggers in the end rolleyes.gif
Report, edit, etc...Posted by Urmom(U) on 2006-10-01 at 18:58:40
His trigger system is actually really efficient and works better than having to find all of these slope calculations.
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-02 at 15:24:12
QUOTE(Urmom(U) @ Oct 1 2006, 05:58 PM)
His trigger system is actually really efficient and works better than having to find all of these slope calculations.
[right][snapback]570688[/snapback][/right]

Why ya'll so afraid of math? A few binary countoffs and some cut and paste ain't that bad. tongue.gif
Report, edit, etc...Posted by Urmom(U) on 2006-10-02 at 15:25:53
lol math gives me a headache after doing it for a while and Algebra 2 H isnt even until the second semester for me this year tongue.gif. it doesn't seem like slope would give you as accurate results than by brute forcing it.
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-02 at 15:44:28
Actually, brute forcing it means you need to do the slope calculations at least once anyway for each spot. Simply putting the math into the triggers not only saves you that step, but reduces the margin of error from having to do it seperately for each spot (assuming you don't screw up the math triggers). Plus if you need to find slopes for different lines in different areas, you can just cut and paste the math triggers as text and use Find and Replace to change counters and parameters.

And if anyone's wondering, there is a way to do multiplication triggers in one trigger loop, if there's a good need for it (not simply duplicating the triggers endlessly I mean). It takes like 600 triggers for a given multiply, though. tongue.gif It can, fortunately, be cut and pasted just the same.




Anyway I did a little more experimenting with the comsat system, and while it does find a spot with 1 click, it unfortunately uses up 7 unique computer players in order to be repeatable (that is, it can allow up to 6 repeats within one comsat's cloaked detection duration). tongue.gif Plus it takes 3-5 seconds for a specific shot to register, but it does so within 2x2 accuracy (in theory). The unit overhead is also quite high, plus it uses mobile grids to home in on the exact spot (which means potential interference).

So yeah, the arithmetic system is still the way to go it seems. At least for a good one-click method.
Report, edit, etc...Posted by Zeratul_101 on 2006-10-02 at 19:05:11
anyone know the exact agnle precision required for a 256x256 map? i got 0.11212467 of a degree pinch.gif .
Report, edit, etc...Posted by Tuxedo Templar on 2006-10-02 at 19:36:21
We're not using angles here, though. We just need slope. I wouldn't worry about precision as you can't detect better than 1 pixel of the unit's position in its container.
Next Page (3)