Skip to main content

A tool for generating placeholder spritesheets

Project description

Spritegen

Easily generate placeholder sprites sheets for your game.

Installation

Install package using pip

pip install spritegen

Usage

This script generates a sprite sheet image, which is a single image file containing a grid of smaller images (sprites).

A row in the sprite sheet consist of multiple sprites with the same reference text and an increasing number.

For example a row can be 10 sprites with text "Idle 0", "Idle 1", "Idle 2" etc.

Each row can have different number of sprites and sprite size.

How to use

To use spritegen, you will need to provide it with some information about the sprites you want it to include. Specifically, for each row you can specify

  • The reference text
  • The sprite size
  • The number of sprites

You can specify multiple rows of sprites by providing this information multiple times.

The script can be executed from the command line, or you can import it as a module use it in your own python code.

Command line usage

spritegen --sprite text size number [-o OUTPUT]

For example:

spritegen --sprite Idle 32 5 --sprite Left 32 3  --sprite Right 32 3 --sprite Boss 128 3

This will generate a sprite sheet with 4 rows of sprites. The first row will contain 5 sprites with the text "Idle 0", "Idle 1", "Idle 2" etc. The second row will contain 3 sprites with the text "Left 0", "Left 1", "Left 2". The third row will contain 3 sprites with the text "Right 0", "Right 1", "Right 2". The fourth row will contain 3 sprites with the text "Boss 0", "Boss 1", "Boss 2". First three rows will have sprites of size 32x32 and the last row will have sprites of size 128x128.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spritegen-0.1.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

spritegen-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page