Skip to content

Latest commit

 

History

History
74 lines (58 loc) · 3.86 KB

README.md

File metadata and controls

74 lines (58 loc) · 3.86 KB

Assets packs to use in the CodinGame SDK

Feel free to clone and contribute. Assets are free to use in the CodinGame SDK (or for any project). Most of the resources are licensed and distributed under the terms of CC0 (or accompagned with a dedicated licence file if different)

Packs

The pack folder contains ready to use assets for different type of games / universes.

Browse the content of the packs folder for a full list of packs

Some examples:

Assets

The assets folder contains a set of mixed backgrounds, icons and sprites

External resources

The assets on this github is a small subset of the free resources that you can find on internet. Some links to help you find assets for your games:

Integration example

You can integrate assets in your games by adding them in the /src/main/resources/view/assets folder of your project.

Then, you can reference Sprites in your game with the GraphicalEntityModule.

With sprites:

@Inject GraphicEntityModule graphics;

...

Sprite sprite = graphics.createSprite().setImage("background.jpg");

Or with SpriteSheets (Images including multiple sprites)

@Inject GraphicEntityModule graphics;

...

String[] images = graphics.createSpriteSheetSplitter()
                          .setSourceImage("character.png")
                          .setName("run")
                          .setWidth(32)
                          .setHeight(32)
                          .setImageCount(4)
                          .setImagesPerRow(4)
                          .setOrigRow(1)
                          .setOrigCol(0)
                          .split();
SpriteAnimation runAnimation = graphics.createSpriteAnimation().setImages(images);