Palette Question - Sonic 1

Discussion in 'Discussion and Q&A Archive' started by Blaumagier, Aug 14, 2009.

Thread Status:
Not open for further replies.
  1. Blaumagier

    Blaumagier Blue Mage Member

    Joined:
    Jun 5, 2008
    Messages:
    85
    Location:
    Alabama
    It is my understanding that Genesis games are capable of having 4 palettes loaded simultaneously. As far as I can gather, in Sonic 1 these are for Sonic (plus enemies, plus title cards, objects, interface, and Eggman), the stage itself, and I think 2 for the background? (I'm not 100% on this part.)


    Anyways, to make a long story short, how is it possible for enemies underwater in Labyrinth Zone to have a palette that is separate from Sonic (out of water), Sonic (in water), the stage, AND the background? This would make it 5 palettes at points where Sonic can be part in and part out of the water. Is there any way that I can use this in non-Labyrinth Zone stages to make enemies and objects not look pukified when I alter Sonic's palette to accomodate new sprites (particularly, of a different character)?
     
  2. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I'm not sure, but I know there are some routines called Pal_DecColor and Pal_AddColor which can simply make things darker and brighter without needing another palette file.


    As I said, I'm not sure and this is probably not correct though, but saying something is not wrong. :p
     
  3. iojnekns

    iojnekns OBAMA '012!!!!1!!!!!&#33 Member

    Joined:
    Mar 27, 2009
    Messages:
    258
    I'm not sure I totally understand what you're on about, and if I patronise you with obvious shit that you already know by completely missing the point, then my apologies in advance, but I'll have a crack - in my experience you have


    Pallete Line 0: Sonics pallete


    Pallete Line 1: HUD, Badniks, Objects


    Pallete Line 2: Level art (often foreground)


    Pallete Line 3: Level art (often background)


    This isn't a hard and fast rule though, and theres nothing stopping you from using, say, sonics pallete for making your level with, it just appears to be the general guidelines used by Sonic Team and its probably the best way to deal with things.


    Underwater shit is handled by the alternate pallete which is interchangable with the standard pallete. When something is submerged in the water, the colours are loaded from the alternate pallete line. I suppose practically speaking if you had water halfway up the screen, there would be eight different palletes on the screen. You can look at the alternate pallete by pressing the X next to the pallete editor in SonED 2, which will display all of your level art using the alternate pallete. Obviously it won't show the badniks or other misc stuff, but it should illustrate the general idea. There, I guess you should just change the alternate pallete so that the colours you want for your underwater badnik correspond with the colours on the standard pallete, make sure you flip it back to standard before you save (or you'll invert the two sets of palletes) and bingo - you've got your "5th" pallete.


    EDIT: as for using the alternate pallete for new characters... I won't say never, I'm sure its potentially possible, if you're willing to make the correct voodoo sacrifices to the ASM deities, but I don't think it would be straightforward. In any case, I'm still not totally sure I understand what it is precisely you are asking and suspect I may have got the wrong end of the stick.
     
    Last edited by a moderator: Aug 14, 2009
  4. Blaumagier

    Blaumagier Blue Mage Member

    Joined:
    Jun 5, 2008
    Messages:
    85
    Location:
    Alabama
    I don't think you really understood what I was asking but you did manage to answer the question. The part about underwater having basically an auto darken feature for existing palettes.


    But another thing you said interests me. You said that the badniks are supposed to be on the same palette as the interface, but whenever I change things to Sonic's palette and Sonic's palette only, it changes both the interface and the badniks. I know you said it's not a hard ruling, but that takes away one of the palettes you mentioned entirely.
     
  5. iojnekns

    iojnekns OBAMA '012!!!!1!!!!!&#33 Member

    Joined:
    Mar 27, 2009
    Messages:
    258
    Regarding the badniks, you answered your own question there. Badniks often share themes and therefore share colours with the level art, so it wouldn't be unreasonable to find a badnik using pallete lines 2 and 3 (ie: those "reserved" for level art.) Particularly in Sonic 1, there is no reason not to use Sonic's pallete for badniks although in later games where Sonic's pallete could be swapped out for Super Sonic, these badniks would find their colours changed too. As I said, they are guidelines rather than hard and fast rules, but generally speaking, unlike the other 3 pallete lines, the second pallete line (pallete line 1) is likely to have some spare colours around that aren't used by the misc objects and HUD that are often used by badniks.

    I'm a bit confused by the way you've worded this - the underwater palletes often are a little more subtle than merely darkening the existing palletes, they often add an appropriate hue to the level to give the illusion of being viewed through water, and to convey hte properties of the water - in Sonic 2 for example, CPZ's alternate pallete is thick and purple and suggests a toxic, polluted liquid but ARZ's uses a cooler, less abrupt pallete which implies cleaner, fresher water. Of course, there could be a scenario where simply darkening the pallete is appropriate.

    I think I addressed this in my first paragraph but again, I'm a bit confused about the way you've worded it. Do you mean you have replaced all palletes with replicas of Sonics pallete, or do you mean that you've set everything to use Sonic's pallete... I'm not sure. If you are replacing all the pallete lines with Sonics then you are the one taking away palletes entirely by needlessy duplicating them...
     
    Last edited by a moderator: Aug 14, 2009
  6. Blaumagier

    Blaumagier Blue Mage Member

    Joined:
    Jun 5, 2008
    Messages:
    85
    Location:
    Alabama
    I had a feeling I worded it in a confusing way. The line should have read:


    "You said that the badniks are supposed to be on the same palette as the interface, but whenever I change things on Sonic's palette, and only Sonic's palette, it changes both the interface and the badniks."


    But, as you said, it's not a hard set rule that Badniks be on a different palette and that it makes sense for them to use the same palette as Sonic in Sonic 1.
     
  7. Malevolence

    Malevolence Well-Known Member Member

    Joined:
    Jul 29, 2008
    Messages:
    97
    A rather shorter explanation would be the genesis is capable of having more then just one full four row palette, it does a trick where below the water line a whole new four lined palette is loaded, which means when any object or level art appear below the water, they change their color to the one equivalent to the one on the new palette.
     
  8. Blaumagier

    Blaumagier Blue Mage Member

    Joined:
    Jun 5, 2008
    Messages:
    85
    Location:
    Alabama
    Which means I couldn't use those lines that the underwater areas use in order to fix my palette throw up on Badniks that result from changing Sonic's palette.


    But would it be possible to fix the problem with Badniks by changing them to use the second palette line instead of the first?
     
  9. iojnekns

    iojnekns OBAMA '012!!!!1!!!!!&#33 Member

    Joined:
    Mar 27, 2009
    Messages:
    258
    Ahhh, okay, that makes sense now. Well, I'm glad I could help!


    As for you, Poolevolence,

    Bum nugget!


    EDIT: wow, I look like a pillock

    As I said, I wouldn't say never but I'm sure as Malevolence will tell you, it probably would require a bit of ASM trickery and possibly some goat sacrifice.

    If you can squeeze the colours you need onto the second pallete line without disturbing the colours of other objects and things, then yes. Really, it doesn't matter what pallete line you use at all, as long as you can find one which you can fit the colours on without disturbing everything else.
     
    Last edited by a moderator: Aug 14, 2009
  10. Qjimbo

    Qjimbo Well-Known Member Member

    Joined:
    Feb 27, 2008
    Messages:
    850
    Location:
    Vancouver, BC
    There are tricks to getting the genesis to display more colours, using interrupts and so on. A good place to look would be fvmembre's works section on Genny4Ever. Not sure if any of those tricks could work in the sonic engine mind you.
     
Thread Status:
Not open for further replies.