Skip to content

Animated backgrounds? #787

Answered by gwilymk
sigmasoldi3r asked this question in Q&A
Discussion options

You must be logged in to vote

Animating a full background is probably a bit too slow with agb (and without the agb abstractions, uses up quite a lot of the CPU time you have for a single frame). I managed to get an example where I could play bad apple at 30fps but no faster by updating half per frame across 2 backgrounds (because commit can be quite an expensive operation).

I would normally only replace a subset of the tiles, and do the rest of the animation with objects (which appears to be how most commercial games did this too). You can see in the animated tiles example here: https://agbrs.dev/examples/animatedbackground, you can replace a single tile which may be repeated across the frame in many locations with a …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sigmasoldi3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants