Skip to content

Commit

Permalink
Merge bcdb991 into release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 24, 2022
2 parents 88407b6 + bcdb991 commit d6fb437
Show file tree
Hide file tree
Showing 69 changed files with 4,929 additions and 1,025 deletions.
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"rust-analyzer.cargo.unsetTest": [
"core",
"derivative" // TODO.upstream remove this https://github.com/rust-lang/rust-analyzer/issues/7459
]
"rust-analyzer.cargo.unsetTest": ["core"]
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## Tiger 0.5

- [x] Document template format
- [x] Switch documentation Github Pages to `release` branch
- [x] Export dialog links to documentation
- [x] Export process creates intermediate directories if needed
- [x] Error dialog specifies problematic path when export fails due to IO problem
- [x] Nicer looking paths in export settings (no ../ concat)
- [x] Add menu entry to open recent files
- [x] Export dialog form validation
- [x] Unit test timeline commands
- [x] Unit test transient commands
- [x] Fixed a bug where Ctrl+Shift+E opened a Search With Bing panel
- [x] When opening an existing document, an animation is immediately opened for edit

## Tiger 0.4.1

- [x] Fixed a bug where changes caused by mouse clicks would not appear immediately
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Actions Status](https://github.com/agersant/tiger/workflows/Build/badge.svg)](https://github.com/agersant/tiger/actions) [![codecov](https://codecov.io/gh/agersant/tiger/branch/master/graph/badge.svg?token=Ekd9mm2Wii)](https://codecov.io/gh/agersant/tiger)

Tiger is a graphical tool for generating spritesheets and metadata about the animation and hitboxes they contain.
Tiger is a graphical tool to author game spritesheets and associated metadata.

![Tiger](res/readme/screenshot-0.4.0.png?raw=true "Tiger")

Expand All @@ -23,6 +23,8 @@ Tiger is only supported on Windows and has no dependencies. To install it:
2. Run the installer
3. That's it, you're done!

To learn how to integrate Tiger sheets in your game, please refer to the [Documentation](https://agersant.github.io/tiger/).

# Contributing

- 🗨 For help, feedback or suggesting new features, please use [Discussions](https://github.com/agersant/tiger/discussions).
Expand Down
22 changes: 7 additions & 15 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
# Roadmap

## Tiger 0.5

- [ ] Document template format
- [ ] Export dialog links to documentation
- [ ] Export process creates intermediate directories if needed
- [ ] Error dialog specifies problematic path when export fails due to IO problem
- [ ] Nicer looking paths in export settings (no ../ concat)
- [ ] Add menu entry to open recent files
- [ ] Export dialog form validation
- [ ] Unit test timeline commands
- [ ] Unit test transient commands

## Tiger 0.6

- [ ] Tooltips everywhere
- [ ] Draw hitbox names in workbench
- [ ] Playback speed controls
- [ ] Time snapping / quantizing of animation frames
- [ ] Fix bug where when zoomed in a lot, resize handles on hitboxes are not correctly centered
- [ ] Add button to open sheet folder in explorer
- [ ] Add context menu entry to open frame in explorer
- [ ] Evaluate https://github.com/ChevyRay/crunch-rs
- [ ] Evaluate https://github.com/Keats/tera

## Tiger 0.7

- [ ] Tooltips everywhere
- [ ] Export perf improvements
- [ ] Can zoom workbench with mousewheel
- [ ] Can zoom timeline with mousewheel
Expand All @@ -37,7 +29,7 @@
- [ ] Consider merging some code between save, save_as and save_all
- [ ] Automatically add extensions to exported files
- [ ] Default paths for NFD dialogs
- [ ] Unit test state module
- [ ] Reach satisfying test coverage

## Tiger 0.9

Expand Down Expand Up @@ -70,6 +62,6 @@
- [ ] Import animation data from other software (Asesprite, TBD)
- [ ] Sockets (like hitbox but point)
- [ ] Events (arbitrary markers on timeline)
- [ ] Drag and drop frames from OS to content panel
- [ ] Drag and drop frames from OS to content panel
- [ ] Drag and drop frames from OS to timeline panel
- [ ] Projects?
8 changes: 8 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Tiger
lang: en

remote_theme: just-the-docs/just-the-docs
color_scheme: dark

plugins:
- jemoji
120 changes: 120 additions & 0 deletions docs/exporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
nav_order: 2
---

# Exporting spritesheets

The spritesheet files with the `.tiger` extension being created and edited by Tiger are simple `json` files. You might be tempted to use them directly into your game engine of choice, but there are reasons not to:

- The exact format may change between Tiger releases and could break your engine integration
- The `.tiger` files refer to animation frames as individual files. For performance reasons, it is often preferable to combine frames into atlas textures

The export process in Tiger is designed to solve these two issues. When exporting a spritesheet (from the `File` > `Export` menu), Tiger generates two files:

1. An atlas image file (`.png`) containing all the individual frames of animation packed together
2. A metadata text file describing the position of individual frames in the atlas image, and additional metadata like hitboxes, animation names and timings

The `Texture File` and `Metadata File` options in the Export dialog tell Tiger where to save the corresponding files.

## Metadata Format

The exported metadata text file does not obey a specific format. It is up to you to define the format by providing a template file. This template file is specified using the `Metadata Template File` option in the Export dialog. You most likely only need to make one template file for your entire project / game engine.

Here is an example of a simple template file which could be used to generate XML metadata:

{% raw %}

```liquid
<sprite>
{% for frame in frames %}
<frame id="{{frame.index}}" x="{{frame.x}}" y="{{frame.y}}" width="{{frame.width}}" height="{{frame.height}}" />
{% endfor %}
</sprite>
```

{% endraw %}

When used, this template would generate metadata files like the following:

```xml
<sprite>
<frame id="0" x="0" y="0" width="33" height="27" />
<frame id="1" x="33" y="0" width="25" height="44" />
<frame id="2" x="58" y="0" width="35" height="34" />
<frame id="3" x="93" y="0" width="35" height="31" />
<frame id="4" x="128" y="0" width="25" height="29" />
</sprite>
```

## Metadata Template Syntax

Tiger template files are based on the general-purpose `liquid` template format, which has its [own documentation](https://shopify.github.io/liquid). This documentation describes how to do loops, branches and basic arithmetic in your templates.

The spritesheet data that can be referenced in the template is described in the following tables:

### Global Variables

| Field | Type | Description |
| :---------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sheet_image | String | Path to the atlas image file containing all the fames in the spritesheet. This path is relative to the directory selected in the `Metadata Root Directory` option of the Export dialog. |
| frames | [Frame](#frame)[] | List of all the frames in the spritesheet. |
| animations | [Animation](#animation)[] | List of all the animations in the spritesheet. |

### Frame

| Field | Type | Description |
| :----- | :----- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | String | Path to the source image file of this individual frame. This path is relative to the directory selected in the `Metadata Root Directory` option of the Export dialog. |
| index | Number | Arbitrary frame identifier. |
| x | Number | Horizontal position of the frame in the atlas image file, measured from the left edge. |
| y | Number | Vertical position of the frame in the atlas image file, measured from the top edge. |
| width | Number | Frame width in pixels. |
| height | Number | Frame height in pixels. |

### Animation

| Field | Type | Description |
| :--------- | :---------------------- | :----------------------------------------------------------------------------------------- |
| name | String | Name of the animation. |
| is_looping | Boolean | True if the animation is meant to repeat after it ends. |
| sequences | [Sequence](#sequence)[] | List of sequences in this animation. There is one sequence per direction in the animation. |

### Sequence

| Field | Type | Description |
| :-------- | :---------------------- | :------------------------------------------------ |
| direction | [Direction](#direction) | Direction of the sequence. |
| keyframes | [Keyframe](#keyframe)[] | Chronological list of keyframes in this sequence. |

### Keyframe

| Field | Type | Description |
| :------- | :------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| frame | [Frame](#frame) | Frame to display during this keyframe. |
| hitboxes | [Hitbox](#hitbox)[] | List of hitboxes in this keyframe. |
| duration | Number | Duration in milliseconds. |
| x | Number | Horizontal position of this keyframe, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions to the right of the origin. |
| y | Number | Vertical position of this keyframe, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions above the origin. |

### Hitbox

| Field | Type | Description |
| :----- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | String | Name of the hitbox. |
| x | Number | Horizontal position of this hitbox, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions to the right of the origin. |
| y | Number | Vertical position of this hitbox, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions above the origin. |
| width | Number | Hitbox width in pixels. |
| height | Number | Hitbox height in pixels. |

### Direction

String with one of the following values:

- North
- East
- South
- West
- NorthEast
- NorthWest
- SouthEast
- SouthWest
16 changes: 16 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
nav_order: 1
---

# Home

Welcome to the Tiger documentation!

Tiger is a graphical tool to author game spritesheets and associated metadata.

Quick links:

- 💾 [Github Repository](https://github.com/agersant/tiger)
- 📝 [Changelog](https://github.com/agersant/tiger/blob/master/CHANGELOG.md)
- 🛠 [Roadmap](https://github.com/agersant/tiger/blob/master/ROADMAP.md)
- 📦 [Latest Release](https://github.com/agersant/tiger/releases/latest)
Loading

0 comments on commit d6fb437

Please sign in to comment.