Rotation of sprites, not using extra colors.
BlitzMax Forums/BlitzMax Programming/Rotation of sprites, not using extra colors.
| ||
Hello, I'm making a game with a limited color palette and I noticed that when you rotate an image it add extra midtones to smooth out the image. Since my game is a retro style game I can't have all these extra midtones. Is there a way to rotate and stay within the colors used in the sprite? |
| ||
Graphics( width,height,8) well ok Graphics( width,height,4) [For Really retro] or Graphics( width,height,2) [For Really Really Retro] |
| ||
I tried those and it just gave me an error and exited. Wouldn't these limit the colors in my palette and change the ones I have? Isn't there just a way to turn off rotation blending or just use the colors within the original image? |
| ||
When you load the image, specify MASKEDIMAGE for the flags, unless you're using alpha mapped images, in which case you should set flags to 0. The extra colors are probably coming from the bilinear filtering and the mipmapping. That will disable them. It's possible there's other filtering going on, but I think that should do it. |
| ||
OK thank you very much I'll try that and get back to you tomorrow, thanks for the prompt reply. |
| ||
![]() Well It's still close but not perfect. The challange of this was to only use a limited color palette. Even if one color is off a sma;l; amount it still counts/ I suppose i might have to write an algorithem to save all colors from the initial image rotate then fix the colors pixel by pixel to the initial colors. |
| ||
Are you using SetBlend SOLIDBLEND or maybe MASKBLEND? |
| ||
I have tried all the blends all give slightly varying results, but even with maskedblend and solid blend, it still manages to make about 2 shades of the teal color. I might just have to give up on dynamic rotation. I hate to be so picky but that is part of the limitations challange. |
| ||
yeah predraw your rotation. Also don't forget to draw at integer coords only so you don't get interpolation. For such a retro project you'd actually be better of with BlitzPlus. |
| ||
OK i got it working thank you guys this looks great now.(if a drop in quality can be considered better). I had not learned about graphic flags yet. I have so much to learn and i would pay cash money for a good book, Again thanks for all your help gents! |