Page 2 of 2

Posted: Tue Aug 02, 2005 9:20 pm
by DoubleDutch
Your userlib sounds good. :)

By 2-bit i mean 4 colour (colours 0, 1, 2, 3) with the ability to set the draw palette (it not converted to a 24-bit sprite on loading, but on drawing).

By 4 bit i mean 16 colours (colours 0 thru 15), again with the same palette abilities as 2 bit.

By 8 bit i mean 256 colours (colours 0 thru 255), again with the same palette abilities as 2 and 4 bit.

The ability to set the palette at draw time is very useful i doing rpg top-down or scrolling games.

-Anthony

Posted: Tue Aug 02, 2005 9:41 pm
by va!n
:-) as i said, the release of my planed userlib with such a feature can take a lot time! (need help in some other parts first ;)

yes, i fully understand what you are planing! ;)

Posted: Wed Aug 03, 2005 2:53 am
by Fou-Lu
va!n wrote: i dont need 2 or 4 bit sprites! maybe you mean 16/24/32 bit sprites with colors like a 4bit image (also 16 colors?) !! You can still save your image as 4 bit BMP and load it with PB (PB supports loading 4 bit sprites!) :-)
It's exactly the opposite. I know PB loads 4bit sprites, but they become 16/24/32 bit on other screen modes. A 4bit sprite has only 16 colors, but they are selected from a 32bit palette. If you didn't notice yet, most games on consoles use this kind of sprite, as they are faster, use less memory and permit real time remapping. :wink:

Posted: Wed Aug 03, 2005 3:16 am
by Fou-Lu
Sorry for my last post, I didn't see the "page 2" on the bottom of the screen. Anyway, the fastest way I know for doing this would be to create an array with the colors and poke each pixel one by one. But PB doesn't load 8/4/2bit sprites without changing their depth. It would be possible to simmulate that sprite with allocatememory, but I doubt it would be possible to draw it in real time as fast as normal sprites. But I only know the "purebasic way" for doing this things.

@va!n : Do you think its possible to achieve this effect fast enough? I mean, I saw it on a psx for example, but I don't know if it can be done the same way on a pc.

Posted: Fri Aug 05, 2005 8:38 am
by va!n
yes, the way i would use for doing this, should be very fast! :-)

Posted: Fri Aug 05, 2005 8:40 am
by Fou-Lu
OMG! I'm so happy!!! At least, it's possible! :D