Ideal: zoning your map and tracking which zone a player is in and creating drones in all neighbouring zones and the current zone (with a small delay between each create unit so that you dont make 500 units at once; rather, 1 every 0.01 sec or something).
I never tested this system or mine on bnet... but (supposedly) it won't lag except for mouse detection. Since most of the movement is based around unit highlighted event, your guy will be very responsive. However the mouse down and mouse up events have to be tracked in mine so yeah...
Somewhere to go in the future: (someone made this post in my thread, maybe possible?)
Instead of filling the whole map with dummy units do this..... 1. Create a dummy type unit like you already have.
2. makes it collision size alot smaller, like .2 or .3. 10 times smaller than a marines collision
3. Make a ring of 15-20 dummy units around your mouse cursor (or a unit directly under the mouse cursor for initialization) but make sure you calculate how many dummy units you need to make such that there is no gaps in the ring. rememeber circle geometry from high school, lol.
4. whenever your mouse cursor moves out of the ring, it will highlignt one of the dummy units.
5. immediatley move the dummy ring units so that they make a ring around the unit that was highlighted and set the MousePosition variable to the highlighted unit. (before you move it to its new spot obviously) this will serve as mouse movement detection and require no grid of dummy units.
@FuzzYD: Go
I guess there's multiple ways... got to see what works and what doesn't lag :D
@FuzzYD: Go
Ideal: zoning your map and tracking which zone a player is in and creating drones in all neighbouring zones and the current zone (with a small delay between each create unit so that you dont make 500 units at once; rather, 1 every 0.01 sec or something).
I never tested this system or mine on bnet... but (supposedly) it won't lag except for mouse detection. Since most of the movement is based around unit highlighted event, your guy will be very responsive. However the mouse down and mouse up events have to be tracked in mine so yeah...
Somewhere to go in the future: (someone made this post in my thread, maybe possible?)
Instead of filling the whole map with dummy units do this..... 1. Create a dummy type unit like you already have.
2. makes it collision size alot smaller, like .2 or .3. 10 times smaller than a marines collision
3. Make a ring of 15-20 dummy units around your mouse cursor (or a unit directly under the mouse cursor for initialization) but make sure you calculate how many dummy units you need to make such that there is no gaps in the ring. rememeber circle geometry from high school, lol.
4. whenever your mouse cursor moves out of the ring, it will highlignt one of the dummy units.
5. immediatley move the dummy ring units so that they make a ring around the unit that was highlighted and set the MousePosition variable to the highlighted unit. (before you move it to its new spot obviously) this will serve as mouse movement detection and require no grid of dummy units.