Lorikeet - Fast Palette Swapping in GameMaker

Поділитися
Вставка
  • Опубліковано 15 січ 2025
  • Ігри

КОМЕНТАРІ • 38

  • @DragoniteSpam
    @DragoniteSpam  2 роки тому +1

    Here's an in-depth breakdown of how palette swapping works:
    ua-cam.com/play/PL_hT--4HOvrexIIm1h9rAdhzFreaaAkhy.html

  • @KnightSansk
    @KnightSansk 10 місяців тому +1

    watched this a week ago, wanted to come back and thank you. I ended up using this to create about 60 pallets(10 each for different equipment,clothes,skins.,etc..) I was able to create so much unique game items using this. Your tool saved me from doing so much work.

  • @MegaKBang
    @MegaKBang Рік тому

    This tool is amazing!
    Can't believe that Google search wasn't able to find it, but at least UA-cam Recommendations came through a few days later.
    I was looking exactly for a tool like this!

  • @Axolotine
    @Axolotine 2 роки тому +1

    I was dreading having to code something like this myself lol thanks legend

  • @AppaBoy
    @AppaBoy Місяць тому

    Very nice, planning on using this.

  • @Gadgetmawombo
    @Gadgetmawombo 2 роки тому

    Looks legit! Thanks for making this.

  • @hyungjinpark1620
    @hyungjinpark1620 2 роки тому +1

    Awesome, great tool !

  • @mr.gameandwatchfan4243
    @mr.gameandwatchfan4243 Рік тому

    What if I want to apply the palette changes to animations? Like when the object is playing an animation or the animation changes?

    • @KnightSansk
      @KnightSansk 10 місяців тому

      use a sprite sheet that has sequential frames as animations in different rows or colums, then assign the object a sprite for collision mask only, use the "draw_sprite_part" method to draw the exact frame(row or column start of animation) , then create a loop that goes either vertically or horizontally according to your sheet. hope that helped

  • @Unkrosn
    @Unkrosn Рік тому

    Nice work.

  • @Ciara0
    @Ciara0 2 роки тому

    Thanks a lot for this. Great tool

  • @salgadinhoroxo
    @salgadinhoroxo 2 роки тому

    for some reason the palette editor thing is not generating the images it was supposed to

    • @salgadinhoroxo
      @salgadinhoroxo 2 роки тому

      ok i fixed it, but also found a bug, if there is any other files or folders in the same folder as lorikeet, for some weird reason it does not save the images.

  • @yurtonturtlegames188
    @yurtonturtlegames188 Місяць тому

    Hello my palette has an od number of colours 5 and I cannont seem to match them up. any suggestions?

    • @DragoniteSpam
      @DragoniteSpam  Місяць тому

      generally the way I'd do it is to pad out the palette to a power of 2, so that the palette indices can divide evenly into 256

  • @supak00pa82
    @supak00pa82 Рік тому

    Hi! I’ve noticed that currently the palette transitions don’t work without texture interpolation being on. Is there a way to work around this?

    • @DragoniteSpam
      @DragoniteSpam  Рік тому +1

      Unfortunately not easily, since the "colors" in the index sprite are used to look up a color in the palette, blurring them together will make the indices all messed up. You can:
      - Draw the sprite to a surface with interpolation off, and then draw the surface with it on; this is (probably) the more straightforward way, but it makes the computer do more work, though it's probably okay if you're not trying to draw a lot of sprites with palettes that constantly change
      - Keep interpolation off and simulate it in the fragment shader by sampling/indexing adjacent pixels; this'll be faster but correctly interpolating the colors yourself is a bit more work, and honestly something that I should probably remember to add as a feature eventually if it becomes a thing that people really want

    • @supak00pa82
      @supak00pa82 Рік тому

      @@DragoniteSpam Got it, I tried first solution and that only worked if I applied the palette to the surface itself, but that opens a whole different can of worms lmao. So! I’m going to try the frag shader option but I’d love to see how you go about it in depth!

  • @sadbread7261
    @sadbread7261 2 роки тому

    where can I find the code to copy for; lorikeet_reset , lorikeet_set , LorikeetPaletteManager and shd_lorikeet?

    • @sadbread7261
      @sadbread7261 2 роки тому

      Never mind I found it, great video! :D

  • @brunozoller4087
    @brunozoller4087 Рік тому

    Is there a way to download the sprites as images?

  • @devil-dead-arcade
    @devil-dead-arcade Рік тому

    Hi, great palette tool ! I downloaded it but I understand that there is a 256 colors limitation ?

    • @DragoniteSpam
      @DragoniteSpam  Рік тому

      Yeah, although if you really need more you can use the other color channels to expand it.

    • @devil-dead-arcade
      @devil-dead-arcade Рік тому

      @@DragoniteSpam The sprite for the player that I'm using comes from grey scale color with huge amount of hues, so that pixel from hair may be the same that pixel for face, arm.. I found a soltuion : reshape the sprite by seperating body parts, then convert it with texture packer in png 8 and then change the palette colors with your tool (it s a huge work ! but i think its worth doing that) thx

  • @emaaaaax
    @emaaaaax 2 роки тому

    awesome tool but i have a question, what is the logic behind choosing the right shade of gray for the index colors?

    • @DragoniteSpam
      @DragoniteSpam  2 роки тому

      Right now it just puts them in order that it finds the colors in the original image. You could sort them in order of most common/least common or by hue, but I haven't done that.

  • @owltoe0164
    @owltoe0164 Рік тому

    If an object uses multiple sprites, do you need to index each one or just one of them?

    • @DragoniteSpam
      @DragoniteSpam  Рік тому

      If you mean one sprite with different palettes, you can just index the sprite once and create as many palettes as you want

  • @brunozoller4087
    @brunozoller4087 Рік тому

    first of: amazing video and really clean tool, commercial product quality.
    i do have a small question, i use multiple different spritesheets with the same colors but the program gives me a different order for the sprites, ive attempted to simply manually edit the sprite so it should fit all in all but without much success, is there an inbuilt feature ive overlooked for this problem or a different workaround u could imagine?

    • @DragoniteSpam
      @DragoniteSpam  Рік тому

      A few other people mentioned this a while ago, I need to remember to edit the way the colors are indexed to make it deterministic. Might make that a task for this weekend.

    • @brunozoller4087
      @brunozoller4087 Рік тому

      @@DragoniteSpam nice to hear that, I can foresee quite a few challenges in creating a deterministic system.
      Maybe I am overlooking an easy solution (also I don't know the code haha)

    • @DragoniteSpam
      @DragoniteSpam  Рік тому +1

      @@brunozoller4087 It would actually be easier than what it's doing now, but I tried to group similar colors together - that didn't really end up being useful, and by far more people would tather to be able to import already-colored sprites

    • @brunozoller4087
      @brunozoller4087 Рік тому

      @@DragoniteSpam yes, or at least have the option to instead of having to manually edit every indexed sprite afterwards

    • @KnightSansk
      @KnightSansk 10 місяців тому

      @@brunozoller4087 It works well for me but I have to note that to create the pallets I used the indexed sprite and sort of matched the different pallets to that same index , you just have to keep trying until you get one that look good, the lorikeet is super simple and fun to use for that option. so I guess the easy solution would be the one I did , start with the index then for similar items like clothes type or hair or whatever copy the pallet s for the the sprite that worked and change the hue of the index until you get a result you like.

  • @MachineMan64
    @MachineMan64 2 роки тому

    This is a great palette shader and pretty easy to understand too.
    I hope asking for a little help won't bother you, but I'll ask:
    How would I make it so that a part of an object's sprite switches palette when touching water (an object), while the part of the sprite that's not touching water doesn't switch palette?

    • @DragoniteSpam
      @DragoniteSpam  2 роки тому +1

      If the water surface is flat the easiest way to do it would probably be to draw the regularly colored sprite first and then draw_sprite_part the bit of the sprite that's underwater with a different palette, if the water can wave up and down you'd probably want to create a clipping mask where the water is and use that to be able to cut out the part of the sprite that's underwater, which is considerably more work: yal.cc/gamemaker-draw-clip/#any-surf

  • @lucaslol8382
    @lucaslol8382 2 роки тому

    the max quality is 360p :(

    • @DragoniteSpam
      @DragoniteSpam  2 роки тому +1

      Still processing, check back in a bit.