This is a Multi-pacman game simulation over Google Earth!
You can fork this repisoritory and add new GameObjects by yourself!
- Ofek Bader:
- Adi Lichy:
the goal in this game is to let the pacmans play in a group, and their group goal is to eat all fruits on game with the shortest time possible! isn't it exciting? Of course the game is a simulation so they figure their routes by themselves but it's cool to see them chasing those little fruits!
-
Extra: Step 0: Choose a map from the "GameObject" submenu, currently supports only "Ariel University" and "Tel-Aviv".
-
Step 1: As was written earlier, this is a simulation game!
you choose an object from the GameObject menu, let it be pacman or fruit, and once you click an item you'll enter to a "drop mode" which allows you to click anywhere on the map to place your chosen item! -
Step 2: As your'e having fun building your own Pacman simulation, you click the "compute" button in the toolbar to let the pacmans figure out their paths!
-
Step 3: finally, you click the "Run" button to start the simulation and see those cute-furry-yellow-alien creatures running around!
-
Step 4: after you had a great time watching the pacmans playing the game of their lives, you can export your file into a KML and start watching those pacmans running over the Real world on Google Earth!
-
Step 1: go to the toolbar and select the "File" menu.
-
Step 2: select "Save game".
-
Step 3: set a file name with extension of ".csv" and click save. and thats it!
-
Step 1: go to the toolbar and select the "File" menu.
-
Step 2: select "Load game".
-
Step 3: select the game file you want to load!
Note: make sure that the CSV file (if not generated by the game) to be in this format:
Note: you must first have computed the paths of each pacman with the "Compute" button to be able to export as KML.
-
Step 1: go to the toolbar and select the "File" menu.
-
Step 2: select "Export game".
-
Step 3: set a file name with extension of ".kml" and click save. and thats it!
See: https://support.google.com/earth/answer/7365595?co=GENIE.Platform%3DDesktop&hl=en
The algorithm is a forked Dijkstra algorithm, not famillar with Dijkstra? look up here:
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
Short summary of the algorithm:
- Calculate the Cost of each pacman for every fruit (Cost is the time that takes that pacman to eat that fruit) and store it in MinHeap.
- While the MinHeap cost isn't empty.
- 2.1. Get the minimum Cost of all options in the heap and remove it (add it to the Path's of the pacman).
- 2.2. "Relax" all other Edges/Lines of all OTHER pacmans which isn't in the line we just got from the MinHeap by the time took the pacman to eat the fruit.
[Blue lines = Game Logic & Data]
[Green Lines = GameUI and graphic interface]
Packman eat fruits in the shortest path
Graphical user interface (GUI) of MyFrame[COMPLETED]Load and Save CSV game file into Game class object.[COMPLETED]Add new game objects with mouse click.[COMPLETED]
Game objects such as pacman and fruit[COMPLETED]"Map" class:Store map range[COMPLETED]Calculate distance between two pixelXY points in pixels.[COMPLETED]Calculate distance in meters between two GPS points or two pixelXY points by converting them first to GPS - like points.[COMPLETED]Convert from geodetic coordinates to pixel XY.[COMPLETED]
"Path" class.[COMPLETED]"Path2Kml" class.[COMPLETED]"ShortestPathAlgo" class.[COMPLETED]
Write for each function and class a Javadoc description.[COMPLETED]Generate Javadoc folder.[COMPLETED]Edit readme.md file to have HOW-TO-USE toturial and software description.[COMPLETED]