HaxeFlixel / HaxeFlixel/flixel
Aseprite Atlas repeat value to follow editor convention
Nobody has claimed this yet.
- Dominant language
- Haxe
- Stars
- 2.2k
- Forks
- 522
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
- Flixel version: 5.4.1
Aseprite editor behavior is as follows:
| Tag's Repeat Checkbox | Tag's Repeat Field Value | Tag Looping behavior |
|---|---|---|
|
N/A | Loops Forever |
|
1 |
Plays a single time, stopping at the final frame |
|
>1 |
Plays N times |
Currently, AseAtlas parses the loops value as:
inline function get_loops()
{
return this != null && toInt() > 0;
}
However, in the Aseprite editor, tags default to looping, represented by the Repeat field on the tag being unchecked.
Current Flixel parsed behavior:
| Tag's Repeat Checkbox | Tag's Repeat Field Value | Flixel Animation parsed loops value |
|---|---|---|
|
N/A | false |
|
1 |
true |
|
>1 |
true |
Desired Flixel parsed behavior:
| Tag's Repeat Checkbox | Tag's Repeat Field Value | Flixel Animation parsed loops value |
|---|---|---|
|
N/A | true |
|
1 |
false |
|
>1 |
true |
With this behavior, the only gap between Aseprite and Flixel is in the case where Repeat is >1, as Flixel does not have a built-in notion of playing an animation x times.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the AseAtlas get_loops() parser shown in the issue and compare its result with the listed Aseprite Repeat states. Update the parsed loops behavior to match the desired table, then verify that unchecked Repeat loops and a repeat value of 1 does not loop, while values greater than 1 remain looping.
Written by the indexing model from the issue text.
Assessment
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100