Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gsaurus

Pages: 1 ... 16 17 [18]
256
Graphics / Strip images
« on: October 20, 2008, 04:26:09 pm »
Hm.. What do you mean? What member?

Imagine a fall down animation witch have 2 frames:
Code: [Select]

\o/              
 |    and  =-|o


- I can save the 2 frames horizontally aligned in a unique image, and there will be junk pixels because second pic height is smaller than the first one.
Then a sprite will use setSubRect to have first or second frame (according to the size of each frame, stored somewhere)
Its one image like this:
Code: [Select]

_________
|\o/=-|o|  
| | ####| <--  junk pixels in bottom right
---------


- Alternatively, frames are saved as separated images, without junk pixels, and the sprite will use setImage to have first or second frame.
It's two Images like this:
Code: [Select]

_____        ______
|\o/|   and  |=-|o|
| | |        ------
-----




Thinking that I could have much animations, each one with much frames of different sizes, how different could be the 2 alternatives? Shouldn't I care about the extra memory used to store unused pixels in strip-images? How much better (or not) would be using a big image instead of 50 small ones (for instance)

257
Graphics / Strip images
« on: October 19, 2008, 10:04:58 pm »
Hi

How much different would be using one image with much "sub-images", where sprites draws from selecting subrects, instead of using separated images for all these "subimages"?

I did few simple 2D games before (in other APIs and languages), where I had most of the sprites with fixed size (ex: 32x32), so a strip image was fine. This time I have animations which frames have different sizes.

I have to decide if I save separated images with just the needed rectangle on each, or save all in one as a strip image, which may have a lot of junk pixels (because of compensations from different sizes).

I also can try to minimize the junk pixels cropping and joining images by hand or by a dynamic algorithm, (and having a table indicating the coordinates for each one) but I hope to avoid it.

258
Feature requests / Color Palette Manipulation
« on: October 08, 2008, 10:57:39 pm »
Thank you, that was a good explanation

259
Feature requests / Color Palette Manipulation
« on: October 08, 2008, 05:51:44 pm »
Thanks for the tip coral :)

260
Feature requests / Color Palette Manipulation
« on: October 07, 2008, 09:45:57 pm »
Quote from: "Laurent"
It would be more efficient (*) if all APIs and hardware in the chain support palettes natively; I doubt it's the case (in fact I don't know, I've never really tried).

Hm, ok. I don't know also :roll: . As gif, bmp, png etc supports indexed colour, jpg doesn't... a subclass for indexed color images... don't know.

I'm thinking on a game where enemies of the same kind are distinguished by it's colours (mainly the clothes, and specially to mark strength differences). As they will have a set of animations, each animation needing a set of images, with pixel manip I'm only seeing all these amount of images (probably a unique strip image) multiplication as solution (a copy for each colour differentiation).
Or maybe using shaders.. I'm not  familiarized with shaders yet :oops:

Ok, I'll see what I can achieve. I'm not doing this yet, just planning..

261
Feature requests / Color Palette Manipulation
« on: October 07, 2008, 08:07:26 pm »
If I think on use the same image for different sprites which changes only in some colours, that would be heavy to create copies of the original image and change the pixels. Sending a color table pointer to the sprite before draw it would be better, I think.

262
Feature requests / Color Palette Manipulation
« on: October 07, 2008, 02:57:57 pm »
Hi!

Is there a way to use images with 256 indexed colours, which palette is accessible?
I wish to change image specific colours without having to access all the pixels with these colours.

If it's just not possible, please move the topic to the feature requests.
Thanks

btw, very good lib :)

Pages: 1 ... 16 17 [18]
anything