Game Develop C++ Platform: Writing a new extension

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Writing a new extension

# Create a new extension

Creating a new extension can be made by following these steps :

-Copy the directory of an extension and rename it:

-Rename then the sources files :

-Open the Code::Blocks project.
-Delete the non existing source files from the Code::Blocks project:

-Add then the recently renamed files ( Right click > Add files ):

-Rename the title of the project ( Project > Properties ) and modify the name of the output files ( Project > Properties > Build targets > Output filenames for each build targets ).

You can then start to modify the extension.
If your extension is fairly simple, you can create it from the AES Extension. If your extension need an object, you can use for instance the Text Object Extension as a starting point.
You can compile your extension with the appropriate buttons:

# Use the extension with Game Develop

To make your extension usable with Game Develop, you have to:

1. Copy the generated file ( yourExtension.xgdw for example ) inside Game Develop "Extensions" folder. ( CppPlatform/Extensions/yourExtension.xgdw )
   You can change the output directory in the Code::Blocks project to automatically create the extension file inside Game Develop "Extensions" folder.
2. Copy all needed include file inside a folder with the name of your extension located in GD "CppPlatform/Extensions/include" subfolder. ( Extensions/include/yourExtension/ )
   You can use a small script ( batch file on Windows ) to copy all the needed includes files to Game Develop "CppPlatform/Extensions/include" subfolder.
3. Translations catalog files must be put into Extensions/locale/<language>/yourExtension.mo ( Example : CppPlatform/Extensions/locale/fr_FR/yourExtension.mo )