Create new asset

Documentation Editor

Create new asset

https://morgondag.io/pages/bit-create-new-asset

Bit animation editor is created to utilize reusable art assets and importing sprite/sprite sheet into the engine.

Importing art

The first step is to open asset import screen by pressing the import button or using hotkey SHIFT+A.

Import asset

The import asset window includes a couple of options.

Select Sprites:
This will open the file picker where you can select up to 100 PNG assets to be imported. Transparent PNGs and sprite sheets are supported. This works best with pixel art graphics but larger colorized images can be imported too (however, there will be quite large performance requirements if palettes were to be used on large assets). Importing PNG sprites under 2024x2024 pixels with 1-8 colors works the best.

Category:
Select an already available category or type in a new one. This is where your imported assets will exist.

Subcategory:
Within a category you can categorize assets further in subcategories, this is mostly used to separate assets inside a category.

Import assets

An input button will be visible as soon as you select a PNG to be imported.

Tile configuration

Find your newly imported asset in the library list, if it's not there you can try reloading the library from the library menu or pressing CTRL+R. When you click on it, it should show up in the preview window as well as in the asset configuration scene (to the left of the list).

Go to the tile tab. If you imported a sprite sheet with several animation frames you'll need to have an even-sized PNG size to match that. Select how many tiles there is in the imported asset per row horizontally and vertically.

You can see how many tiles are available after setting the tile count. The default tile is how the asset will look like in the scene without any animations running.

Defining sprite sheet animations

Sprite sheet animations are simply defined by how many frames there should be per animation and then what frame index from the sprite sheet should be shown at the frame. Upon that you can define how many frames it should be between each frame to create slower-moving animations.

Remember to click save on top of the view (it's under the add to scene button).

Add to scene

Click add to scene and your new asset should be visible inside the scene.

You can click on the entity in the scene's entity list.

After that, you can select your sprite sheet animation.

The scene should now animate your sprite with the sprite sheet animation!

Here is an example sprite, containing several tiles that can be animated: