$23.99
Implement the Agar.io game as in http://agar.io using the Allegro graphical library with respect to the following issues:
• You may use mouse clicks or direction keys to direct your cell(s).
• You will implement a single player version of the game; player's opponents should be bots (computer controlled players). Bots should have rational strategies (e.g: in some neighborhood, approach to smaller cells, go away from the bigger ones, take feeds with some randomness)
• Game should be played in a limited-size world, a small part of which is
shown at a time. The world should be consistent; the game should be played in the whole world continuously, although a small portion of it is displayed at a time (go left and right, what you see in the rightmost part should be consistent with what it was there at the beginning).
• Implement basic operations: eating, being eaten, division by 'space', division by green things, (optionally) feeding.
• Obey the basic mechanics of the original game; bigger cells gets
slower, when enclosing completely bigger eats smaller, etc.
• The game should have some randomness in initial conditions, in continuous feed production (note that this is not completely random in the original game; feeds are tend to be clustered in some parts) and in bot behaviors.
• Provide at least 3 themas.
• (Optional) Provide save/load functionality.
• Feel free to make some small changes, but your implementation should not be very different from the referenced game.
• Enjoy!!!
Implementation:
• Select a development environment (IDE) and setup Allegro library to this IDE. Study Allegro with some basic tutorials/documents in Internet.
• Analyze the problem carefully and implement it:
• Design a data structure which represents the world completely:
• Determine different parts of the world
• Design data structures to represent each part with all of its properties.
• Using a collection of these structures, design the data
structure to represent the whole world.
• Design functions to manipulate this structure (use call by pointer in function calls to avoid the copy work of this large structure).
• Design a function to draw the displayed part of the world.
• Implement these functions.
• Make your game work by calling these functions.
• Try to avoid complicated selection statements (use math instead whenever possible).
• Try to use the methods you learned during the course as much as
possible. (For example use dynamic memory, macro, conditional compilation, etc.)
• Apply double buffering: instead of printing a part directly, create all parts on a 2D array and print the array, which will decrease the flickering effects (https://wiki.allegro.cc/index.php?title=Double_buffering).
• Write a project report. (Including definition of the game, requirements,
software design, data structures used, functions, etc.)