|
Developer_Guidlines
IntroductionAs a developer, there are a few rules to adding your own game to the project.
Adding Your GameThe project master configuration file ('/config.ini') contains a section named Gamelist. In that section, each key is a different game. Begin by adding a new key as the title of your game. On that same line, add the base location of your games' files. On a second line, indented at least one space, add the module name of your games' interface. The reason that this is required is because some file managers do not allow special characters as file names, which may feature in your game. Example: [Gamelist]
My Game = C:/Program Files (x86)/MyGame
MyGameYour game module must also contain a class with the same name as the module. A module named MyGame must also contain a class MyGame to be called from the master Python file. The MyGame class must contain a function init with an argument directory. The master Python file passes the directory string associated with the game selected to the module. Example: MyGame.py
class MyGame:
def __init__(self, directory):
self.dir = directory
a = 5Thats it. Your game has been added. Now it just needs a GUI and the framework behind it. |