playerData
I assume the indexes in this array directly correlate to player id's? So playerData[me] == my player data?
What are the possible values for the .colour property? Is it numbers or strings? If strings, how do I localise them - using the _() function? How is colour defined - team, starting position, something else?
I assume the .position property can be used to cross-reference with startPositions to get x,y of that position?
What are the possible values for .team property? What happens if the game is using dynamic alliances (alliancesType == ALLIANCES) - the object won't get updated? Considering the presence of allianceExistsBetween() function, is there any need for the .team property in the playerData array? Or does this property only apply when alliancesType = ALLIANCES_TEAMS to state the team name (eg. A, B, C, etc)?
startPositions
Is this array indexed by the player id, or by the start position on the map?
Eg. if player 4 is in position 2, to get the start position of player 4 do I:
a) startPositions[playerData[4].position]
or
b) startPositions[4]
Sorry for all the questions. I'm documenting as I go
playerData and startPositions
playerData and startPositions
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: playerData and startPositions
Both playerData and startPositions are indexed by player id. Ignore colour for now, it is not useful the way it is (it is an index into a colour array which is not accessible). The position property can be used to figure out where on a map you start, if you know the map and its starting positions already somehow. The team property may not be useful, either. It is only applicable if alliancesType == ALLIANCES_TEAMS, and it is an integer value.
Re: playerData and startPositions
It might be a funny idea to make an AI that behaves differently depending on its color. Yellow AI loves New Paradigm bodies, etc.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: playerData and startPositions
NoQ, a bit like factions?
Yeah, that would be interesting, but I would say that this should be cheating AI, using specified bodies (and propulsion) from start (without real research, maybe weapons should be researched normal way), but begin with light ones and then (depending on elapsed time or opponents strength or actions) would switch to medium and heavy ones.
Yeah, that would be interesting, but I would say that this should be cheating AI, using specified bodies (and propulsion) from start (without real research, maybe weapons should be researched normal way), but begin with light ones and then (depending on elapsed time or opponents strength or actions) would switch to medium and heavy ones.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
Re: playerData and startPositions
Yeah, this is a nice idea too (:
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: playerData and startPositions
@per: is there any reason for separating out playerData and startPositions in that case? why not just put the start positions in to playerData?
Also, if I'm on a 4 player map, but there are only 2 active players, how do I work out the starting positions of the 2 empty slots?
And on the subject of player data: http://developer.wz2100.net/ticket/3123
@NoQ: That sort of thing could lead to a new way to make AIs more dynamic - based on their starting position, colour, date, map, etc., they could choose different "personalities".
Also, if I'm on a 4 player map, but there are only 2 active players, how do I work out the starting positions of the 2 empty slots?
And on the subject of player data: http://developer.wz2100.net/ticket/3123
@NoQ: That sort of thing could lead to a new way to make AIs more dynamic - based on their starting position, colour, date, map, etc., they could choose different "personalities".
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO