Using all of the game-icons.net icons

Get help using Construct 2

Post » Thu Oct 17, 2013 6:55 pm

Hi all,

I want to make a little, simple story creator which allows users to use any of the game-icons.net icons and create a story then share it.

But implementing all the icons (1113 for now) to the game causes some trouble. I tried to make a single object which have 1113 frames but that doesn't work (too much frames). Another option i could find is to create 1113 icon-objects but i am not sure that will work either on mobile platforms (too much objects? even if they are not on layout at the same time and created on demand in the course of game?).

Hope it was clear but i can try to explain it further if asked.

Thanks in advance.ebrar2013-10-17 18:56:06
B
14
S
4
G
3
Posts: 101
Reputation: 3,499

Post » Thu Oct 17, 2013 8:35 pm

I hadn't heard of game-icons.net, that's neat! Thanks for the information.

Implementing all 1113 icons directly into the app would not be the way to go. It'd be far too time intensive to setup and would be insanely resource heavy.

Instead, create a Sprite object to be the placeholder. Then, use the action "Load image from URL". The game-icons.net images are all powers of 2, so set the placeholder sprite's size to a power of 2 as well. (64x64 or something).

Don't set the URI directly to game-icons.net images (it's bad practice, and it also wouldn't work (their Cross-Origin Resource Sharing policy does not allow it.) Instead, re-host the images yourself and point to the URI there. Alternatively, if you're using node webkit or otherwise planning an "offline" export, add the icons as project files and have the URI simply say the name of the icon in the project files. (for example, "crossbow.png")

Here's an example that uses project files: https://www.dropbox.com/s/34pisqor3m2v1uw/ebrar.capxScavengrove2013-10-17 20:37:05
B
7
S
1
Posts: 20
Reputation: 388

Post » Sat Oct 19, 2013 10:20 pm

@Scavengrove

Thanks a lot for your answer and sorry for my late reply.

I'll try that soon.
B
14
S
4
G
3
Posts: 101
Reputation: 3,499


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests