Setting a transparent color in Pixie

<< < (4/8) > >>

Mattias Gustavsson:
Oh, and one more thing:

Quote from: Cycl0ne on April 19, 2011, 05:18:27 PM

What would be nice, do you mind doing a screenshot of your source files form your clone? or even publish it? I would be very interessted how you split up the gamestates.

Yeah, I'd be happy to share the source of what I have so far - but I'm not sure how useful it would be, as I just barely started - I only have one gamestate for walking around - so it's not even a game yet, just a simple walk-around demo. But let me know if you'd like to have a look anyway, and I'll dig out the source.

Oh, and one more thing about the RLE8 format - when blitting them, you may specify a colour, which it modulates the bitmap with, which is useful for making things darker far away. But the nice thing is, that since RLE8 bitmaps are palettised, I only need to modulate the colours of the palette into a temporary palette, rather than having to modulate each pixel - so at most it will darken 256 colours, and then blit the actual bitmap the same way as if it was unmodulated, but using the modulated palette - which is great for speed :D

Wow that sounds really cool, since i need to darken the sprites the farer they are away. Where it wont help me, is to darken the whole DungeonView, since it is already blittet. i will use the transission code perhaps for this effect ;)

Mattias Gustavsson:
Hmm, wouldn't you be able to use this to darken anything? I mean, when you're blitting the dungeon view, you could just modulate each blit?

Yes could be an Idea, a friend of mine said, i should try to blit a black screen and alphablend it.

Mattias Gustavsson:
Well, alphablending in software is slow, so I wouldn't recommend it... But what I was thinking is, that for each bitmap you blit, you give it the right value to modulate with? That way, you'd be able to use the fast way for modulate for everything on screen, even the view of the dungeon (as each bit of the dungeon gets modulated when you blit it...)


[0] Message Index

[#] Next page

[*] Previous page