Users browsing this thread: 1 Guest(s)
Seamlessly tiled, scrolling, animated backgrounds
#2
If you have a pattern, animating it is just a case of moving it along by its width/height minus 1 pixel (or whatever your speed is), at which point the animation loops.

Let's use the Kirby pattern as an example. It is a 32×32 tile:

[Image: attachment.php?aid=10109]

If we keep moving it along, we can get a seamless scroll:

[Image: attachment.php?aid=10110]

This isn't much good as it is, so each frame we tile it to fill as large an area as we want:

[Image: attachment.php?aid=10111]

These animations may look a bit jittery on a 60Hz display due to the GIF format not supporting 30fps (only multiples of 10ms) but it'll do as an example since you wouldn't have this issue when programming a game anyway.


Attached Files Thumbnail(s)
   
Image(s)
       
Reply
Thanked by: melody


Messages In This Thread
RE: Seamlessly tiled, scrolling, animated backgrounds - by Simpsons Dumper - 11-06-2019, 06:36 AM

Forum Jump: