Color swap issues

Discussion and feedback on Construct 2

Post » Mon Nov 16, 2015 5:00 pm

Hello,

In my game (for desktop, not mobile devices), I want to use the "replace color" effect to change the color of my character's clothes, decorative elements, etc...

I ran a few tests and it works quite well, but I have a some questions :

- I use 25% tolerance with this effect to change the color I want and the shadows for this color (basically it is the same color with a black form with 20% opacity on top of it in Inkscape). It works most of the time without impacting other colors, but for some colors the color is changed but not the shadows for this color, so I was wondering how does Construct 2 determine that a color is close or not according to tolerance ?

- Furthermore, and that may be the real issue here, I wanted to use this effect a lot in my project to avoid creating new sprites, but is it a good idea ? I mean I don't want too much effects to damage the performances of the game, or getting a suspicious-looking display on some computers because the effect is not supported... Is it better to create new sprites everytime at the risk of weighing down the game a lot ?
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Sat May 27, 2017 1:47 am

Good question, I am facing the same issue and I was working on hidden images that appear only with the colour changing. So I was for example having a pixel at Red 201, Green 200 and Blue 200 (with tolerance 1) hidden on an area with R, G and B all at 200. It doesn't work. It works only if I put the Red to 202 but another pixel next to it at 205 is lightly influenced. When instead I activate the pixel with 205 it doesn't influence the 202... Quite hard to get it.

I am wondering if you have find out it by yourself.
B
23
S
6
Posts: 54
Reputation: 1,462

Post » Sat May 27, 2017 10:37 am

Ok I have figure it out that having one of the three channels with at least a difference of value of 3 gives enough good result. In the next days I will link the example. It will be on my website that I am developing.
B
23
S
6
Posts: 54
Reputation: 1,462

Post » Mon May 29, 2017 9:42 pm

Hi @Biim it's been a long time since I opened this thread, so I'm really surprised to get an answer now ^^

I didn't find it out by myself, there where always some colors that weren't changed so I didn't use this feature after all (not the way I intended to at least ^^')

I'm really happy that you figured it out, and it's really nice of you to share your results, I look forward to your example :-)
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Wed May 31, 2017 12:41 pm

Thank you @Ratmaster, I am refining few other things and I should be ready in a week or so I guess. I will keep you posted! :-)

For your kind of feature I also suggest you to use Spriter if you don't know it already.

I did this coulor changing just because I am old and I have been fascinated how in the old times people animated static images just changing the colour palette. I was curious to test and I have discover how much fun it is, even if not sure if worth the time spent on it :-)
B
23
S
6
Posts: 54
Reputation: 1,462

Post » Wed May 31, 2017 2:47 pm

@Biim thanks :-)

Well I tried Spriter but I think animations aren't as fluid and natural as I'd like, so I prefer making classic sprite animation ^^

Also I wanted to use the color swap feature for a zelda-like and I think spriter is better for side-scrolling games :-p


If I figure out how to use it properly I could use it for all kinds of assets (characters, trees, FX, etc...)

I could easily create new sprites with another color every time, but the game would be much heavier, that's why I was wondering what the best choice is >_<' :
- a lighter game with color swap (I hope it doesn't lag because of it though)
- a heavier game with no color swap ^^
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Wed May 31, 2017 9:05 pm

Have a look at they RPG Hero Pack:

https://www.youtube.com/watch?v=5_GxxnyPFsU
https://www.youtube.com/watch?v=dMhKC1099Ak

Spriter also have a built in colour replacement function, I will try to find it later but I think it is written in their online manual. Anyway they says that not all the systems support it so I am not sure it can be used on Construct 2. However you can still use the C2 colour replacement for that.

I haven't played much with Spriter but smooth animation I guess comes with lots of experience :-)
B
23
S
6
Posts: 54
Reputation: 1,462

Post » Thu Jun 01, 2017 1:12 am

Thanks @Biim it didn't exist yet when I used this software ^^

However I still think the animation with spriter looks really unnatural and jerky (even the ones made by the creators of the software) so I prefer to use classic frame-by-frame animation. :-p
For example I'm very impressed by the work of Paul Robertson (the animator behind games like "Scott Pilgrim vs the World" or "Mercenary Kings"). The character are much more lively and you can't obtain something like that with bone-based sprite animation. ^^
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Thu Jun 01, 2017 11:33 am

Yes, I understand your point. I think it also really depends on the style of the game you are going to create. In my case, I am not an artist, and therefore using Spriter will save me lot of time even though the result will not be perfect for the eyes but still more enjoyable than me drawing each single frame :P

I am looking forward to see your game and animations :)
B
23
S
6
Posts: 54
Reputation: 1,462

Post » Thu Jun 01, 2017 5:11 pm

@Biim Thanks :-D For now it's mainly some tests and prototypes, nothing really impressive, but I intend to make a living with games on the long term, so I'll do my best to make cool stuff :-)

I understand, if you don't really like to draw or animate, Spriter is indeed a good solution ^^
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests