Sprite flipping
- DaveyPocket
- Posts: 378
- Joined: Sun Sep 14, 2008 8:33 pm
- Contact:
Sprite flipping
The game I'm working on requires the screen to be rotated, that now means that the "x" axis is now the "y" axis so sprites can be flipped vertically. Is there a way that is not too costly in terms of cycles being lost that I can flip sprites on the horizontally oriented "y" axis so they appear to be flipped on the vertically oriented "x" axis?
Re: Sprite flipping
So you really need Y flipping. Currently, there's no easy way to do that except implement it in assembler. I'll check how hard that would be to implement.
Re: Sprite flipping
Done deal! It was much easier than I thought, and it's in assembler so there's almost no performance loss. Check out: http://uzebox.org/forums/viewtopic.php?p=10001#p10001. Let me know if you find any issue with it.
- martinsustek
- Posts: 117
- Joined: Sat Apr 30, 2011 11:34 am
- Location: Ostrava, Czech Republic
Re: Sprite flipping
So, next step is rotating sprite by 90, 180 and 270 degrees? It can be useful for some top-viewed games to save flash by reusing same sprites in four directions, but drawing routine will probably be more complex than flipping.