Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Monsieur OUXX on Wed 25/11/2015 17:54:25

Title: [SOLVED] Palette cycling does not happen
Post by: Monsieur OUXX on Wed 25/11/2015 17:54:25
Can someone explain why the palette cycling does not happen in the background image? I suspect it has something to do with "game palette"/"background palette" because the shifting does happen on the character and GUI.

My mock-up game >>HERE<< (https://www.dropbox.com/s/agqup8t2e6rwicm/palette_cycling.zip?dl=0)

Note: the shifting is done in the room's RepExec script.
Title: Re: Palette cycling does not happen
Post by: Scavenger on Wed 25/11/2015 19:27:40
Your background got it's palette slots rearranged:

(https://dl.dropboxusercontent.com/u/50882197/art/GameStuff/Palette_Write.PNG)

AGS will remap slots bottom up unless you specifically tell it to not remap the slots.
Title: Re: Palette cycling does not happen
Post by: Monsieur OUXX on Wed 25/11/2015 20:57:43
Quote from: Scavenger on Wed 25/11/2015 19:27:40
unless you specifically tell it to not remap the slots.
how do you tell it to NOT remap? It didn't ask me!
Title: Re: Palette cycling does not happen
Post by: Scavenger on Wed 25/11/2015 21:06:09
File-->Preferences...->In the lower left corner, 8-bit background import.
Uncheck the remap option.

Check if it still remaps:
Code (AGS) Select

DynamicSprite *test;
test = DynamicSprite.Create (16, 16);
int x = 0;
int y = 0;
DrawingSurface *surf = test.GetDrawingSurface ();
int i = 0;
while (y < 16)
{
  while (x < 16)
  {
    surf.DrawingColor = i;
    surf.DrawPixel (x, y);
    x++;
    i++;
  }
  y++;
  x=0;
}
surf.Release ();
test.Resize (128, 128);
//Then display test by any means you want.

The above code will create a palette image for you to look at.

Make sure that your background palette either has a copy of the gamewide palette, or blank spaces where the gamewide palette is, or you'll run into the picture just being garbage.
Title: Re: Palette cycling does not happen
Post by: Monsieur OUXX on Wed 25/11/2015 21:32:13
SON OF A ....!!! I've thouroughly searched the game options, but I never noticed that there were additional settings in that submenu.

As per the palette-display script: Thanks a lot! I guessed that you had written something like that after viewing your picture. That'll surely come handy.
Title: Re: Palette cycling does not happen
Post by: Monsieur OUXX on Wed 25/11/2015 21:46:12
I'm expriencing extreme frustration right now, because my original file is on a different computer (to which I won't have access until tomorrow) and right now I'm stuck with two files: One imported by AGS, with the palette messed up, and the other one saved by Photoshop, with the palette automatically rearranged (a.k.a messed up). So both files are useless. JUST LEAVE MY PALETTE ALONE, YOU M*TH*RF*CK*RS. Pssssh.
Title: Re: Palette cycling does not happen
Post by: Gilbert on Thu 26/11/2015 08:43:53
From the Wiki (http://www.adventuregamestudio.co.uk/wiki/256_Colour_Tutorial_Part_1):
Quote
Two good choices of such programmes are Deluxe Paint ][ Enhanced (DP2E) and Grafx 2, as they're 8-bit pixel graphics editors and they won't do foolish things automatically (like "friendly" sorting and trimming your palette, merging slots with similar colours, dithering you images, etc.).
Anyway, if one seriously need to use 8-bit images use only real 8-bit editors. :=
Title: Re: Palette cycling does not happen
Post by: Monsieur OUXX on Thu 26/11/2015 09:06:27
Quote from: Gilbert on Thu 26/11/2015 08:43:53
From the Wiki (http://www.adventuregamestudio.co.uk/wiki/256_Colour_Tutorial_Part_1):
Quote
Two good choices of such programmes are Deluxe Paint ][ Enhanced (DP2E) and Grafx 2, as they're 8-bit pixel graphics editors and they won't do foolish things automatically (like "friendly" sorting and trimming your palette, merging slots with similar colours, dithering you images, etc.).
Anyway, if one seriously need to use 8-bit images use only real 8-bit editors. :=

That's precisely the ones I'm using, but as I explained in another thread, my issue is then to render the palette cycling in a 32-bit game, which means "exporting" it first. I'm on the verge of succeeding.