Hey there! I've written a tutorial on how to do Palette-based Sprites in Gamemaker Studio 2! (It should also work in GMS1)

If you follow it, you SHOULD be able to do what's going on in the video. Check it out here: patreon.com/posts/29149858

#gamedev #indiedev #gamemaker

This tutorial deals with shaders, texture pages, and surfaces, but if you don't know anything about any of those things I've tried my best to break down everything that you need to know to get it to work. I also explained how palette based sprites work in general, too

(however, I don't think you can use the drag and drop interface to do this, but I could be wrong - I personally haven't used it since Gamemaker 4 haha)

Anyways, if you do end up using this tutorial for something, I wanna see!! Or just let me know that you found it interesting, it'll encourage me to write more tutorials

Oh yea, credit where credit is due, it was @eevee who put the idea in my head about using the color values as UV coordinates but I didnt know anything about shaders at the time so I didnt know what to do lmao

@roxy @eevee I've never thought about using the sprite as a UV map before but this is SUPER clever. I gotta try it myself sometime !!!!

@hy @roxy you can also do it with a sprite colored as usual, but then the palette image has to be a flattened color cube like this

@hy @roxy i love how shaders think everything is just numbers and you can make heavy abuses of that. people do stuff like use the alpha channel to mean reflectiveness or whatever

@eevee @hy the alpha channel for reflectiveness, hmmmm.........

@roxy @hy yeah and you can also make lighting effects work in 2D by using rgb to draw a normal map for a sprite

@roxy @hy oh yeah they put the normal map in the first reply. they tend to look very rainbowy since objects usually have a surface somewhere facing in every possible direction

@eevee @hy THATS why they always look rainbow

so the rgb is just the xyz coordinates of the way the pixel "faces" and then you shade it depending on which way it's facing? Hmm...

@roxy @hy yep! but since it's a sprite you have to do it basically by hand, and for every frame, which is a huge pain in the ass, so you don't see it very often

@roxy @hy although, heck, your lances are all based on a model so you might be able to generate a normal map somehow if you wanted to

@eevee @hy yea I thought about it, but it wouldn't give me a reasonable result that I could justify a use for

however, I COULD try to do that light source pixel shading like they do in Paper Mario

Sign in to participate in the conversation
Chitter

Chitter is a social network fostering a friendly, inclusive, and incredibly soft community.