Feature request C2/C3: Texture atlases in editor

Discussion and feedback on Construct 2

Post » Sat Apr 25, 2015 11:11 am

If you make the part to be colored a separate object overlaid on top, then you can tint it without affecting the rest of the object.
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Sat Apr 25, 2015 3:11 pm

newt wrote: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.

Checking the package.nw I see I get 75-100 frames squeezed into each 512x512 sprite sheet atm, depending on the animation and base sprite size. That's three 512x512 png's per playable character object. Only one or two of those objects in circulation during runtime so even weak computers shouldn't get stressed out by it. Unless I'm missing something that is. Has been known to happen :P

jayderyu wrote: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.

Ah my animations actually do range from 3 to 12 frames depending on the action, for instance 12 for walk/run cycles and 5 for jumps. It's just I have a lot of animations :P

Spriter is a cool approach, I remember seeing big enemy dudes being animated that way in various Castlevanias to save on memory. But not sure how well it would work for smaller sprites. I've also gotten real comfortable animating in blender and rotoscoping the renders. It turned out to be a good method to produce good looking animations fast so I'll stick with that for now.

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.

Really? I'll check that out if I can find it, thanks for the tip!

Thanks for the suggestions everybody :)

EDIT:
Just found this on the OpenGL page. Super-simple, might be just what I need :) I'll see if I can figure out how to implement it as a plugin.

Code: Select all
//Fragment shader
#version 110
uniform sampler2D ColorTable;     //256 x 1 pixels
uniform sampler2D MyIndexTexture;
varying vec2 TexCoord0;
 
void main()
{
  //What color do we want to index?
  vec4 myindex = texture2D(MyIndexTexture, TexCoord0);
  //Do a dependency texture read
  vec4 texel = texture2D(ColorTable, myindex.xy);
  gl_FragColor = texel;   //Output the color
}
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Sat Apr 25, 2015 3:36 pm

Its all about the total memory. If you can keep that under control then should be fine.
Also Podes plugin uses a html5 canvas, or css feature so I don't think it will work under webgl.
So basically no gpu acceleration for objects that use it.
Image ImageImage
B
171
S
50
G
180
Posts: 8,396
Reputation: 113,986

Post » Sat Apr 25, 2015 7:58 pm

Yeah I saw it also functions as a color overlay so I couldn't use it anyway.

In the meantime I discovered the ReplaceColor plugin in the C2 effect list. No idea how I missed it but it does exactly what I need. Absolutely lovely stuff!

Only, there's a small problem with it that I suspect is to do with where in the render effect chain it's being applied. Is there any way to control in what order effects get rendered? Probably not, but thought I'd ask.
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Sat Apr 25, 2015 8:47 pm

Its usually top down by layer, but I think that can vary by blending mode. Ashley was grumbling about it some time ago on Twitter.
Image ImageImage
B
171
S
50
G
180
Posts: 8,396
Reputation: 113,986

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Laura_D and 5 guests