Group AI Proposal: Auto-Pause on Delayed Response/High Ping
Moderators: hoijui, Moderators
Group AI Proposal: Auto-Pause on Delayed Response/High Ping
Is it possible to implement a Group AI which will automatically pause the game when you get a Delayed Response message or an extremely high ping, subject to a manual override? This could help with managing foolish players without losing them, and in theory reduce the number of early unnecessary drops and restarts that plague open games.
It can be made as a LuaUI widget, perhaps more easily. I may give it a shot when I have time.
-- Edit 2 ---
http://spring.unknown-files.net/file/22 ... se_Widget/
To install:
copy the file to Spring/LuaUI/Widgets.
To activate:
bind a key to luaui autopause and press it, or type /luaui autopause in the console. After it is triggered, it disables itself, and must be reactivated to work. It can only be enabled if you are the host.
To configure (optional):
edit the first three lines of the file with notepad.
Let me know what happens!
-- Edit 2 ---
http://spring.unknown-files.net/file/22 ... se_Widget/
To install:
copy the file to Spring/LuaUI/Widgets.
To activate:
bind a key to luaui autopause and press it, or type /luaui autopause in the console. After it is triggered, it disables itself, and must be reactivated to work. It can only be enabled if you are the host.
To configure (optional):
edit the first three lines of the file with notepad.
Let me know what happens!
Last edited by quantum on 25 Jan 2007, 11:38, edited 2 times in total.
quantum:
What happens if an even number of players have your widget enabled?
You could lock the widget to a single player, until someone adds a [0 | 1] style
parameter to the pause command. Note that you can tell if the game is paused
by keeping track of the return value of Spring.GetGameSeconds(), but that still
doesn't gurantee anything.
What happens if an even number of players have your widget enabled?

You could lock the widget to a single player, until someone adds a [0 | 1] style
parameter to the pause command. Note that you can tell if the game is paused
by keeping track of the return value of Spring.GetGameSeconds(), but that still
doesn't gurantee anything.
GroupAI has been left out in the cold for the last 5 versions of spring. There's no C API for groupAI, no C# layer, and most things added arent even accessible to groupAI as a result of differences in the API that shouldn't really exist. Also there is next to no GUI support for groupAI save adding little buttons for when entire groups are selected and rubbish networked line drawing support.
So for now I'd say replace mentions of the word *GroupAI* with *Lua UI*, its sad we've gotten to this point as it means we can never have things like winamp GUI and cpu intensive helpers, or groupAI side background music.
So for now I'd say replace mentions of the word *GroupAI* with *Lua UI*, its sad we've gotten to this point as it means we can never have things like winamp GUI and cpu intensive helpers, or groupAI side background music.
Uploaded a fixed version at UF. It works only if you are the host now. Thanks to trepan and Neddie for their suggestions and help in testing.
I think it's stable enough to be tested in a real game now.
http://spring.unknown-files.net/file/22 ... se_Widget/
I think it's stable enough to be tested in a real game now.
http://spring.unknown-files.net/file/22 ... se_Widget/
I think a general architectural change to the AI system might be in order to fix the issues with events. Namely IGroupAI and IGlobalAI inheriting from an IAIEventHandler so that stuff like FeatureDead can be added to both groupai and globalai by adding it to just IAIEvent Handler.
However what I would find useful is if you had the ability to spawn GroupAI lua gadgets, where you have the UI renderer (lua) and the data source (groupAI/globalAI).
Or rather if we made groupAI selections by making them spawn from lua gadgets rather than lua Gadgets spawned from groupAIs. This would benefit both systems greatly, allowing lua gadget that control winamp, even show pms from the lobby ingame, or report game stats to a server as its ongoing.
However what I would find useful is if you had the ability to spawn GroupAI lua gadgets, where you have the UI renderer (lua) and the data source (groupAI/globalAI).
Or rather if we made groupAI selections by making them spawn from lua gadgets rather than lua Gadgets spawned from groupAIs. This would benefit both systems greatly, allowing lua gadget that control winamp, even show pms from the lobby ingame, or report game stats to a server as its ongoing.