How to load external images as sprites?

For questions about using Classic.

Post » Sat May 26, 2012 10:48 pm

I apoligise that this is probably a dumb question, but I'm having a hard time finding answers and using the search function very well :/

...BUT, yes, is there a way to load external images NOT INTO THE ACTUAL APPLICATION but externally from a folder at runtime? Would it be similar to a sprite, whereas I could position the hotspot and multiple action points?
Thanks in advance, guys and gals ^.^
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Sun May 27, 2012 4:31 pm

In the srpite object,there is a funticon 'load external images from file'.
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Tue May 29, 2012 1:28 am

Awesome, thanks! Now how would I go about making animations using this method? Hotspots? :)
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Fri Jun 21, 2013 12:19 pm

Bump

Hello I'll use your asking to include my concern too: To use a Sprite for animation, I have to have an Animation Set, and Animation Frames of course. I couldn't find a possibility to create the Animation Set as an Action, and to add some Animation Frames to it during the same Event (just before the next Action "Load Image from URL").

Is it possible to make an animation by using Load Image from URL??
What if a Sprite does not have any Animation Frames yet??

Cheers
B
11
S
3
G
3
Posts: 79
Reputation: 3,343

Post » Fri Jun 21, 2013 6:30 pm

@XManBG Are you using Construct 2? If so then you'll need to load your Sprite images from a web server, or look for a plugin to load files from the disk sadly
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Fri Jun 21, 2013 7:56 pm

Yes, I'm using C2 and working on a server. My pictures are located relatively to the project folder. My point is about an option in C2 to Create new animation frames from the event sheet. Because for now, I have to pre-create the needed animation frames and then fill them with the "Load image from URL" event. This is of course possible for small projects with known and limited number of frames, but not for a bit bigger game project, where I still have to manually change and reload all the Sprites.

EDIT: I see now, that I've landed in the Construct Classic part of the forum... it's a bit confusing with the search option of the forum, which delivers both, mixed results for C2 and Construct Classic.XManBG2013-06-21 21:02:28
B
11
S
3
G
3
Posts: 79
Reputation: 3,343

Post » Sat Jun 22, 2013 1:43 pm

@XManBG Ah yeah, I see what you mean. In CC it was also a problem of needing to pre-create the frames sadly.

However, I think I remember reading that in C2 the program recognizes duplicate frames and stores only one, so you might be able to use less VRAM by storing blank frames of 2^ textures( eg: 256x256, maybe 512x512's won't hurt performance too bad), and then it loads that frame once to fill all the animation.

I'm not entirely sure that will benefit you as I've never tried it, but hopefully it does
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Wed Aug 07, 2013 9:22 am

Yes ,there is a way to load external images NOT INTO THE ACTUAL APPLICATION but externally from a folder at runtime.you can refer to follow method:
public static REDocument OpenDocumentFile(string filePath);
public static REDocument OpenDocumentFile(string filePath, BaseDecoder dec);
public static REImage OpenImageFile(string filePath);
public static REImage OpenImageFile(string filePath, BaseDecoder dec);http://www.rasteredge.com/how-to/csharp-imaging/load-from-file/
B
1
Posts: 2
Reputation: 129

Post » Wed Aug 07, 2013 12:29 pm

@Abigail, sorry but Construct 2 and Construct Classic do not work with C# so neither would support that, thanks for sharing the C# method anyway though Jayjay2013-08-07 12:30:15
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests