More flexible Startpoint allocation/choosing (in lobby)

More flexible Startpoint allocation/choosing (in lobby)

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

More flexible Startpoint allocation/choosing (in lobby)

Post by hoijui »

[Help/Future Request] AI-player compatible Team-Startpoint allocation/choosing (in lobby)

I usually play Spring with one or two friends over LAN. We like to play in together in one team against some AI players. So far, we have not found a way to place ourselfs and the AI players as we would like.
We usually want to be on one side of the map, while all the AI players would start at the opposite end of it.
- When choosing 'Fixed' start positions, it doesnt work, casue all the human players get placed first, which makes the second to appear at the opposite side of the map as the first one.
- When choosing 'Random' start positions, we have to restart the game several times, till we start as we want.
- When choosing 'Choose in-game' start positions, we choose our positions, and when the game starts, the AI players either start all at the same spot or the whole game crashes.

I see two possible solutions:
- have a 4th setting 'manual start positions', where the players can choose their own and the start position of the AI player they host
- somehow get the AI to choose start positions when using the setting 'Choose in-game'

i guess the second option is nicer, but i dont know how hard it is to realise either.
..or is there a solution already?
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

you can already set the ai start position manually. ingame, before clicking ready enter in chat:

Code: Select all

.cheat
.team x (where x=teamnumber of ai, remember count starts at 0)
-click for start position
.team y (your own number)
.cheat
nonetheless i agree a little less hackish solution would be nice
- somehow get the AI to choose start positions when using the setting 'Choose in-game'
iirc that's not possible since the ai is not loaded until after the game starts
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Post by hoijui »

(deleted)
Last edited by hoijui on 22 Sep 2007, 12:47, edited 1 time in total.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Post by hoijui »

thank you! :-)

i will do it that way from now on!

..what you said about the AI...
maybe a simple algorithm could be added to either:
- assign the AI players to different startpoints (taken from the list of startpoints in fixed mode), which are inside the rectangle for their group/'ally'
- select (random) points with some minimal distance between each other to use as startpositions

this would be a bit less hackish and the human players would not exactly know where the AIs are placed (at least not from the start of the game).

i am not really a C++ coder (have sufficient practice in Java), but if it is possible and you could tell me about where in the code i had to start looking at, i would be glad to try it.
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Post by koshi »

hoijui wrote: maybe a simple algorithm could be added to either:
- assign the AI players to different startpoints (taken from the list of startpoints in fixed mode), which are inside the rectangle for their group/'ally'
- select (random) points with some minimal distance between each other to use as startpositions
both good ideas
hoijui wrote: i am not really a C++ coder (have sufficient practice in Java), but if it is possible and you could tell me about where in the code i had to start looking at, i would be glad to try it.
without any knowledge of the inner workings of the engine i suggest you take a look at GameSetup.cpp around line 154. i guess it would be necessary to test for ai player and call a custom CStartPosSelector (UI/StartPosSelector.cpp). but you should really ask a dev about that. maybe post a feature request.
also take a look at the springlobby thread, where a manual ai placement feature has already been requested.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Post by BrainDamage »

koshi wrote: also take a look at the springlobby thread, where a manual ai placement feature has already been requested.
the manual placement has been added 2 months ago ;)

now the limitation is the engine, not the lobby/launcher, you'll have to wait for the next release in order to be able to use it, the suggestion yokozar did was about extending the GUI for it, not the support
Post Reply

Return to “Help & Bugs”