Author Topic: sprite color change  (Read 3249 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10628
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: sprite color change
« Reply #15 on: 2011-Jul-13 »
I haven't tried it, but is it also possible to use SPRITE2MEM and MEM2SPRITE with spritesheets that you load with LOADANIM and then can draw with DRAWANIM? So I mean an image with lots of small images for animation.

Yahaaa! It IS POSSIBLE:
http://www.glbasic.com/xmlhelp.php?lang=en&id=372&action=view

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1745
    • View Profile
    • Homepage
Re: sprite color change
« Reply #16 on: 2011-Jul-13 »
A sprite says more than a thousand words?


Offline Gary

  • Dr. Type
  • ****
  • Posts: 313
    • View Profile
Re: sprite color change
« Reply #17 on: 2011-Jul-13 »
Got things working now, just need to get all the variants in. Thought I would use a fairly easy to identify football figure as the base :)

Worked out a system as well for only loading the parts of the shirts needed and keeping the same draw routine for a plain shirt as well as one with lots of extras.

Only got some basic looking kits in at the moment but use key 1 and 2 to scroll through the kits. If anyone can spot an easier way to do things then please let me know :)

Also is it possible to use antialiased images with polyvector and have the shading change to the new colour? I have tried it up it has always turned into a solid colour. It would get rid of some of the jagged edges im getting

« Last Edit: 2011-Jul-13 by Gary_Leeds »

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: sprite color change
« Reply #18 on: 2011-Jul-14 »
I haven't tried it, but is it also possible to use SPRITE2MEM and MEM2SPRITE with spritesheets that you load with LOADANIM and then can draw with DRAWANIM? So I mean an image with lots of small images for animation.

Yahaaa! It IS POSSIBLE:
http://www.glbasic.com/xmlhelp.php?lang=en&id=372&action=view
Sweet, I'll rewrite my blitzbasic colorize demo in glbasic =D (when I can find the time)

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Re: sprite color change
« Reply #19 on: 2011-Jul-25 »
Okay yesterday I ported my colorize demo to GLBasic, it works great. :good: Very useful for example when your game has several identical sprites but with different colors, like in bomberman or in soccer games.

I haven't tested it on iphone yet only on pc, so I don't know how fast it is on iphone, it might be slow when using very large spritesheets. Note that you have to compile using the new GLBasic v10 because it fixes a bug in the LOADSPRITEMEM function.
« Last Edit: 2011-Jul-25 by BdR »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10628
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: sprite color change
« Reply #20 on: 2011-Jul-25 »
totally awesome!

Offline Hark0

  • Prof. Inline
  • *****
  • Posts: 1017
  • Geek Developer
    • View Profile
    • LitioPixel - Desarrollo de videojuegos con GLBasic | Videogame development with GLBasic
Re: sprite color change
« Reply #21 on: 2011-Jul-26 »
Bravo!
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic