Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
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.
Include the dependency below in the pom.xml of your project.
<dependency> <groupId>com.codingame.gameengine</groupId> <artifactId>module-entities</artifactId> <version>3.4.1</version> </dependency>
Or a more recent version. See the Release Notes.
The GraphicEntityModule is an injectable Guice Singleton.
Table of contents
- Create and manipulate Entities, Shapes and Sprites.
- Understand how to interact with the viewer.
- See how to use Spritesheets.
- Start Animating your game!
- Comfortable with the module? Check Advanced features.
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!