For sprite animation, is there an ideal frame base?

When animating sprites in a sheet, are there specifically suggested frame bases based on the size of the sprite that I should stick to so the game doesn't choke? I'm just trying to understand how I need to think about how far the processor can be pushed with multiple elements of animation happening around. Like, can I have 10 objects running at a 15-frame base on the screen at the same time? Will parallax moving scenes choke the performance?

As I think about game design approaches, I'm trying to understand the limitations and how I need to think of things. Thanks!

Yes, you can do 10 sprites no problem.

Really it depends on sprite size (actually height, as the display is updated using dirty rows), your target frame rate, how busy your game loop is. Screen updates are the main bottleneck.

Parallax will probably cause the full screen to update, meaning you'll lose the benefit of the sprite system. No big deal depending on your design.

Everything you mention here should run at 30fps to 50fps.

Ok, cool. Thanks for this insight. So, is it realistic for me to think that I may want to focus on single frame screens and play inside that space, otherwise, I would need to be very mindful of the amount of pixel density within a screen if scrolling/parallax would be attempted?

Like, should I think circa Atari/original Gameboy approaches?

Not at all! Playdate is GBA, SNES, even PS1 level performance - if managed correctly.

Look at this "Sonic" game, for example. Full screen scrolling at ~50fps (max for full screen updates)

https://devforum.play.date/t/can-someone-test-my-platform-game-on-a-real-device/6773

In Daily Driver I do partial screen updates at 60fps but they can go as high as 200fps depending on how many screen rows you update.

My advice to you: don't worry too much before you begin making stuff, then ask more questions along the way!

2 Likes

As Matt said, you can go for more than that.

In my Sonic-like demo, there is actually 5 layers of background. Each layer have 80x40 tiles (but only 13x9 are displayed on screen) and each tile is 32x32 pixels bitmap.
There is only 2 characters in the demo but I don't think the frame rate will drop much if there was more at the same time.

Playdate also have plenty of RAM so you can use more frames for your animations if you want to.

2 Likes

Wow, thanks for sharing that. This is pretty awesome. Do sprite sheets need to be in powers of 2?

No, that is when you're preparing/optimising sprite sheets for a GPU. But Playdate has no GPU, everything is done in software, so the sprite sheets can be any size.

1 Like