Being a fan of 8bit and 16bit graphical adventure games from back in the day, I've set off on the mission to create one on the Pico. With the understanding on the size limitations of the Pico-8, I'm building a game engine that is utilizing as many reusable components as possible. I'm documenting my efforts on my blog at: http://whiteoutlabs.com/game-development/pico-8-sprite-animation-basics/
Very useful! I've been animating by simply using something like " player.sprite = 1
if btn(1) then player sprite +=1 player.mirror=false end
if player sprite > 3 then player.sprite=1 end "
which is simple, but doesn't allow you to animate with non-sequential sprites like your example does.
I need to do something similar, but instead of an inline sequence, I need to be able to reference frames of animation cycles because I'm using complex sprites. There's a lower half than animates independently of the upper half, and then a head is placed with that. So, each state would have a "topanim" and a "botanim," each of which references the sprite sequences in tables, since they don't necessarily go in integer-order.
In most of my projects though, it's simply a "body" that animates, and a head that's added (and in some cases, an externalized arm or something); but given how things go, sometimes I need to take those out of linear sequence as well, so using tables to control sprite frame data is key.
@TonyTheTGR - I really like the concept of splitting the sprites in half, it takes efficiency to the next level. With the way things are going with the development of my game, I might have to go down that road.
Hey willwilliams68k,
Great stuff so far! Thanks for blogging your progress, really informative.
Coincidentally, I'm also starting out on adventure game engine. Except that I'm attempting to recreate some of the functionality offered in SCUMM-type adventure games (think Maniac Mansion, Monkey Island, Day of the Tentacle, etc.) as I'm a BIG fan of the LucasArts adventure games.
Not sure yet how "futile" a venture that will be, as I expect I will hit token/gfx limits before I've barely started. But, I figure I'll have a stab at it! ;)
Looking forward to seeing your progress develop.
All the best! :)
Hey Tony, I have a way to animate sprite frames that are non sequential. It's certainly not the best way, I'm not a programmer, but let me know if you still need it and I'll be happy to post!
Actually, that would be really handy, DrakeGraves!
Sorry for the delay of game... I just got done with a STUPID BUSY season at work, and am just getting my projects back going again, after not having time to touch them since Labor Day. And just in time, because I'm devising the FSM for them, now!
I got to your blog from this post - bookmarked! Love the small code tutorials.
This was really great! Super informative stuff! Don't know how I missed it the first time!
HI everyone, I need help with using 16x16 size player in my game, may I know some suggestions for the code? thank you in advance
pass 2
to the w
and h
parameters to the spr function to draw 16x16 – or if you’re using sspr
, then pass 16
instead of 8
[Please log in to post a comment]