HaxeFlixel / HaxeFlixel/flixel

Aseprite Atlas repeat value to follow editor convention

Open
#2,947 0 comments 0 reactions 0 assignees View on GitHub

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
  • - [ ] Repeat
N/A Loops Forever
  • - [x] Repeat
1 Plays a single time, stopping at the final frame
  • - [x] Repeat
>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
  • - [ ] Repeat
N/A false
  • - [x] Repeat
1 true
  • - [x] Repeat
>1 true

Desired Flixel parsed behavior:

Tag's Repeat Checkbox Tag's Repeat Field Value Flixel Animation parsed loops value
  • - [ ] Repeat
N/A true
  • - [x] Repeat
1 false
  • - [x] Repeat
>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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.