Load Image from URL as Sprite Strip?

Discussion and feedback on Construct 2

Post » Sat Dec 22, 2012 3:35 pm

@GeometriX - that would be difficult to make events for, because the actual image files that are exported are not known until all the image processing on export finishes. It depends how they fit on to spritesheets and such.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri Dec 28, 2012 2:11 pm

[QUOTE=lemo]Also being able to apply basic transformations (crop, offset, mask?) afterwards sounds to me like a natural evolution to the "Load image from url" feature[/QUOTE]

Okay so here is a demo capx if anyone is interested in a temporary workaround for dynamic sprite animations!
SpriteAnimDemo.capx
I'm using the blend modes to create a mask around the sprite sheet, then animate it with a few events. Then anyone can use a regular "load image from url" to replace the sprite at runtime. In my case I have to work with random and unknown sizes of sheets, and you have that in the example too.
Here's a recap of the layer structure from top to bottom:

TOP LAYER
- props sprites unaffected by the mask

MASK LAYER (+ force own texture YES)
- bg sprite (+ SOURCE OUT blend mode)
- mask area

BG LAYER
- character sprite
- bg sprite

@Ashley I'm still interested in a lighter method though
Also all the masking seems to affect the overall performance a bit from what I understand.
So again, instead of a one-click "Load Image from URL as Sprite Strip" big feature, we could use just a few simple options on the sprite element to crop or offset the image at runtime (and deal with the animation ourselves)
There could be a lot of other uses to theses params :)lemo2013-02-19 06:24:20
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Fri Jun 21, 2013 3:13 pm

+1

I could imagine to use the Load image from URL along with Animation Frames of a Sprite Object. Just need an additional C2 Action implemented - Create new Animation Frame, wherein I would load my next image for the set. The new frame could just appear as last in the active animation set of the Sprite Object.
B
11
S
3
G
3
Posts: 79
Reputation: 3,343

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: neverk and 13 guests