Page 1 of 1
I need help.
Posted: Sun Jun 20, 2021 10:29 pm
by zippycat
How can i make so sprite's colour changes without wasting space by creating multiple sprites for object?
(for example i want to make blue logo into green or even make it go and be rainbow
)
edit: by rainbow i mean it slowly changing its colour by little.
also i need something more than that. how do i change icon that appears before you boot up the game? (for example you put in cartridge in your ds and it shows an icon next to the name of the project)
Re: I need help.
Posted: Mon Jun 21, 2021 11:18 am
by Ruffsta
sprite sheets...
example:
viewtopic.php?f=14&t=18
you just change the sprite frame of the sheet.. so you would set say sprite 1 frame 0 to sprite 1 frame 2 and so on...
Re: I need help.
Posted: Mon Jun 21, 2021 12:05 pm
by zippycat
Ruffsta wrote: ↑Mon Jun 21, 2021 11:18 am
sprite sheets...
example:
viewtopic.php?f=14&t=18
you just change the sprite frame of the sheet.. so you would set say sprite 1 frame 0 to sprite 1 frame 2 and so on...
no i meant like can i do so it like could change the colour without using sprites?
like with code.
edit: ehh... fine ill use the spritesheet method
Re: I need help.
Posted: Mon Jun 21, 2021 2:10 pm
by Ruffsta
no i meant like can i do so it like could change the colour without using sprites?
like with code.
basically, in short.. to my knowledge - no, you cannot change a sprites color by code.. After all, it's an image you are displaying... you would have to make multiple sprites or a sprite sheet.
which reverts us back to the example link i provided...
think of it as an animated GIF.. you have to have the separate images/frames to do what you want it to do and display. that could be multiple sprites or a sprite sheet.. the choice is yours.. obviously i would do a sprite sheet and just change each frame in order so many seconds apart instead of having all these sprites. but that's just me.
Re: I need help.
Posted: Mon Sep 13, 2021 11:22 am
by SWEET_TOOTH
For this you would need to use shaders. I don't know what is the support of that on GMDS but you could try to see some "pallete swap" codes in C language. It could be implemented.