Html5 Games on Apple Products

Get help using Construct 2

Post » Thu Aug 11, 2016 4:53 pm

Hello,

this is not my first question about the compability of apple products and html5 games (but i didnt get an answer for my previous questions :) Hopefully this will). Basically i want to know if someone got some experience with my problem. All Apple devices cant run the project, iam running dircetly from a server. And i cant understand why..... could it be an problem of construct? IOS or another issue? Ive read a lot of differend articles with informations about incompatibility of apple devices with html5 games.

If i run some html5 projects from the internet, the most of them works - others not (its not a constant issue).


So i dont know how to solve this...or if there is a solution for this problem.

Could someone tell me if there is probably something wrong with my construct project or if it is a general IOS problem?


Thank you very much! And best regards!
B
8
S
2
Posts: 141
Reputation: 1,000

Post » Thu Aug 11, 2016 7:15 pm

Note: Ive a image memory usage of 400 mb!!! how is this possible if i dont have so many images on my layout? Are they all loaded at once?
B
8
S
2
Posts: 141
Reputation: 1,000

Post » Thu Aug 11, 2016 7:34 pm

Congrats2u wrote:Note: Ive a image memory usage of 400 mb!!! how is this possible if i dont have so many images on my layout? Are they all loaded at once?


How big are your images?

Remember that all images are converted to bitmap in RAM, regardless of what the original encoding was.

So for instance, if you have a large background image of 8000x1000 png then when loaded into RAM it would use approx

8000x1000x4 which would be 32MB just for that one background image.

Some GPUs insist on power of 2 images so that would increase the previous image use quite a bit.

i.e. 8192x1024x4 = 33.5MB.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Fri Aug 12, 2016 9:28 am

@zenox98

Thank you for your reply. Is there a possability to calculate everything down? maybe a source rescale or something? Or do i have to remake all files - which would be a lot of work - only to get it to run on apple devices. My background Images are 2048x2048px. And i filled a stage of 11800x660 (because of windows size 1180x660) with 24 pieces. I know its a large stage but for desktop and android devices this would be no problem.

I deleted some graphics and the most apple devices can run the game with a graphic memory usage of 160mb.

So iam a little bit nervous if i can fix this for mobile (or more specific apple) devices. If i scale down the background images to 1024x1024px, the most apple devices can load the project - but i would have to rescale and fit all of my ingame objects too.

So can somebody help me out? Is there a chance to scale the game proportional down and decrease the graphic memory usage?

Any ideas would be awesome

Thank your very much!
B
8
S
2
Posts: 141
Reputation: 1,000

Post » Fri Aug 12, 2016 9:34 am

Read the memory usage tips manual article and apply everything that is said there.
Make sure that you import images in the game that are at the appropriate size and not resize them only in the editor.
There is no bulk "resize" button, because you should not need it in the first place.

So yes, unfortunately you will have to resize your images first and import them again in the project.

And no, this is not an appropriate way to go for desktop or Android either.

Always pay attention to your memory usage and keep your image close to the size you really need.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,319
Reputation: 87,487

Post » Fri Aug 12, 2016 9:50 am

@Kyatric

Would it be possible to load and destroy all background images that are not visible on the screen (like occlusion culling?). Maybe i could check the position of my current screen and delete all files which are not nearby to my current background tile. And reload all tiles which are "neighbours" of my current tile...........

My scene is filled with 4x6 tiles each of them has a size of 2048x2048. Could this be a solution? And do i have to clean the gpu memory - or better is this possible to call a function which clears the gpu memory?

Thank you very much
Last edited by Congrats2u on Fri Aug 12, 2016 12:12 pm, edited 1 time in total.
B
8
S
2
Posts: 141
Reputation: 1,000

Post » Fri Aug 12, 2016 11:15 am

See remember not to waste your memory.

400mb should be OK on modern iOS devices. C2 games should generally work fine on iOS, there are no major known incompatibilities. The most common mistake is forgetting to upload some of the files so it fails to load.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,250


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests