   Sprite Question
  I''ve seen a number of ripped character sprite sheets and one thing i''ve always noticed is that on most of them, all the sprites face one way.Is this because there is way to load the sprite so that it faces the other direction assumming the actions are symetric?Is it easier to just have a sprite sheet of sprites in both directions, or just one direction and code for the inverse?Can someone show me some internet reference of this?Thanx,-Vega7 
  Well there is a way and it's used in most drawing programs even simple ones like MS paint. You just "Mirror" the sprite you can have code that does this but it's not really necessary you can just use any program to mirror the image or flip it horizontally then save the sprite with another name. Depending on what you are using there should be a function (or you can make one yourself) for example allegro has a function called something like draw_flip_sprite() ( I know that's not the right name is something like that  )    [edited by - FtMonkey on July 31, 2003 10:44:25 PM];  I know in some games they only have one view of sprites and by reversing the left/right coordinates of the source rectangle or maybe it is the destination rectangle, but they draw a mirror image of the sprite while only using half the image space. I know you can do something similar in DirectDraw but I don''t remember exactly how it was done. Look for mirroring and you should come up with something. ;  Which more commonly used?  To just have "mirrored" sprites, or to code for the inverse of one-direction sprites?Can someone show me any references to this?Thanks in advance,-Vega7 ;  If you''re using DirectX (Graphics / D3D), I think you can just switch the texture coordinate on vertices of your textured quad while rendering sprites to effect flipping, mirroring, skewing, rotation, stretching, etc.  I imagine OpenGL has the same functionality.If you were manually coding a sprite drawing routine (direct memory copy with a loop) it would be fairly simple to switch the left-right or up-down axes.I think the relevant windows api calls (BitBlt, etc) have flipping/mirroring/stretching functionality in them...It''s probly not as much of an issue for games on modern computers compared to the older console games that I imagine most sprite sheets come from, however.  Old consoles had very limited RAM, so having one image flipped and/or mirrored could save a lot of sprite space, I would think... ;  I think most 2d games use a spritesheet with all views rendered onto it. Another option is to only use the single view sprite sheet and render it onto a surface in both views when you load it so that you never have to flip/mirror it again once you have loaded it although since it takes up the same amount of space as a whole sheet, why not use the whole sheet? I don''t know how much mirroring on the fly costs you, but there must be some kind of speed hit even if it is minimal, and being game programmers don''t we want to eek out as much speed as we can in our drawing routines? I think the above poster made a good point where older games had a limited amount of ram to work with and using half-sheets allowed twice as many sprites to be in memory at once. IMHO, I would use your favorite paint program and just complete the sheet by flipping it. Just on a side note, i have only been able to find Mortal Kombat and other old school fighters sprite sheets in one direction. The sprites have between 6 and 12 frames for each move so I would imagine that they just used mirroring considernig the number of frames for each char and the systems they were used on.