User Tag List

Results 1 to 6 of 6

Thread: Mega Man Color/Palette Swapping: Game Sprite vs. Multi Layered Masking

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Mega Man Color/Palette Swapping: Game Sprite vs. Multi Layered Masking

    So, I've been experimenting ways to come up with palette swapping for games like Mega Man. The only way to do it correctly without color loss is to use layered masks. This example shows you the differences of color swapping a single game sprite vs. using masks for the same effect.

    Screen Shot:


    Pressing the numbers on the keyboard will give you different Mega Buster charge frames.

    Press the Enter key for the Rush Coil/Jet palette

    Pressing Space Bar will give you the ink effect from Mega Man 9.

    The option is set to layered masking by default. Using the single sprite option, you will see that the colors will eventually get lost in transitions.
    We do NOT want this behavior. So the only logical conclusion is to use layers to achieve the best effect possible.

    Download color tests example below:
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Nice example, interesting dilemma!

    Within Fusion, this may well be the only way to authentically achieve the exact results you have... it's too bad it requires so many extra objects, especially if you have a more detailed sprite with more colours.

    Depending on how authentic you want to be, there could be a small tweak/work-around to the issue of having the colours lost in cycle transitions.. and that is for each palette to have a slight value shift where the colours cycle.

    This of course, is not faithful to the NES.. I guess it's a trade off of having multiple objects vs extra colours.. if they're flashing as rapidly as in your example, I think the colour shift isn't noticeable and could be a viable alternative.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    The idea actually comes form a user programming in Game Maker Studio. He uses the very same set up in Game Maker to produce the given effect without shaders. Here's his tutorial explaining the set up.
    https://www.youtube.com/watch?v=zXQ2akOV0W4

    So yea, my idea is to try to stay true to the NES colors as much as possible. In the game I am working on, I even have a set up where the user can change the type of NES color set in the options, even as far as experimenting using a grayscale pattern. Though these colors will only be replaced once for when the frame loads. So most of the animation scenes will most likely be single object sprites, while the game engine will be the actual set up of layered objects.

    If I remember right, I actually did "fix" the face, white eye color, and black mouth/eye color of the single sprite on the left in that example, in which would be your case about slightly altering the colors going beyond the NES color limit. Unfortunately, I'm not entirely crazy about doing that.

    The only thing I can imagine with the whole color replacement at the start is a long load time to correct to the new colors. I can probably put up my work so far to show what's going on to get an idea of my set up.

    Otherwise, I can agree that having multiple objects layered on top of another can be very tedious, but it does seem to work as originally intended.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2014
    Posts
    976
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    @N64Mario

    yeah, i was querying this a while back for a fighting game i am making & i found this thread, its an interesting but long read.

    https://community.clickteam.com/threads/95600-Suggestions-for-how-to-quot-palette-swap-quot?highlight=COLOR+PALETTE

    p.s. i go back for ur shen long vid every so often... it still rocks

  5. #5
    Clicker Fusion 2.5 DeveloperSWF Export Module
    N64Mario's Avatar
    Join Date
    Nov 2008
    Location
    USA
    Posts
    1,306
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SHINBAXTER View Post
    @N64Mario

    yeah, i was querying this a while back for a fighting game i am making & i found this thread, its an interesting but long read.

    https://community.clickteam.com/threads/95600-Suggestions-for-how-to-quot-palette-swap-quot?highlight=COLOR+PALETTE

    p.s. i go back for ur shen long vid every so often... it still rocks
    Yea I looked on that thread. Interestingly enough, it still has that issue of color loss when you use replace color to cycle the same shades. So to prevent the color loss from happening, I separated the sprites colors as their own object if you want to stay true to the original games colors.
    The only other 'work around' option would be to use the shaders pack, which only works in some display modes. I'm not all that crazy to being forced to using certain display modes for these effects. Who knows, maybe advanced display modes will become a forced standard in the next few years.

    Here's some more screen shots of what working on in terms of my ideas related to this topic.

    - Left screen shot will have a number of NES color sets I chose for this game. There's even an option for the RGB color set, and a Grayscale option.
    - Right screen shot is a more detailed overview of the example MFA I already posted here of using separated sprite layers to show the effect.

  6. #6
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2014
    Posts
    976
    Mentioned
    16 Post(s)
    Tagged
    1 Thread(s)
    there was a way to do it on the thread i linked, if u swap all the colors back to a certain base palette and then swap them to the new ones u want.

    & u have to make sure every color is always different, so if u want all the colors to be white, they wud hav to be like, 255,255,255 - 255,255,250 - 255,250,255 - ,250,255,255

    the colors wud be so close the eye cant tell them apart, but i stops the overwriting.

    really wish there was just an indexed color mode lol.

Similar Threads

  1. Change Color Palette and Update Sprite Colors
    By Shadeve in forum Fusion 2.5
    Replies: 12
    Last Post: 23rd January 2018, 09:34 PM
  2. [PAID] Per Pixel swapping + 4 color shader
    By GamesterX23 in forum Paid Design & Development Requests
    Replies: 0
    Last Post: 2nd September 2017, 02:37 AM
  3. Bug?? Color Palette
    By tom79 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th December 2013, 08:29 PM
  4. color palette
    By bnanns in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 3rd March 2011, 04:52 PM
  5. Palette Swapping.
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 4th September 2009, 09:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •