Skip to content

Commit

Permalink
Update README and add screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
kettek committed Oct 20, 2024
1 parent e7f6fb1 commit 96d6c16
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,59 @@
# Staxie
![tank sprite stack](tank.gif)

This is a WIP sprite/pixel editor designed to be used to create **sprite stacks**. Sprite stacks are simply 2D slices that make up a pseudo-3D object by rendering each 2D slice at a slight vertical offset, thereby creating the illusion of depth. This sprite stack can then be rotated, shaded per slice, and more.

![tank sprite stack](tank.gif)
![Staxie as of 2024-10-20](screenshot.png)

At the moment, the stack interface is still being developed, however sprite editing via 2D and 3D views is functional along with sprite stack previewing.

## Technical Notes
This editor uses a PNG-based format via a custom stAx chunk that defines how the PNG data should be interpreted to represent data for sprite stacks. This allows the format to be readable by any program that can read PNGs. If the generated stAx file is more complex, then PNG chunk decoding can be used that adheres to the PNG Chunk Format section.

### PNG Chunk Format
All integer formats are expected to be in Big Endian. Only version '0' is expected and it is defined below.

#### Header

| name | type | description |
|-|-|-|
| version | uint8 | stAx version
| slice width | uint16 | Size of a slice in the X axis
| slice height | uint16 | Size of a slice in the Y axis
| stack count | uint16 | Count of stacks in the stax file
| stacks | array of Stack | The data of the Stacks, see below

#### Stack

| name | type | description |
|-|-|-|
| name length | uint8 | Length of the name of the stack
| name | variable | Name of the stack, derived from above
| slice count | uint16 | Count of slices in this stack
| animation count | uint16 | Count of animations for this stack
| animations | array of Animation | The data of the Animations, see below

#### Animation

| name | type | description |
|-|-|-|
| name length | uint8 | Length of the name of the animation
| name | variable | Name of the animation, derived from above
| frameTime | uint32 | How many frames the animation takes to play
| frameCount | uint16 | How many frames are in the animation
| frames | array of Frame | The data of the Frames, see below

#### Frame

| name | type | description |
|-|-|-|
| slices | array of Slice | The data of the Slices, see below

#### Slice

At the moment, the stack interface is still being developed, however sprite editing is functional along with sprite stack previewing.
| name | type | description |
|-|-|-|
| shading | uint8 | The shading of the slice, from 0-255

## Live Development

Expand Down
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 96d6c16

Please sign in to comment.