New starting position options
Moderator: Moderators
-
- Posts: 17
- Joined: 24 Nov 2013, 09:14
New starting position options
Hello spring community,
I am again soliciting feedback for a new feature. The feature would improve the Team FFA game type by providing a new StartPosType (rts/Game/GameSetup.h:64). To be specific, this is when there are several allyteams (>=3) with >=2 teams (usually 1 player per team) on each allyteam. Popular maps for this game mode in BA/TA are mearth, dworld, throne, etc. However, these games usually end with complaining and comments about "free wins".
At the moment the players have the choice between a small number of starting position options for team ffa, none of which provides a satisfying game. Starting with fixed positions only works for a small number of maps, and players need to ensure that their team number aligns with the map. Starting with random positions usually gives one or two teams a strong tactical advantage by placing them close together. Any teams that are far apart in this setting are usually eliminated quickly. Starting with "Choose in game" (see also "Choose before game") usually means that the players have to manually set starting boxes for each allyteam. This is a real chore since most maps do not have an arbirtrary number of easy symmetries and the boxes need to be specified numerically to the autohost software (SPADS).
What I propose is a new StartPosType, "StartPos_RandomTeamFFA". This mode would randomize the starting positions, and then perform a shuffling step to ensure that players on the same team start closer together, and players on opposite teams start further apart. The algorithm for shuffling the players is not very complicated (search for a shuffle path that leads to minimization of a heuristic value representing how "spread out" each team is, and how "close together" opposing teams are). The algorithm isn't perfect -- there are some combinations of map and team configurations that won't permit good starting positions to be made. Also, the distance between players is sometimes not a good heuristic of shortest path length between them. That said, this simple algorithm should provide good starting positions for most popular ffa maps that have more or less evenly distributed start spots and fairly direct paths between these spots.
This option would let people set up team ffa games more quickly without the need for boxes. It is also consistent with the "random start" characteristic of FFA that rewards scouting, surveillance, and careful expansion planning.
Comments and flames welcome.
I am again soliciting feedback for a new feature. The feature would improve the Team FFA game type by providing a new StartPosType (rts/Game/GameSetup.h:64). To be specific, this is when there are several allyteams (>=3) with >=2 teams (usually 1 player per team) on each allyteam. Popular maps for this game mode in BA/TA are mearth, dworld, throne, etc. However, these games usually end with complaining and comments about "free wins".
At the moment the players have the choice between a small number of starting position options for team ffa, none of which provides a satisfying game. Starting with fixed positions only works for a small number of maps, and players need to ensure that their team number aligns with the map. Starting with random positions usually gives one or two teams a strong tactical advantage by placing them close together. Any teams that are far apart in this setting are usually eliminated quickly. Starting with "Choose in game" (see also "Choose before game") usually means that the players have to manually set starting boxes for each allyteam. This is a real chore since most maps do not have an arbirtrary number of easy symmetries and the boxes need to be specified numerically to the autohost software (SPADS).
What I propose is a new StartPosType, "StartPos_RandomTeamFFA". This mode would randomize the starting positions, and then perform a shuffling step to ensure that players on the same team start closer together, and players on opposite teams start further apart. The algorithm for shuffling the players is not very complicated (search for a shuffle path that leads to minimization of a heuristic value representing how "spread out" each team is, and how "close together" opposing teams are). The algorithm isn't perfect -- there are some combinations of map and team configurations that won't permit good starting positions to be made. Also, the distance between players is sometimes not a good heuristic of shortest path length between them. That said, this simple algorithm should provide good starting positions for most popular ffa maps that have more or less evenly distributed start spots and fairly direct paths between these spots.
This option would let people set up team ffa games more quickly without the need for boxes. It is also consistent with the "random start" characteristic of FFA that rewards scouting, surveillance, and careful expansion planning.
Comments and flames welcome.
Re: New starting position options
The idea is good but think it would be better to do it via the game's lua.
For BA it could be added here:
http://imolarpg.dyndns.org/trac/balates ... _spawn.lua
Otherwise all the lobbies would have to be adapted , too.
Also more flexible if you want to tweak the algorithm, releasing new BA version is easier than waiting for new engine version.
For BA it could be added here:
http://imolarpg.dyndns.org/trac/balates ... _spawn.lua
Otherwise all the lobbies would have to be adapted , too.
Also more flexible if you want to tweak the algorithm, releasing new BA version is easier than waiting for new engine version.
Re: New starting position options
Wrong forum. This belongs in game development
Re: New starting position options
every new lua is a bad idea. so many games f****d by ugly lua-coding. this makes the list of banned lua by manual only longer
User was warned for this post; felony 1, felony2.
--FLOZi
User was warned for this post; felony 1, felony2.
--FLOZi
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: New starting position options
We've thought of this before & there was once an effort to do it within the engine too - but we never found a "the algorithm" (as you call it) which was reliable enough for us to include. Algorithm welcome!
Code: Select all
it should look like this
-
- Posts: 17
- Joined: 24 Nov 2013, 09:14
Re: New starting position options
My thoughts:
The existing start position handlers are done as part of the engine, and are c++. It seems a bit awkward to extend a single start position mode in Lua, or to make it mod-specific. Second, this is truly an option for all mods. On the surface, Lua code may seem to be more maintainable, but it can add significant complexity to the code base if start position modes are spread out into both c++ and Lua.
The algorithm I'm thinking of is just based on a heuristic -- there are worst cases where you can't actually position the players together. So, it wouldn't be perfect. Still since it is an option, players may still get some enjoyment out of using it.
Knorke raises a good point about needing to modify the lobby clients. I think that this can be done in a minimalistic way by adding a new battle setting to spads' "startpostype" variable which would allow users to use the new feature. Certain theme servers (ie: FFA) may also wish to create a TeamFFA preset, but that is the purview of the respective admins. I would likely target the 97.0 for the feature and try to see if I can contribute spads support to coincide with the release. (I don't know when this will be, though.)
The existing start position handlers are done as part of the engine, and are c++. It seems a bit awkward to extend a single start position mode in Lua, or to make it mod-specific. Second, this is truly an option for all mods. On the surface, Lua code may seem to be more maintainable, but it can add significant complexity to the code base if start position modes are spread out into both c++ and Lua.
The algorithm I'm thinking of is just based on a heuristic -- there are worst cases where you can't actually position the players together. So, it wouldn't be perfect. Still since it is an option, players may still get some enjoyment out of using it.
Knorke raises a good point about needing to modify the lobby clients. I think that this can be done in a minimalistic way by adding a new battle setting to spads' "startpostype" variable which would allow users to use the new feature. Certain theme servers (ie: FFA) may also wish to create a TeamFFA preset, but that is the purview of the respective admins. I would likely target the 97.0 for the feature and try to see if I can contribute spads support to coincide with the release. (I don't know when this will be, though.)
Re: New starting position options
Doing it in c++ is forcing it on all spring projects keep your game specific requests in Lua please!
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: New starting position options
In this case it wouldn't force it all on projects because the "startpoint placing" modes seen by the lobby are currently controlled by the engine - he could simply add a new one without changing what already exists. It would only work for lobbies that updated to use it, though. But I'd have no objection to it gadget form, of course.
Re: New starting position options
I would say go all game side lua but the situation is massively complicated by drawing start-boxes, so some engine/lobby support is required.
It would be nice to allow white/black listing of start position methods via engineoptions.lua or such. e.g. MCL should only ever be played with fixed / random positions, never boxes.
It would be nice to allow white/black listing of start position methods via engineoptions.lua or such. e.g. MCL should only ever be played with fixed / random positions, never boxes.
-
- Posts: 843
- Joined: 13 Aug 2007, 13:19
Re: New starting position options
Hmm, nixa made (something like) this. It was used for a while and very popular.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: New starting position options
@klap, got a link?
-
- Posts: 843
- Joined: 13 Aug 2007, 13:19
Re: New starting position options
No, I have no idea if it was ever released or if the code was shared with anyone. It was for the 2v2v2 FFA server if that rings a bell for anyone.
Re: New starting position options
Flozi a proper Lua implementation would allow you to easily ignore the start boxes. Adding MORE bloat like this to the engine is bad
Re: New starting position options
I remember that. I wonder if that was actually a patch to spads.klapmongool wrote:No, I have no idea if it was ever released or if the code was shared with anyone. It was for the 2v2v2 FFA server if that rings a bell for anyone.
Re: New starting position options
And how do you set lua start boxes before the game launches?smoth wrote:Flozi a proper Lua implementation would allow you to easily ignore the start boxes. Adding MORE bloat like this to the engine is bad
Some stuff does have to have lobby and ergo engine functionality!
Re: New starting position options
Either we read the ones being sent via startscript(I presume this is where they are communicated) or we demand that be added so we can!
Re: New starting position options
The problem is to break it down into strategic value of a start position.
I think you need to estimate
- closeness of ressources
- space to build,
- narrow entrances to defend
- routes to allys and enemys
- and expanding options (really difficult too estimate)
You evaluate those all, weight them, and find the config that sucks the least..
I think you need to estimate
- closeness of ressources
- space to build,
- narrow entrances to defend
- routes to allys and enemys
- and expanding options (really difficult too estimate)
You evaluate those all, weight them, and find the config that sucks the least..
-
- Posts: 843
- Joined: 13 Aug 2007, 13:19
Re: New starting position options
Nixa just made settings per map. He showed me once how he did it and it was very easy.PicassoCT wrote:The problem is to break it down into strategic value of a start position.
I think you need to estimate
- closeness of ressources
- space to build,
- narrow entrances to defend
- routes to allys and enemys
- and expanding options (really difficult too estimate)
You evaluate those all, weight them, and find the config that sucks the least..
The ABC 2v2v2 FFA, I remember now!
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: New starting position options
Hmm; I would rather have a good algorithm than have settings per map, an algorithm is much easier to maintain. But I agree with Pica.