Auto Swarm

Auto Swarm

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Auto Swarm

Post by Google_Frog »

http://spring.jobjol.nl/show_file.php?id=2018

A widget similar to Auto Skirm in function and structure. It does 2 things:
  • Raiders will move in a zig-zag when near enemies to try and avoid their shots.
  • Raiders will circle around enemy units if close enough to fire.
They only do this if they have an attack, fight or patrol command which makes it very easy to take control of them if you need to make them retreat or run through the enemies.

Let the micro vs. macro bawwing commence.
User avatar
Otherside
Posts: 2296
Joined: 21 Feb 2006, 14:09

Re: Auto Swarm

Post by Otherside »

i think this is possibly a step to far :P.

But CA is already micro intensive as is so any extra help is appreciated.

Aslong as micro gives a proper advantage over someone not paying attention and using widgets it should be ok :P
User avatar
ginekolog
Posts: 837
Joined: 27 Feb 2006, 13:49

Re: Auto Swarm

Post by ginekolog »

sounds nice, ll try it.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Auto Swarm

Post by Jazcash »

Who needs AI when you have widgets!?
BaNa
Posts: 1562
Joined: 09 Sep 2007, 21:05

Re: Auto Swarm

Post by BaNa »

BAAAAAAAAAAAAAAAAAAAWWWWww

whats next, a win the game widget?

this is entirely too going too far, I will make a widget that detects when other people use this so i can RAEG and selfd.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Auto Swarm

Post by Argh »

Great to see somebody working on this. I'd really like to see a Gadget version.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Auto Swarm

Post by Pxtl »

How does it determine if a unit is a raider?
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Auto Swarm

Post by Google_Frog »

Pxtl wrote:How does it determine if a unit is a raider?
There's a table of units it checks against. Currently it's setup for CA.
Great to see somebody working on this. I'd really like to see a Gadget version.
Couldn't it be converted very easily? The widget uses no allow command or command notify, no reference to player ID except when adding units. It basically just updates every 15 steps and uses units commands to decide what to do.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Auto Swarm

Post by CarRepairer »

Why convert it to a gadget so that everyone's computer processes everyone else's units? A widget can be included in a mod where you lock out external widgets, can't it?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Auto Swarm

Post by Argh »

A widget can be included in a mod where you lock out external widgets, can't it?
Absolutely, was just thinking that this might be something that could be modularized at some point and made a part of C.R.A.I.G. et al.

At any rate, I'll take a look this and see how it performs when tested with a lot of Units at once.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Auto Swarm

Post by lurker »

How much math is this thing actually doing?
Latency on unit behaviors is bad.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Auto Swarm

Post by manolo_ »

i like widgets, but that and the one that auto move your com (while airtrans is coming) are really a big step to far, why not a widget for diplomats, that aim infront of an unit (so it will hit the unit while its moving), or auto dgun widget
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Auto Swarm

Post by Google_Frog »

lurker wrote:How much math is this thing actually doing?
Latency on unit behaviors is bad.
Spring.GetUnitNearestEnemy every 15 steps for every raider and Spring.GetUnitSeparation if they have a fight or patrol command next. Then they do a few multiplications and 2 divisions if they need to move.

I tested with 100 units and only had about 2 fps drop when they had an attack command.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Auto Swarm

Post by 1v0ry_k1ng »

im going to test this tonight
how effective is it?
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: Auto Swarm

Post by Pendrokar »

manolo_ wrote:auto dgun widget
Which d-guns hawks out of the sky! :shock: :shock: :shock: (I so wanted to see that!)
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Auto Swarm

Post by Neddie »

Pendrokar wrote:
manolo_ wrote:auto dgun widget
Which d-guns hawks out of the sky! :shock: :shock: :shock: (I so wanted to see that!)
Seen it. Manually done it. Eh.
reivanen
Posts: 180
Joined: 12 Feb 2008, 15:52

Re: Auto Swarm

Post by reivanen »

This is absolutely fantastic!

Soon we don't have to command an army of retarded zombies, but actually play a STRATEGY game, where you can focus on strategy, and not be stuck walking hand-in-hand with every unit as they move about.

Anything that cuts out useless micro is for the win!

And about the diplomat baww, this suggested behaviour would be bad exactly why? Atm the engine does the exactly same thing for normal weapons. Now how retarded would it be for units not accounting flighttime in aiming...?
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Auto Swarm

Post by CarRepairer »

Pendrokar wrote:
manolo_ wrote:auto dgun widget
Which d-guns hawks out of the sky! :shock: :shock: :shock: (I so wanted to see that!)
Change the mod so that dgun is a regular weapon, then use firestate button. If you want it separate from regular laser, add an on/off button that allows dgun to shoot or not shoot so that firestate doesn't affect it, only the regular laser. Slow widgets not needed.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Auto Swarm

Post by BrainDamage »

Google_Frog wrote:
lurker wrote:How much math is this thing actually doing?
Latency on unit behaviors is bad.
I tested with 100 units and only had about 2 fps drop when they had an attack command.
framerate is not indicative how much cpu intensive is a script
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Auto Swarm

Post by Forboding Angel »

Hey neato, lookin real good. Have you tried it with evo google? Since evo units shoot through each other I wonder if this is even needed. What do you think? My immediate response it to put it in the mod, but what do you think?
Post Reply

Return to “Lua Scripts”