Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: ¿¿Midpoint between two units??
¿¿Midpoint between two units??
Jul 24 2009, 8:25 pm
By: crutex  

Jul 24 2009, 8:25 pm crutex Post #1



I'm having trouble coming up with a solution to this problem. I need to center a location at the point between two units (range within same screen). Don't even know where to begin!

Post has been edited 1 time(s), last time on Jul 25 2009, 2:32 pm by crutex.



None.

Jul 24 2009, 8:26 pm Falkoner Post #2



Mobile grids, chicko. Keep doing mobile grids outward, at the same time, until they touch, the point at which they touch is the center.



None.

Jul 24 2009, 8:36 pm crutex Post #3



Quote from Falkoner
Mobile grids, chicko. Keep doing mobile grids outward, at the same time, until they touch, the point at which they touch is the center.
That would potentially take a lot of cycles wouldn't it?



None.

Jul 24 2009, 9:17 pm JaFF Post #4



There are two possible solutions: the laggy but simpler one and the lagless but harder one.

The laggy one involves mobile grids. Though I called it 'laggy', it is not always true. It only becomes laggy when you have to cover large distances or you don't know where the units are in relation to each other. The second condition seems to hold, judging by the limited description of the problem you gave us.

The lagless solution involves Location Grids. Those are systems you might not want to deal with if this middlepoint problem is not fundamental for your map.

If you tell us more, we will pick the best solution and describe it in detail for you.

Regardless of what we choose, it would be a good idea to read the Grid Systems article.



None.

Jul 24 2009, 9:31 pm CecilSunkure Post #5



((x1 + x2)/2),((y1 + y2)/2)

Would this be used in the lagless one?



None.

Jul 24 2009, 9:41 pm JaFF Post #6



Quote from CecilSunkure
((x1 + x2)/2),((y1 + y2)/2)

Would this be used in the lagless one?
Yes. We would first get the coordinates and then plug them into this formula.

Then again, one could do this: find coordinates of both units and then, after comparing them in a slightly different formula, launch a mobile grid starting from one of the units. In fact, I like this solution the most - it does not require a location grid and will not cause much lag.

I say go with this method unless you have flying units between the two units.

If you feel inconfident about how to do it after reading through the Unit Coordinate Detection article, the Binary Countoff article and the Counter Arithmetic articles, post any questions you may have and we'll gladly answer them.



None.

Jul 24 2009, 9:52 pm crutex Post #7



ya I am definitely not using a coordinate grid system and will think of something else if that's the only decent solu. ^^



None.

Jul 24 2009, 10:06 pm JaFF Post #8



By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.



None.

Jul 24 2009, 10:50 pm crutex Post #9



Quote from JaFF
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point



None.

Jul 24 2009, 11:33 pm JaFF Post #10



Quote from crutex
Quote from JaFF
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?



None.

Jul 25 2009, 2:32 am crutex Post #11



Quote from JaFF
Quote from crutex
Quote from JaFF
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
you need 1 burrowed unit for each demarcation on each axis (2)



None.

Jul 25 2009, 8:30 am JaFF Post #12



Quote from crutex
Quote from JaFF
Quote from crutex
Quote from JaFF
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
you need 1 burrowed unit for each demarcation on each axis (2)
If by demarcation you mean 'deseletion', you're wrong. Just... read through the Grid Systems article to fully understand what they're about and how they're made. It might actually show you that they're simpler than you think. ;)



None.

Jul 25 2009, 2:36 pm crutex Post #13



Quote from JaFF
Quote from crutex
Quote from JaFF
Quote from crutex
Quote from JaFF
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
you need 1 burrowed unit for each demarcation on each axis (2)
If by demarcation you mean 'deseletion', you're wrong. Just... read through the Grid Systems article to fully understand what they're about and how they're made. It might actually show you that they're simpler than you think. ;)
ya I am not wanting to use this system



None.

Jul 25 2009, 2:54 pm JaFF Post #14



If you're not willing to use a coordinate system (which is a bad choice, believe me; it is very simple so set up), then you can either use only mobile grids (grossly ineffective) or just order two cloacked wraiths to move from one unit to the other (where they collide is the middle point; this method is really slow though).



None.

Jul 25 2009, 3:09 pm Sorrow_Faith Post #15



what if u had interceptors from a place where they were cloaked replace those cloaked wraiths? (Since crutex said within same screen, with interceptor's speed, wouldn't they collide before being fully visible?) But as stated b4, telling exactly what u need accomplished/and the purpose (besides just finding midpoint, tell 'y' u need to find the midpoint for, any info would be helpful rly)



None.

Jul 25 2009, 3:19 pm JaFF Post #16



Quote from Sorrow_Faith
what if u had interceptors from a place where they were cloaked replace those cloaked wraiths? (Since crutex said within same screen, with interceptor's speed, wouldn't they collide before being fully visible?) But as stated b4, telling exactly what u need accomplished/and the purpose (besides just finding midpoint, tell 'y' u need to find the midpoint for, any info would be helpful rly)
It takes about 2 seconds for them to become visible. That might be enough. The problem is that you need two computer players to use the generic/patrol trick.



None.

Jul 25 2009, 6:55 pm Falkoner Post #17



Wait a minute, if they're within the same range, you should DEFINITELY use Mobile Grids, it should only take a few trigger cycles, depending on what size unit you use for the grids.



None.

Jul 25 2009, 7:19 pm JaFF Post #18



Quote from Falkoner
Wait a minute, if they're within the same range, you should DEFINITELY use Mobile Grids, it should only take a few trigger cycles, depending on what size unit you use for the grids.
It can be done within one trigger cycle: grids can be run multiple times per loop, as long as you do it carefully. :)

And I'm just giving other alternatives, so crutex has more to choose from.



None.

Jul 25 2009, 7:23 pm Falkoner Post #19



Quote
It can be done within one trigger cycle: grids can be run multiple times per loop, as long as you do it carefully. :)

Well, I was thinking of lag, as long as he isn't like doing it every trigger cycle it shouldn't be a problem.



None.

Jul 25 2009, 7:29 pm crutex Post #20



Quote from JaFF
If you're not willing to use a coordinate system (which is a bad choice, believe me; it is very simple so set up), then you can either use only mobile grids (grossly ineffective) or just order two cloacked wraiths to move from one unit to the other (where they collide is the middle point; this method is really slow though).
The thing is This is a large map, and would require what 128*2 locations for a 128x128 map? Considering this is a noncritical part of the map, that seems a lot more ineffective than just changing the idea 8)

So you people think that the mobile grid solution described above will work? Would it not require 1 cycle per unit created (due to needing to check where they meet after each unit added)?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[03:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
Please log in to shout.


Members Online: 4emmac8423hh2, 9adrianc822ya0, 9jordane423wB4