gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > sprite wrapping

#14130 - plasma - Wed Dec 31, 2003 1:58 am

In a game like Asteroids, how can i make a sprite wrap?

#14131 - Miked0801 - Wed Dec 31, 2003 2:05 am

No sprite support for it, but if you drew your space ship in a BG plane and scrolled it around, you could get a wrapping effect (in BG modes 0-2)

Mike

#14155 - sajiimori - Wed Dec 31, 2003 5:54 am

Interesting approach.

I might suggest using 4 different sprites that are exactly one screen apart in each direction. The offscreen ones would not be drawn, and when one is farther than a screens distance away, it would be wrapped around manually.

Of course, the same would have to be done with all the asteroids if they are to wrap as well.