![]() ![]() Have and input shader read white and output based on your variable. Ä°lk olarak BBX tarafından gönderildi:This is done via shaders. Or even have a 'green screen' effect with that particular color. Using shaders you can probably check the color of a pixel and change it to be whatever color you want if it's equal or close enough to your desired color. If you can get shaders to work that would be easier to do what you want to, and I bet it isnt even that hard to do. The color sprite was usually plain white or had bits of grey to make bits darker. ![]() I did this with teams on a space game I tried and I essentiall set up s_shipname_base and s_shipname_color. No idea about how to do things with a tolerance range or anything of the sort.Äraw_sprite_ext(clothing,image_index,x,y,image_xscale,image_yscale,image_angle,clothing,image_alpha) All I could gather is that it was able to take the color of pure white in an image and swap it to red. No explaination of how I can go about making any to suit my needs though.Ä®ven tried to figure out the shaders demo that comes with Gamemaker since that has a thing on color swapping, but it didn't really explain anything about how its working. unfortunately I can't find anyone actually giving understand information on how it works and how to make and use shaders.Īll I've managed to find is people showing off what shaders can do or providing their own shaders. I've tried looking into the idea of using shaders for it since from what I've read it sounds like thats a way to do it. I kinda pity anyone making an RPG or anything similar since they wouldn't be able to just do simple color swapping, but have to actually make entirely new sprites. If I further broke my objects down into more objects, a pre-determined color part of the object and a part that is easily altered by blending, then I'd end up having even more sprites and having even more things to have to coordinate together during animation. Currently I have seperate sprites for each player color, but now that I'm at the point of having to actually do various animations and things its just turning into a massive chore and a huge amount of sprites despite not having many different types of units in my game. ![]() I was hoping to have my units have a part of them showing the color of the player that is in control of them. I figured that since it was easily doable in the sprite editor there would likely be some form of sprite, color, or draw function that would allow you to do it. there really isn't a simple and efficient way to do color or palette swapping? If you have the basemap on index 0 and destination palette on index 1 of spr_palette, then you'll change "sprite_get_texture(spr_palette, 0)" with "sprite_get_texture(spr_palette, 1)" to modify the output palette.Wow. You would then modify what texture is being set as the stage accordingly. That part at least was made clear in the tutorial. One source (sprite, subimage, surface, etc.) per palette. Anything would work as long as it's not the same source-you can't really merge all palettes onto a single sprite subimage without modifying how the shader works. While you're at it, change the "i<=n" conditional in the for statement with "i ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |