Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Extend the CodinGame SDK

Although the CodinGame SDK already includes the GraphicEntityModule, you can add modules to your game. Modules are extensions allowing you to directly interact with the viewer using PixiJS, which gives you a lot more control on its behaviour.

This section presents a few existing modules. You can find their source code on Github: https://github.com/CodinGame/codingame-sdk-modules

If you want to create your own module, see How to get started.

Usage

Modules usually come up with a .java and a .js file. Place these files in src/main/java and src/main/resources/view respectively.

You will also need to import your module to the src/main/resources/view/config.js file, in the modules array.

Example of a project using the Graphic Entity Module and the End Screen Module:

import { GraphicEntityModule } from './entity-module/GraphicEntityModule.js';
import { EndScreenModule } from './modules/endscreen/EndScreenModule.js';

export const modules = [
	GraphicEntityModule,
	EndScreenModule
];

To understand how to edit modules, see the examples:

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content