onelson,
@onelson@mastodon.social avatar

Picking my hobby game dev battles for this weekend.

I really want to do some animation system stuff built on aseprite, but if I want all the fun hot reload support I need to figure out how to downgrade my aseprite version.

onelson,
@onelson@mastodon.social avatar

itch.io doesn't seem to list older builds. I think I also bought aseprite in steam, so maybe I can get an older version from there.

onelson,
@onelson@mastodon.social avatar

Steam let me pin to the previous release, which works with LDtk. LDtk has fixes incoming for some changes in recent Aseprite versions, but who knows how long it'll be before that all lands.

onelson,
@onelson@mastodon.social avatar

Having LDtk's Aseprite support working means:

  • LDtk should be able to hot reload Aseprite tilesets
  • meanwhile Bevy can hot reload LDtk scenes

The next question is: will I be able to access the Aseprite animation clip data this way? I don't see anything in the APIs for this. I might need to load the Aseprite data twice, once in LDtk and once in the engine.

onelson,
@onelson@mastodon.social avatar

Okay, this is an interesting turn.

onelson,
@onelson@mastodon.social avatar

It seems as though the LDtk lib I'm using to load the level in Bevy is essentially just passing the .aseprite filepath directly along to Bevy. I think this means I can now go pick a separate crate that registers an asset loader for .aseprite files and bevy will just delegate to it.

This could work. 🤔

onelson,
@onelson@mastodon.social avatar

If it turns out this is a dead end, my Plan B is to just use a placeholder graphic in LDtk, or no use no graphic at all (just a debug wireframe type thing to show the player spawn is fine), then manage the sprite completely separately in engine.

onelson,
@onelson@mastodon.social avatar

I might risk it all and try this single-maintainer crate with a fewer than 6 months lifetime.

There are more well established crates, but

https://github.com/Lommix/bevy_aseprite_ultra

seems like it has a nice set of features.

Others to look at:

I don't really want to spend all weekend kicking the tires on these candidates, but it seems necessary to find a good fit.

onelson,
@onelson@mastodon.social avatar

I think I will cut LDtk out of the loop here. It's going to simplify things to not have the cross-cutting compatibility concern between bevy+ldtk and bevy+aseprite and ldtk+aseprite.

Placeholders and wireframes are fine to see in LDtk, I don't need anything more for animated things.

Later, when I start developing art for levels, I can revisit as it'd be nice to have tiles reload. For players and mobs, etc it's not so important.

onelson,
@onelson@mastodon.social avatar

I need a kick in the butt to just dive in and make a mess. I'm having sort of a "blank page syndrome" situation because I hate the prospect of having to audition multiple libs.

onelson,
@onelson@mastodon.social avatar

I should get a snack or find a movie to put on for background...

onelson,
@onelson@mastodon.social avatar

Heyooo...

It's a start, anyway. I'll try to build on this in a more meaningful way tonight.

I'm using that first pick - bevy_aseprite_ultra and the hot reloading will be a huge boon.

I cut all the player sprite data out of LDtk. I'm attaching the Aseprite data to the player spawn after the level loads. The existing code I had for moving the sprite from layer to layer seems to still work since the layers are all modeled into the bevy scene graph. 👏

Video of the running game and aseprite side by side. Updates made to the aseprite project are reflected in the game "live."

onelson,
@onelson@mastodon.social avatar

If I can get the crouch and "up" animation clips wired up again, I'll commit this to the repo and start working on a more human-like figure for placeholder art.

After that, I'll be able to look at making a state machine for the player and using animation durations to drive transitions. Fun.

onelson,
@onelson@mastodon.social avatar

My game is buggy :(

Also, this aseprite crate may have some problems when it comes to transitioning from one animation to another.

onelson,
@onelson@mastodon.social avatar

I think I'll have to visit at least one other crate. If this one still looks like the best option, I'll have to fork it and fix it to do what I need.

onelson,
@onelson@mastodon.social avatar

Ah fuck. I'm going to fork this and fucking do something nasty to it so I can unblock myself.

https://github.com/Lommix/bevy_aseprite_ultra/issues/3

onelson,
@onelson@mastodon.social avatar

I forked and I'm rutting around. I've found problems without obvious solutions, but I'm in the neighborhood.

onelson,
@onelson@mastodon.social avatar

I have something working but it's disgusting.

onelson,
@onelson@mastodon.social avatar

I guess I'll "claim it." I technically have sprite animation now. It's just a little buggy and goofy and not very reliable and

Anyway... I offered a PR for a workaround https://github.com/Lommix/bevy_aseprite_ultra/pull/4

I'll build on this with an eye to move to a different lib (or perhaps I'll cherry pick bits of this one and roll one myself?)

video/mp4

onelson,
@onelson@mastodon.social avatar

The video in my last illustrates a bug I noticed this weekend where if I jump a lot sometimes the player shifts to the right by 1 tile grid. I have no idea why.

I'm not going to fix it now, but I guess I should log it as an issue. I doubt it'll just fix itself. I do plan to refactor the movement code soon, and I can hopefully figure out what's going on at that time.

onelson,
@onelson@mastodon.social avatar

Oh I see. This is a problem where the colliders and "bumpers" around the player are intersecting and the code I wrote to self-correct in those situations is favoring a shift right for some reason. The left, bottom, and right bumpers are all activated here.

onelson,
@onelson@mastodon.social avatar

I keep oscillating between game dev being easy and impossible.

onelson,
@onelson@mastodon.social avatar

I don't know why, but it makes me feel cool to know I have this collision detection bug and to be like, "Nah, I'mma fix that LATER"

onelson,
@onelson@mastodon.social avatar

I bet I'd fit right in at Ubisoft.

joshourisman,
@joshourisman@hachyderm.io avatar

@onelson or Tesla

onelson,
@onelson@mastodon.social avatar

@joshourisman the fuck did you just say to me?

joshourisman,
@joshourisman@hachyderm.io avatar

@onelson your expeditious disregard for collision detection would fit right in at Tesla

onelson,
@onelson@mastodon.social avatar
onelson,
@onelson@mastodon.social avatar

I wonder how tf I will fix this

onelson,
@onelson@mastodon.social avatar

I have a few ideas but they all sound bad in my head

onelson,
@onelson@mastodon.social avatar

I have some more ideas that sound more corret.

onelson,
@onelson@mastodon.social avatar

I was planning to do some animation/art related stuff next weekend, but maybe I'll take a crack at fixing this.

onelson,
@onelson@mastodon.social avatar

I filed it as an issue. This was the very first issue filed on this repo. This is now a second job.

jeremy_list,
@jeremy_list@hachyderm.io avatar

@onelson I recently decided to have another go at some game dev: so far I've spent most of my the time I allowed for that yak-shaving by trying and failing to get Blender to run on my ancient PC (it briefly shows a blank window before segfaulting)

onelson,
@onelson@mastodon.social avatar

@jeremy_list great. Keep it up.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • tacticalgear
  • modclub
  • anitta
  • cisconetworking
  • tester
  • ngwrru68w68
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • provamag3
  • lostlight
  • All magazines