Log In  

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/

P#37111 2017-02-03 14:29 ( Edited 2018-11-26 10:09)

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.

P#37142 2017-02-04 13:14 ( Edited 2017-02-04 18:14)
1

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.

P#37148 2017-02-04 15:11 ( Edited 2017-02-04 20:11)

@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.

P#37220 2017-02-06 11:55 ( Edited 2017-02-06 16:55)

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! :)

P#37513 2017-02-16 08:26 ( Edited 2017-02-16 13:30)

@TonyTheTGR

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!

P#46747 2017-11-27 14:13 ( Edited 2017-11-27 19:14)

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!

P#48797 2018-01-31 18:07 ( Edited 2018-01-31 23:07)

I got to your blog from this post - bookmarked! Love the small code tutorials.

P#50125 2018-03-09 04:19 ( Edited 2018-03-09 09:19)

This was really great! Super informative stuff! Don't know how I missed it the first time!

P#55200 2018-08-15 17:00 ( Edited 2018-08-15 21:03)

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

P#138511 2023-12-10 13:30
1

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

P#138529 2023-12-11 00:02

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 07:18:34 | 0.017s | Q:30