Write AIs to play football
This project is maintained by richard shepherd nick pollard
Fixed a rather nasty bug where tackling did not correctly remove possession from the tackled player. This meant that the tackled player could later kick the ball even though they did not have it. This fix makes a previous discussion more important, namely whether there should be a 'grace period' after taking possession to give the new player a chance to kick the ball. At the moment, possession can go backwards and forwards between players for a long time until (via the random element in tackling) one player fails to get it. I need to implement something for this.
Replaced Game.setSimulationMode(bool) with Game.setTurnRate(rate). This lets you choose the speed at which turns are taken. This does not affect game-time, it just affect the real-world time that turns take. For example: set to 1.0 to play in real-time, 0.5 to play at twice real-time and 0.0 to play as-fast-as-possible.
The ball's speed is set to 0.0 and its vector to (0.0, 0.0) when it is controlled by a player. The ball moves with the player when it is controlled, so these values have no meaning in this case. Zeros are (slightly) less confusing than retaining the ball's pre-controlled values.
There is now a grace-period of one turn after taking possession (either of a free ball or by tackling) where other players cannot take possession. This give the successful player a chance to do something with the ball, such as kicking it. This does not affect you issuing the TAKE_POSSESSION action - you can still do that - but it will not have any effect in the turn immediately after another player has taken possession.
Improved timing when playing the game in real-time mode. The turns now take account of the time taken by AIs, so that the clock timing is more accurate. This does not affect the game itself - it just makes the game-time match real time more accurately.
Changed the skill-variation when kicking. Previously a player with zero accuracy would kick a ball completely randomly. Now there is a maximum of 180 degrees of variation. Note that there is still additional variation to kicking if you are not facing the right direction.
Fixed a bug where a player's direction can go to 360 degrees, which then prevents movement working correctly.
Removed the 'energy' field from players' dynamicState.
Happy Christmas!
Some extra validation for the KICK action. You cannot now kick with speed less than 0.0 or greater than 100.0.
I have removed the 'speed' field from the MOVE action. Without energy in the game, there was no point moving at less than full speed, and moving at variable speed had never been implemented properly. You do not need to change your code for this, but if you pass a 'speed' field with the MOVE action it will be ignored.
The game-engine now forces abilities to be between 0.0 and 100.0. Previously you could specify abilities less than 0.0 or greater than 100.0.
Some enhancements to the GUI: showing player numbers and the direction players are facing. Also, now draws the ball on top of the players, so that it it can't get 'lost'.
Added a simple GUI. See: Running the GUI.
Added the game length in seconds to the GAME_START event.
The AI name is now used as the team name. There is no change to the API for this, as the team name was always sent, though previously it was an empty string.
Fixed the bug which gave an advantage to team 2.
Running from a command-line no longer shows the AI's stdout in the console. Only the output from the game-engine is now shown.
Updated the 'installing the framework' page, to include a workaround for npm not working correctly with the current installation of node.js.
Added notes about installing .NET 4 as needed by the C# BootAndShoot sample.