sprite color change

Previous topic - Next topic

Kitty Hello

Quote from: BdR 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

Moru

A sprite says more than a thousand words?


Gary

#17
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



[attachment deleted by admin]

BdR

Quote from: Kitty Hello on 2011-Jul-13
Quote from: BdR 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
Sweet, I'll rewrite my blitzbasic colorize demo in glbasic =D (when I can find the time)

BdR

#19
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.


[attachment deleted by admin]

Kitty Hello

totally awesome!

Hark0

http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic