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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file spritegen-0.1.0.tar.gz.

File metadata

  • Download URL: spritegen-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for spritegen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1df72231030f18c80511eed481024703d03c57bbbf047a79c48da0783f76b4b3
MD5 330d72be900cc008cc8532cbc1f57edc
BLAKE2b-256 59f208e6e9f4baa8ce7b441a637dfc24391a00c89aa195db31ebebfc67154e6a

See more details on using hashes here.

File details

Details for the file spritegen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spritegen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for spritegen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 985f46d9345c4fe9927a4c32403f0cecfc17603b181e6c3a1d58ca13ba86c9cf
MD5 8aab022cd50de7d65945ffa995d6b50d
BLAKE2b-256 ed8af35364fd9dbce7743655ede3fdcf6f8614c4bbbdf7eae6ab09d64a172588

See more details on using hashes here.

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