This guide takes you through the steps required for your game to be added into the arcade-machine library
Table of contents
To make the game accessible and controllable by the arcade machine, some additional code or changes are required
Your game must be able to be exited using the escape key This can be achieved by including the following command in your main loop.
int main()
{
while(!key_down(ESCAPE_KEY))
{
// game play
}
}
The window size of your game cannot exceed 1600 x 900, this is to allow your game to sit neatly inside the arcade-machine itself. Similarly, there is a minimum window size of 640 x 480, to ensure visibility for the user.
The window size of your game cannot exceed 1600 x 900, this is to allow your game to sit neatly inside the arcade-machine itself. Similarly, but mainly for aesthetic purposes, a minimum window size of 640 x 480 is expected.
We ask that you remove the border before compiling your game. The Arcade Machine provides a more
immersive experience for the user if there is no border. To remove the border of your game window,
use SplashKit’s window_toggle_border();
function after the open_window()
function like so:
int main()
{
open_window("my-game", width, height);
window_toggle_border("my-game");
}
SplashKit locates the resources directory in different places for different operating systems. To ensure your resources are located correctly, please include the following in your program.cpp file:
#ifdef _WIN32
#define PATH_SEP "\\"
#else
#define PATH_SEP "/"
#endif
Then in main:
int main()
{
// other code...
// before get resource bundle
set_resources_path("Resources", PATH_SEP);
}
To ensure the arcade machine can retrieve files using path information, please refrain from adding whitespace to any file path.
Example:
Use my-game
instead of my game
.. etc.
The following keys are required to be the functional keys of your game to be compatible with the arcade machine.
Up: W
| Left: A
| Down S
| Right: D
Weak(1): R
| Weak(2): F
Med(1) : T
| Med(2) : G
Hard(1): Y
| Hard(2): H
Up: UP_ARROW
| Left: LEFT_ARROW
| Down: DOWN_ARROW
| Right: RIGHT_ARROW
Weak(1): U
| Weak(2): J
Med(1) : I
| Med(2) : K
Hard(1): O
| Hard(2): L
Start: ENTER
Escape: ESC
The compiling of your game is handled automatically through GitHub actions.
Your game will be compiled into executables compatible with Windows, Linux and MacOS operating systems.
Please ensure all program files (.h and .cpp) are provided in your pull request
A preview of your game will be shown in the Arcade Machine games menu. Please include an image of
your game.
This image must be sized as 600px x 540px so it will be displayed correctly in the games menu.
The supported formats are png, jpg and bmp.
If you don’t have access to image editing software such as Adobe Illustrator/Photoshop etc, we suggest you use a browser-based tool such as resizeimage to resize, crop or format a screenshot of your game.
Each game must have a config file containing information about the game.
There is a config.txt
file located in the base directory of the repository, copy this file into
the base directory of your game file and fill it with your game information. It must match the
example config file shown below, but with your game information.
The configuration file must be in text (.txt
) format, and it must be named config.txt
.
This must be located in your games root directory, alongside your program.cpp
(example below)
(TBA - explanation of content requirements)
Congratulations!
You have now completed all the steps required to have your game showcased on the Arcade Machine.
To contribute your game, go to the
Thoth Tech arcade-games repository
Click the ‘Fork’ button at the top right of the screen and create a fork of this repository.
You will now have the arcade-games repository in your personal Git.
On your local, navigate to a desired file path and clone this repository using the bash command:
git clone https://github.com/<your-git-username>/arcade-games.git
Add your game to the directory and stage a commit to the remote repo:
git add .
In your commit message, include your name and the name of the game:
git commit -m ”Anthony George - Venture Adventure”
git push
You will now see your game in the remote fork.
Now create a Pull request to have your game added to the arcade-machine.
Click the ‘Pull requests’ tab, then click ‘New pull request’ button, then click 'Create pull request'
Write a message for the Arcade Machine and hit 'Create pull request'
You will see that merging is blocked until a member of the Arcade-Machine team has reviewed your
game.
We will be sure to get in contact with you once it has been approved!