{"action":"created","issue":{"url":"https://api.github.com/repos/GoranM/bdx/issues/823","repository_url":"https://api.github.com/repos/GoranM/bdx","labels_url":"https://api.github.com/repos/GoranM/bdx/issues/823/labels{/name}","comments_url":"https://api.github.com/repos/GoranM/bdx/issues/823/comments","events_url":"https://api.github.com/repos/GoranM/bdx/issues/823/events","html_url":"https://github.com/GoranM/bdx/issues/823","id":185298864,"number":823,"title":"Suggestion: Aseprite Integration","user":{"login":"SolarLune","id":4733521,"avatar_url":"https://avatars.githubusercontent.com/u/4733521?v=3","gravatar_id":"","url":"https://api.github.com/users/SolarLune","html_url":"https://github.com/SolarLune","followers_url":"https://api.github.com/users/SolarLune/followers","following_url":"https://api.github.com/users/SolarLune/following{/other_user}","gists_url":"https://api.github.com/users/SolarLune/gists{/gist_id}","starred_url":"https://api.github.com/users/SolarLune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolarLune/subscriptions","organizations_url":"https://api.github.com/users/SolarLune/orgs","repos_url":"https://api.github.com/users/SolarLune/repos","events_url":"https://api.github.com/users/SolarLune/events{/privacy}","received_events_url":"https://api.github.com/users/SolarLune/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-26T05:12:35Z","updated_at":"2016-10-27T01:03:08Z","closed_at":null,"body":"Hey, there. So basically, when I do animations, I find that often times, I'm adding duplicate frames in to properly time animations. It's not horrible, but it is kind of awkward. Here's an intro animation, for example, from Gearend:\r\n\r\n```java\r\nspriteAnim.add(\"anim\", 0, new int[]{0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 4, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 8,\r\n        11, 12, 13, 14, 13, 14, 13, 14, 13, 14, 11, 12, 8, 8, 8, 8, 8, 8, 8, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,\r\n        22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 24, 25, 26, 27, 27, 28, 28, 29, 29, 30, 30, 30, 30, 31, 32, 33, 33, 33, 34, 35, 35, 36, 36, 36, 37, 38, 38, 38, 39, 39, 39, 39, 38, 40, 41,\r\n        42, 42, 42, 42, 43, 43, 44, 44, 45, 46, 47, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,\r\n        49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49}, 30, false);\r\n```\r\n\r\nSome of that is necessary to get the animation across, but there's a lot of duplicate frames here, as well.\r\n\r\nI was going to suggest some sort of object that could be added to an animation that the SpriteAnim component could read to indicate that a frame could be duplicated, but I think it would be more beneficial to add basic [Aseprite](https://www.aseprite.org/) integration into the engine. \r\n\r\nAseprite can actually export a plain JSON file containing the timing and tag information in addition to the spritesheet image - it should be relatively trivial adding a function to load that info in from the exported JSON.\r\n\r\nWe'd have to change some things around a bit - I think we'd need to add a Frame class, add the amount of time a frame should last to the Frame itself, time the SpriteAnim using the Frame timings, and create some load functions to actually create the needed data, but I think the advantages (automatic animation loading, automatic animation creation, and tagging) would outweigh the additional code.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/GoranM/bdx/issues/comments/256519468","html_url":"https://github.com/GoranM/bdx/issues/823#issuecomment-256519468","issue_url":"https://api.github.com/repos/GoranM/bdx/issues/823","id":256519468,"user":{"login":"GoranM","id":2141814,"avatar_url":"https://avatars.githubusercontent.com/u/2141814?v=3","gravatar_id":"","url":"https://api.github.com/users/GoranM","html_url":"https://github.com/GoranM","followers_url":"https://api.github.com/users/GoranM/followers","following_url":"https://api.github.com/users/GoranM/following{/other_user}","gists_url":"https://api.github.com/users/GoranM/gists{/gist_id}","starred_url":"https://api.github.com/users/GoranM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoranM/subscriptions","organizations_url":"https://api.github.com/users/GoranM/orgs","repos_url":"https://api.github.com/users/GoranM/repos","events_url":"https://api.github.com/users/GoranM/events{/privacy}","received_events_url":"https://api.github.com/users/GoranM/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T01:03:08Z","updated_at":"2016-10-27T01:03:08Z","body":"> Hmm, I guess I agree that it might be good to keep extraneous program-specific stuff out of master.\r\n\r\nI also think that would be best."}}
{"actor":{"display_login":"GoranM"}}