Update:
Admittedly this IS rather later than planned, but it turns out I was being pretty optimistic when I said I was 'finished'. Fifty-additional-lines-of-code optimistic; including a timer, a visual output and a complete re-haul of what I am naively calling my 'engine'. Note: the ball is the black dot that spends most of the game flashing into and out of existence, and when it is in existence thinking "Oh, this patch of grass again".
I apologise for the points where the entire board goes blank, that is when the moment that the screen recorder takes an image syncs up with when I clear the board before placing the ants at their next position. As you see in the message box at the end the game was a nil-nil draw, and that was with 51 players on each side. Clearly there is no need to replace Manchester United with giant robotic ants. Yet.
My game has some simplified rules:
- Players start randomly positioned around their own half.
- The goalies are only only allowed to move up and down their goal line (orange).
- When a player runs into the ball it is kicked in a straight line of length ranging between 10 and 30 cells. The ball stops if it hits another player.
- If the ball goes out the sides it is randomly positioned on a line parallel to the halfway line.
- If the ball goes out the ends it returns to the centre (a weak simulation of a goalkick).
For interested parties, here is the entire spreadsheet of my project. For the football program go to the "Football" sheet, then CTRL+E to bring up the menu and type in "football".
Technical details:
The way I have written this program is such that it processes the entire game before putting up the display. The benefits of this are a smoother visualisation and the ability to remove the 'trail' of the ant making the visual output much clearer. This means I am now not storing the locations of my ants in excel cells, but in 2 three dimensional arrays (three because I reference by player number, by team number and by turn). This is much more memory heavy, but gives the benefits listed above.
2101,
mathmo
Easter Egg 1: A chimpanzee riding a Segway.
Easter Egg 2: In the spreadsheet go to the sheet called "Game", CTRL+E to bring up the menu and type in "game2". Be amazed. WARNING: This uses my old style of processing so will take a while.
No comments:
Post a Comment