[HELP] Loads Multiple Files or Single Picture File?

For questions about using Classic.

Post » Thu Sep 30, 2010 1:48 pm

About Sprites, can i load a single picture file which contains multiple sprite images (mapped) on it, for example:



Or do i have to split the single file into multiple picture files?
B
2
G
2
Posts: 8
Reputation: 666

Post » Thu Sep 30, 2010 2:49 pm

You can split images using the import frames option by right clicking the area where the animation frames are under the list of animations.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Thu Sep 30, 2010 3:27 pm

Same question here.
It is possible to load animation from image with multiple images in grid, but i'm experiencing problems with alpha-channel (tried png, gif) - the animation frames are squares with white background instead of alpha.

Added:
Yes you can!
[url:2bqa4qi2]http://www.scirra.com/forum/viewtopic.php?f=3&t=7400[/url:2bqa4qi2]
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Thu Sep 30, 2010 8:03 pm

[quote="NugMan":3qt5b4nd]Same question here.
It is possible to load animation from image with multiple images in grid, but i'm experiencing problems with alpha-channel (tried png, gif) - the animation frames are squares with white background instead of alpha.

Added:
Yes you can!
[url:3qt5b4nd]http://www.scirra.com/forum/viewtopic.php?f=3&t=7400[/url:3qt5b4nd][/quote:3qt5b4nd]

Once you get the right file type sorted I'd really suggest using Arima's suggestion.
Loading an external animation via the image manipulator is quite an undertaking, as it requires you to skip a tick, and then load the frame.
Not to mention the crop feature is a bit buggy, and there's no way to set the background to alpha.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Sat Oct 02, 2010 9:24 pm

I have nor ticks skip in my cap, neither i'm encountering alpha-problems (at the moment using PNG24 (GIF also will do) instead of indexed and bad supported PNG8). I have character with 4 animations 4 frames each.

But, I'm working with pixel art, so every single frame is 48x48 px. 96x48 in some places.

Here's how i do it in the game i'm working on now (just for proof of concept)

There are 3 loops, by anim name, angle and frame. "Character" is a family of objects.

And here are the functions for converting anim number to name
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Sun Oct 03, 2010 7:10 am

[quote="Arima":1z3x8502]You can split images using the import frames option by right clicking the area where the animation frames are under the list of animations.[/quote:1z3x8502]

Thanks for the information given, i'll try it!
B
2
G
2
Posts: 8
Reputation: 666

Post » Mon Oct 04, 2010 2:09 pm

[quote="newt":3h08m78d]and there's no way to set the background to alpha.[/quote:3h08m78d]
You can use images with alpha defined alreay, like png24, gif.
B
19
S
6
G
4
Posts: 171
Reputation: 2,507

Post » Mon Oct 04, 2010 4:07 pm

Yes, as I recall the image manipulator will usually set the background to 0 opacity... if the background is well defined.
Problem is that not everyone's graphics card is the greatest, and importing this way can leave artifacts.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Mon Oct 04, 2010 5:12 pm

[quote="newt":wbjzv0gc]Problem is that not everyone's graphics card is the greatest, and importing this way can leave artifacts.[/quote:wbjzv0gc]
This is the aspect i've missed. anyway if i'll get positive feedback on this problem after release i'll rewrite some parts. Thanks for advice.
B
19
S
6
G
4
Posts: 171
Reputation: 2,507


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests