Wintermute Engine Forum

Wintermute Engine => Feature requests, suggestions => Done => Topic started by: Guardian on April 17, 2006, 02:27:55 PM

Title: Sprite flip
Post by: Guardian on April 17, 2006, 02:27:55 PM
Does WME support HW flipping of sprites? (I mean mirroring)
May be in next release it will be?
Title: Re: Sprite flip
Post by: Mnemonic on April 17, 2006, 07:31:12 PM
No it's not. In compatibility mode (i.e. DirectDraw7) hardware flipping isn't supported by some drivers. Of course, it could be done in software, so it's a possibility for a future, but it's a very low priority right now.
Title: Re: Sprite flip
Post by: Guardian on April 18, 2006, 08:13:23 AM
Ok, thanks for answer, may be you could make another thing - give to plug-in makers interface to sprite(read-only, like device interface in the game object)? Is it possible?
 Thanks anyway.
Title: Re: Sprite flip
Post by: Mnemonic on April 18, 2006, 09:15:41 AM
Unfortunately it's not that simple. One sprite subframe doesn't automatically equal to one Direct3D texture. The subframe can be broken into multiple textures depending on the video card capabilities. Besides, there must be two code paths for accelerated mode and compatibility mode.

But then again, the plugin interface provides the put-pixel and get-pixel methods for sprite subframes. Isn't that enough?
Title: Re: Sprite flip
Post by: Guardian on April 18, 2006, 09:25:46 AM
Well, get&put pixel operations is quite good. I just want to do this more quickly. Thanks for answering.
Title: Re: Sprite flip
Post by: Guardian on April 20, 2006, 09:37:41 AM
2 Mnemonic:
Is there benefit if I shall use pow. of 2 sized textures for my entities. Any speedup? Or subframes are splited in compile-time?
Title: Re: Sprite flip
Post by: Mnemonic on April 20, 2006, 03:24:05 PM
They are split at runtime. But the main benefit of using power of two textures is saving video memory. WME only splits the textures if they are bigger than the maximal supported size, so by splitting them manually you can optimize the memory usage, especially for very large images.
Title: Re: Sprite flip
Post by: Guardian on April 21, 2006, 06:32:15 AM
Thank you.
Title: Re: Sprite flip
Post by: greg on February 10, 2007, 04:27:44 AM
Hi Mnemonic,

I'm not sure if the proper protocol is to start a new topic or to append to this one.  However, I wanted to add my support to Guardian's request for sprite flipping.  Since a lot of a characters' animations are mirror images of one another (e.g. right/left, down-right/down-left, up-right/up-left), roughly 40% of disk space per character animation (3 mirrored directions / 8 directions total) could be saved by implementing sprite flipping in software, rather than the developer needing to include files for the flipped sprites.

For games with a lot of moving characters, this could prove most useful.  Thanks!

Greg
Title: Re: Sprite flip
Post by: lacosaweb on January 09, 2008, 03:07:51 PM
I think that it's very useful feature. Please, implement this.