GithubHelp home page GithubHelp logo

madsy / spriteviewer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 9 KB

Simple preview tool for displaying sprites and tilesets.

License: BSD 3-Clause "New" or "Revised" License

Makefile 2.74% C++ 97.26%

spriteviewer's Introduction

SpriteViewer

What is it?

SpriteViewer is a simple preview tool for displaying sprites and spritemaps.

What can it do?

It can show a single sprite tiled in the x and y direction, or as an animation made up of several sprites in a tileset/spritemap image. When the file changes on disk, the displayed sprite is updated. You can also adjust the scaling and animation speed.

What would I use it for?

Running SpriteViewer in a separate window lets you get a realtime preview of how your sprites tile and whether they are truly seamless, while you draw and design your sprites and animations in a separate editor like GIMP or Photoshop. A lot of image editing software lacks support for tiled preview and sprite animations. The idea behind TileViewer is to address this and to help with your workflow.

How do I start it? What options are available?

Starting SpriteViewer without any options shows the usage:


Usage:  [options] file
Options:
  -w 			Sprite width
  -h 			Sprite height
  -s 			Sprite scale
  -f 				Animation frames per second
  -i start:end			The start- and end sprite indices.
  -t					Enable tiling/repeat

Example #1: Given a spritemap with 32x32 sprites, show the first frame tiled in the X and Y directions.

spriteview -w 32 -h 32 -t -i 0:0 ~/Pictures/spritemap.png

Example #2: Given a spritemap with 16x16 sprites, show an animation using the sprites from index 7 to (including) index 14 without tiling, scaled up 4x and with 8 frames per second.

spriteview -w 16 -h 16 -s 4 -f 8 -i 7:15 ~/Pictures/spritemap.png

Example #3 Same as example #2, but with tiling and without scaling.

spriteview -t -w 16 -h 16 -f 8 -i 7:15 ~/Pictures/spritemap.png

spriteviewer's People

Contributors

madsy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.