Creating objects at run-time problem !!

Get help using Construct 2

Post » Wed Dec 25, 2013 11:28 am

Oh.. That was the problem.. Was creating it on different layer.. Haha ... My mistake...
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Wed Dec 25, 2013 11:31 am

^_^    figured as much


Great btw on that performance boost :)
Will make it playable on a lot more devices.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Dec 26, 2013 10:29 am

Hello lennaert,

Sorry to bug you again, but that crashing issue is appearing again. I have inserted all my images in the loader screen and destroying them on the 'On start of layout'. But still, my game is crashing. I have 15 images with 1920x1080p resolution. What else can I do ??
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Thu Dec 26, 2013 10:39 am

15 x 1920 x 1080 x 4 = 124416000 bytes = 124416 kilobytes = 124.4 Megabytes

and that is if they aren't transfered to a 2x2 ratio in which case it would be:

15 x 2048 x 2048 x 4 = 251.7 Megabytes

It might be a bit much loading them all at the same time.
Try putting them in a layout that isn't loaded in it's entirety or find a way to reduce the image size, would be my advice.

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Dec 26, 2013 10:51 am

They are converted to 2048X2048 sprite. Some of them are animation too (frames of page turning).

I am currently implementing what you stated above. Will tell you result soon.
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Thu Dec 26, 2013 11:04 am

[QUOTE=Raganork] Hello lennaert,

Sorry to bug you again, but that crashing issue is appearing again. I have inserted all my images in the loader screen and destroying them on the 'On start of layout'. But still, my game is crashing. I have 15 images with 1920x1080p resolution. What else can I do ??[/QUOTE]


Make a sepperte layout, called objectslayout, and place all your images there.

And dont destroy them.


The objectslayout never gets adressed, its just a container/placeholder for your images. Dont destroy them.

Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Dec 26, 2013 11:19 am

Hello again. Well, at least game is not crashing now. I made a separate layout and dumped all images there. But now the game is running very slow. Slow in the mean of operation. Timing things (like wait for x seconds). runs all right.. What now ??
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Thu Dec 26, 2013 11:27 am

I haven't seen your pictures, but I cant help but wonder why they have to be this big.

I can imagine big parts of the sprite during the page turning animations stay the same. So probably it would be possible to optimize those.

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Dec 26, 2013 11:32 am

@LittleStain: My game is more image based. So there are many images in the game. This is my first HTML5 project and the client demanded the game images to be 1080p. About the page flip animation. there are only 15 images for page turning.
B
6
S
2
G
1
Posts: 77
Reputation: 708

Post » Thu Dec 26, 2013 11:43 am

When clients demand things that cant be created in the way they like it you should show them alternatives that do work.

Probably you could make the game run better by optimizeng the images without the client even noticing the images aren't 1080p. The game will be 1080p and all effects will happen at 1080p, but there's no need for every single sprite to be 1080p.

(btw: you are talking about a client, so I guess you have either a personal or business license? I ask because I thought owners of a license had the medal on their avatar)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests