Author Topic: Sprite Reducer  (Read 5816 times)

0 Members and 1 Guest are viewing this topic.

Offline bryoda12

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Sprite Reducer
« on: December 13, 2010, 07:13:08 pm »
In a game I'm currently making, I'm looking for an efficient algorithm to reduce a 16x16 sprite to 8x8 without just clustering every 4 pixels together because that looks like crap, It is in 4-level grayscale. does anyone have any help that they could give me for this?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Sprite Reducer
« Reply #1 on: December 13, 2010, 07:17:58 pm »
So basically, you want to reduce a sprite without the loss of quality inherent in doing so. In that case, it might be a good idea to hand-draw equivalent 8x8 sprites and use those.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Sprite Reducer
« Reply #2 on: December 13, 2010, 07:20:40 pm »
What other way would you do it? I don't mean to sound nasty, but there really isn't another way to shrink images. If you want to save space, you could take 8x8 and make each pixel 2x2, resulting in a 16x16 sprite at the quality of 8x8, but other than that there isn't really a way to do what you're talking about without doing what calc84 said.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Sprite Reducer
« Reply #3 on: December 13, 2010, 07:25:53 pm »
In a game I'm currently making, I'm looking for an efficient algorithm to reduce a 16x16 sprite to 8x8 without just clustering every 4 pixels together because that looks like crap, It is in 4-level grayscale. does anyone have any help that they could give me for this?

Really the only * algorithm* is to take the group of 2x2 pixels and have the number of on pixels corresponding to the shade of grey in your image.  This probably is going to make some images blurry tho, so really the best way is to redraw them or ask one of the spriters around omni to redraw it

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Sprite Reducer
« Reply #4 on: December 13, 2010, 07:30:09 pm »
yup, hand work is your best bet.

i'd be willing to take a shot, if you were to post what you want.

Offline bryoda12

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Sprite Reducer
« Reply #5 on: December 13, 2010, 08:00:27 pm »
The game it's for is a zelda clone that I just started, and the screen is 8 by 10 sprites, so if the sprites were 8x8, it would fit perfectly on the calc, Ill post the sprites that I have right now, it's just for the outside though, if you want to try to convert them, be my guest, theres 247 of them. Im working on getting the inside ones.

http://i647.photobucket.com/albums/uu195/bryoda/zeldatiles.png?t=1292288380

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Sprite Reducer
« Reply #6 on: December 13, 2010, 08:03:18 pm »
I think there is actually an 8x8 tileset for zelda floating around somewhere o.O

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Sprite Reducer
« Reply #7 on: December 13, 2010, 08:03:50 pm »
May I direct you do this?

Offline bryoda12

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Sprite Reducer
« Reply #8 on: December 13, 2010, 08:10:22 pm »
Oh my god, thanks, I have spent hours, well actually a couple days looking for 8 by 8 zelda sprites, excuse me while I go crap myself

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Sprite Reducer
« Reply #9 on: December 13, 2010, 10:45:58 pm »
Hi Bryoda12 and welcome on the forums! :)

I tried to think about a way to shrink down 16x16 sprites by half without losing too much quality, for example, adding some anti-aliasing or something, but unfortunately I couldn't figure out a way to do it, not to mention it would still look weird. The only way to do it is to resize them on the computer and edit them by hand.

Or of course there are the sprites posted above (I swear there were other ones elsewhere too, though, although both seemed to look as great as each others)