Back
Close

Graphics

The graphics of a game created with the CodinGame SDK are handled with the Javascript framework PixiJS. This section introduces the main features of the Graphic Entity Module, a Java module that you can use to interact with the viewer.

This module takes care of displaying and animating graphical entities in the replay of the game, each frame of the viewer corresponds to a game turn.

Use it by creating shapes, sprites, texts etc, then commiting their states to a certain moment of each frame.

By default, the states are commited automatically at the end of a frame.

Usage

Include the dependency below in the pom.xml of your project.

<dependency>
	<groupId>com.codingame.gameengine</groupId>
	<artifactId>module-entities</artifactId>
	<version>2.4</version>
</dependency>

Or a more recent version. See the Release Notes.

The GraphicEntityModule is an injectable Guice Singleton.

Table of contents

Go further and create your own modules

Using this module is the easiest way to draw your graphical entities in the viewer. Although it provides many features, you might want to add your own. See the SDK extensions to get help starting!

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants