Feature request C2/C3: Texture atlases in editor

Discussion and feedback on Construct 2

Post » Fri Apr 24, 2015 2:24 pm

I've made this one before but I think it's important so I'll make it again :P

I'm developing a game that's heavy on character animations, 200+ frames for playable characters-heavy. I plan to have several color choices available for these but the only way I can achieve that right now is to duplicate the sprite object in question, and then *manually* replace each and every frame with the new color sprite. Try doing that for hundreds and hundreds of frames :P

There's also the issue that I don't put finalized graphics into C2 and then never touch it again. I modify and refine and tweak along the way. This is something graphics artists tend to do, especially when throwing something together to prototype new functionality. But again the image editor in C2 makes it very cumbersome.

This could all be rectified by exposing sprite sheets/texture atlases in the editor. Now I know the way things work right now is they get assembled on export and not before, so I guess it would be a big undertaking to work into C2. But could we have it for C3 maybe? Please?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Fri Apr 24, 2015 2:56 pm

200+ frames is bound to have other issues as well.
You might want to consider a webgl alternative.
Image ImageImage
B
169
S
50
G
174
Posts: 8,325
Reputation: 110,794

Post » Fri Apr 24, 2015 3:04 pm

For real? You mean I'll run into memory issues with webgl?
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Fri Apr 24, 2015 3:09 pm

newt is suggesting using a webgl shader. If you used a shader to change the colour you can avoid the impact of extra colour changed versions of your sprite.

Can I ask. What is the resolution of your character. I can imagine 16x16 based character sprites running at 200+ frames. But I can't image much larger using 200+ frames. I can barely think of any games that need so many animations. And the few that I do know tend to very limited graphicially. Such as fighting games which are just 2 characters and a background set pieces.

So you have a sample of what needs 200+ frames.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,028

Post » Fri Apr 24, 2015 3:23 pm

You shouldn't duplicate frames to change a couple of colors - you'll use a lot of memory and add a lot of download size for that. WebGL shaders can replace colors or apply a tint, so that would probably be a better idea. Or you can just compose the changing bit as a separate object.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Fri Apr 24, 2015 3:40 pm

Double-post
Last edited by ErekT on Fri Apr 24, 2015 5:29 pm, edited 1 time in total.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Fri Apr 24, 2015 3:43 pm

jayderyu wrote:newt is suggesting using a webgl shader. If you used a shader to change the colour you can avoid the impact of extra colour changed versions of your sprite.

Oh right haha. I did consider it, but it won't work unfortunately. A shader along the lines of Tint will recolor the entire sprite with an even color ramp. It'll look cack. If I could write a shader that used some kind of lookup table for the palette I could change single colors but I don't have the skills to pull off something like that.

jayderyu wrote:Can I ask. What is the resolution of your character. I can imagine 16x16 based character sprites running at 200+ frames. But I can't image much larger using 200+ frames. I can barely think of any games that need so many animations. And the few that I do know tend to very limited graphicially. Such as fighting games which are just 2 characters and a background set pieces.

So you have a sample of what needs 200+ frames.


I'd say an average of 30x60 for each animation frame. So far I have 500 frames loaded at once with no noticable issues, even on an old netbook(!). I posted a screenshot in this thread with the sprite size in question:

color-weirdness-with-newest-nw-js_t127947

Ashley wrote:You shouldn't duplicate frames to change a couple of colors - you'll use a lot of memory and add a lot of download size for that. WebGL shaders can replace colors or apply a tint, so that would probably be a better idea. Or you can just compose the changing bit as a separate object.

I know. It's a bad way to go about it, but since we don't have 8-bit modes to tweak palettes in I don't see many good alternatives. As mentioned the Tint shader won't work for me but a color replacement shader would. I might look into paying someone to make one.

In the meantime, I still think it would be a handy feature. It makes things more manageable for art assets that need updating.
B
39
S
16
G
6
Posts: 542
Reputation: 7,617

Post » Fri Apr 24, 2015 3:45 pm

@Erekt I think people were refering to the set color effect rather than the tint one.

As for texture atlas, well, having the same texture being centralised in the project so it can be edited once to apply everywhere is a nice idea I think, but the current way textures are saved in c2 seems to not go well with it, but that may not be an issue in the end.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Apr 24, 2015 5:19 pm

200+ frames is still too much to put into a single object, the atlas/tile sheet would be huge, and loaded into memory all at once.
You'll have to use multiple objects loaded when needed, rather than when starting a layout.
It will hang, unless timed very efficiently. Plus we have no set way to handle that other than families, and loading via url.
Image ImageImage
B
169
S
50
G
174
Posts: 8,325
Reputation: 110,794

Post » Fri Apr 24, 2015 7:38 pm

I think you should aim to have 5 animation frames per second. Or aim to have 5 frames for any particular animation. Otherwise I suggest using Spriter. A lot of games are made in a less than 10 frames per animation constraint. Most games even when they run at 30/60fps don't actually have 30/60 frames. They often range from 3 to 12 per animation. 3 for quick animations and 12 for really smooth animations, but those smooth ones are aimed at very few objects on the screen.

Otherwise I suggest Spriter.

Now that I understand your art a little more I can see the desire to maintain a higher quality retro style. good luck. There is a colour plugin you can try. It shifts specified colours to a different range. May or may not have a range level to it to effect close colours. may be one of Podes plugins.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,028

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 26 guests