Creating a 256-color palette...

Started by , Tue 13/05/2003 21:39:09

Previous topic - Next topic

GM

Hello everyone, I need your help!
I just started making a 256-colored game by using AGS 5.4. I imported a backgorund picture for the first room, then tested the game and saw that there was something wrong with colors. They were not the ones I chose while I was creating the pic. I could convert the game to hi-color but it would just make it larger -You know it's not good when a stupid game takes much more space than it's quality-.It seems the only solution is creating a palette that supports the background pics (and character sprites). But how? How will I create a palette with the exact colors? By the way, I'm drawing my pics with MS Paint. (But I can use any other software if necessary)

Andail

Hm, if you already have reduced the amounts of colours in your background image to 256, there shouldn't be any losses when you import it, as the backgrounds have their own palettes, so to say, and are not restricted by the engine's palette.
Of course, the sprites need to be drawn exactly in these colours.
Perhaps you are running on a too low resolution, and it makes it look weird?

scotch

The backgrounds do need to have enough slots allocated to them, usually you reduce backgrounds to around 200 colours so there are enough slots for cahracters and invs.  Although if you make the bgs in paint you probably wouldn't have gone over 200 anyway ._.

GM

I solved this problem. But here's another one: I have a background with a bar (sign).  I made a different version (flashing sign) of the background so that I can give the sign the effect of flashing. I clicked the "Animating backgrounds" button and then the "New Frame" button in order to import the new bg pic...Then I tested the game... Right, it was animating; not just the sign itself, but the whole background!  :o

Please help me people! This really irritates me!  :(

Andail

well, of course if you use the "animate background" function, the whole background will animate and not just some part of it....
make the sign an object instead, and have it animated as that. Will save some loading time as well, and some memory.

GM

Quote from: Andail on Wed 14/05/2003 23:14:12
well, of course if you use the "animate background" function, the whole background will animate and not just some part of it....
make the sign an object instead, and have it animated as that. Will save some loading time as well, and some memory.

Oh I see, but can you explain me how to do that?

scotch

#6
On the room editor just press 'Animating Backgrounds' to animate the whole bg, to animate it as an object you could just cut out the sign when it's on and save that as a bitmap on it's own, then import it as a sprite, make a new object in the room, set it's image to the 'sign on' sprite then position it correctly.  In your script you'd have to script it becoming visible then dissappearing repeatedly.. a way you could do this is something like this in your repeatedly excecute interaction:

signcounter++;
if(signcounter==20){ObjectOff(Numberoftheobject);}
if(signcounter==40){ObjectOn(Numberoftheobject); signcounter=0)}

and in your room script near the top, outside any functions put the line

Int signcounter;

That would make the sign turn off after 20 game cycles and on after another 20 repeatedly, (there are usully 40 cycles per second)

If that is too hard then you could just animate the background, it basically just means the filesize will be bigger :)

Andail

#7
EDIT: Asch, Scotch edited after my reply...

GM

Quote from: scotch on Thu 15/05/2003 12:37:04
...If that is too hard then you could just animate the background...

I don't think you understood me. I already know it -but thanks anyway- Well, I will explain my problem some other time 'cause I have to go now...

Enlaithion

What do you mean the whole background animates?  Did you actually draw the whole scene twice?  I'm asking b/c I haven't experienced this yet.  Usually animate background works for me.

Enlaith

GM

No, I didn't draw it twice; instead I saved the original one as another name (I mean I copied it) and made a difference on that new one. I gave the bar sign an effect of flashing by highlighting it -  didn't change anything other than that - Then I imported that new file as an animating background, then tried it out but the whole background appeared to be flashing- not just the sign itself- The colors were changing and getting back to normal repeatedly... So, what do you think?

Gilbert

Very much like they're having different palettes, which can cause problems in some settings.

I don't know what programme you're using to draw them, but "better" programmes might have a function, that when you save a pic in 256 colours you can specify a custom palette. The trick is, save the first in 256 colours, and use the palette in the first as a custom palette.

I myself would rather use a native 256 colour editting tool (DP and the such), so this is mostly the fault of crappy truecolour window$ programmes.

GM

I have already done it - I used the palette in the first one as a custom palette-  but it didn't solved the problem. I'm drawing my sprites and backgrounds in MS Paint. What software do you suggest me other than it? And what is DP, is it only a software for creating palettes or can it also be used for drawing, painting etc.?

agsking

#13
I think he means Deluxe Paint.
It's very good, I also think they used it for Monkey Island 1, but I know it is way better than mspaint.

http://monkeyisland.fanspace.com/dpaint.zip

Hope that helps!
BTW: When you want to import a picture into AGS save it as a .PCX

Volcan

I got a forbidden error.

I can't able to download Deluxe Paint.


Robin Gravel


SMF spam blocked by CleanTalk