MapleOmok is a recreation of the MapleStory Omok mini-game written in python/pygame.
-
Install Python 3.11+ (Make sure to
check
"Add python.exe to PATH") -
Run
start.bat
file in the project file.
When you first launch the game, you can click "Play Game" and you'll be tossed into the game with an AI with a minimax depth of 5. In order to win the game, you must match 5-in-a-row much like tic-tac-toe's 3-in-a-row.
See Gallery section for visual images of the game and buttons.
The current code structure follows a Component-Scene System. This means that Scenes contains components to be rendered and Components represent those objects that are rendered into the game. Here is a diagram showing that visually. It is good to note that Components can contain other components.
- The assets folder contains all images, fonts, sounds related to the game and are used to be rendered into the game for visual effects.
- The components folder contain all the Abstract classes for defining said Components of the game.
- The interactables folder contains a button class which is re-used throughout the game to create interactable buttons given a callback.
- The scenes folder contains all the various scenes which HOLD the components and are rendered in the main game loop.
Finally, the most important folder is the game folder which contains the entire logic of the game AND the AI code.
The minimax feature can be found in opponent_ai.py file and contains the actual minimax algorithm and evaluation functions.
And any further optimization techinques (1D Array, Proximity Searching, etc...) can be found in omok_board.py mainly in the def __init__()
method which instantiates many of the data structures used in creating this project.
You can find it here