My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
Developer_Guidlines  
How Developers add their own Game
Phase-Implementation, Phase-Design, Phase-Requirements
Updated Nov 11, 2012 by eski...@gmail.com

Introduction

As a developer, there are a few rules to adding your own game to the project.

  1. It must be in Python 3+.
  2. There is one "name" variable, that remains the same throughout its life. The module saves its configuration data to the same header as its name in the module configuration file.
  3. The module may only modify its own configuration data. See configparser
  4. The project standard GUI is Tkinter and ttk, as both are included in the standard Python distribution. See tkinter

Adding Your Game

The 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
          MyGame

Your 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 = 5

Thats it. Your game has been added. Now it just needs a GUI and the framework behind it.

Powered by Google Project Hosting