Ejecta Thread

Discussion and feedback on Construct 2

Post » Thu Oct 10, 2013 3:46 am

@0plus1 sorry, I'm still relatively new to C2. How do I add in those line of codes?

@szymek Cool. Thanks for the info, will check it out.

@juantar Mine is still good for another 6 months and I have only released one game so far (paid someone for the programming). So might as well try to make the most out of it :D

B
11
S
4
G
1
Posts: 27
Reputation: 1,706

Post » Thu Oct 10, 2013 4:01 pm

[QUOTE=flipboxgames] @0plus1

1. Do you suffer from any performance loss each time you exit to iOS main menu and back again into your game? (without quitting the game itself). For mine I noticed it wasn't as smooth as when I first launch the game.

[/QUOTE]

I have it too at my end, but only with the beta version: if i use the last stable one, the pb is not here at all, and everything works well.
Maybe try to use the stable version if it was not already the case. Otherwise i don't know, maybe try "webgl" off.
B
11
S
6
G
2
Posts: 105
Reputation: 3,910

Post » Fri Oct 11, 2013 12:39 am

@goldentreee That's an interesting issue I'll play with this and see what's the issue.

@flipboxgames in the index.js file
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Sat Oct 12, 2013 11:35 pm

@0+1:
I don't know if I can ask you that, cause I don't really understand how far you can go in the work with Ejecta, and i'm far away to be a programmer, but do you think we can expect to have someday the memory manager (the layout by lauoyt loading) working on Ejecta ? It would be incredible, but I suppose it's linked to the improvements in webgl of Ejecta.goldentreee2013-10-12 23:36:06
B
11
S
6
G
2
Posts: 105
Reputation: 3,910

Post » Tue Oct 15, 2013 4:18 am

@goldentreee what you are asking is a very big issue, I'll try to explain why in the easiest possible terms. Please @Ashley correct me if I'm wrong.

Let's start by saying that one of the biggest issue in Javascript is the lack of an explicit memory manager (there are project that aim to fix this) so everything relies on the browser. Modern browser have complex mechanisms to manage memory.

BOTH in webGL and canvas, construct requests the sprite images at startup (when the loading bar is on), at that point a browser makes note and says ok let me manage it, in the case of Ejecta (same goes for cocoonJS) instead those sprites get loaded as textures into memory right from the start! This produces a huge memory spike and with lots of sprites it can end up in the app closing (iOS has a memory manager that halts applications that perceives are hogging system resources and memory spikes are one of the triggers for halting).

Currently Ejecta doesn't have any explicit (or implicit) method to free a texture from memory (see here https://github.com/phoboslab/Ejecta/issues/166) this means that you have to be extremely careful with what you are loading into memory (see here: https://www.scirra.com/blog/112/remember-not-to-waste-your-memory).

As far as webGL goes the issue is still there, Ejecta apparently supports layout by layout loading, but since the images are decompressed into memory at startup is completely useless.
What Scirra could add is a concept of Atlases of images that get explicitly loaded at a certain point (with an action), you can do it right now by using the request from URL action on empty sprites, requesting a local image, I did that in my iOS game for loading of larger images, just know that there is a slight delay.

I hope I've been clear and precise.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Tue Oct 15, 2013 3:58 pm

Thanks for your answer, it was very clear. :)
B
11
S
6
G
2
Posts: 105
Reputation: 3,910

Post » Wed Oct 16, 2013 3:53 am

@0+1:
I know it starts to be off the topic, so i will not be long, but i tried to use the URL request in empty sprites and it works very well to load an image (with effectively a slight delay), but it stays in the ram of the project once it's loaded (well, at least i din't find how to clear it from the ram if it's possible), so it's not exactly like a layout by layout loading, but it can be nice to reduce the time of the 1st loading for example.
B
11
S
6
G
2
Posts: 105
Reputation: 3,910

Post » Wed Oct 16, 2013 11:40 am

@goldentreee it won't unload from ram that's the issue.
There is no memory management in Ejecta (same goes for cocoonJS) so once loaded the image stays in the ram pretty much forever. In theory you could try to load a transparent png of 1x1 pixel on the same sprite, that should pretty much unload the texture, but I never tested this so it's a shot in the dark.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

Post » Fri Oct 18, 2013 9:48 am

@0plus1

Not sure if this is off-topic or against Scirra forum rules but do you think you could share with us the name of the games you have submitted to the AppStore that was compiled using Ejecta?

The reason I asked this is because I would like to see how well a game can run on an old phone like the iPhone 4.

When I compiled my game, it runs well on iPhone 5 but terribly on the iPhone 4, to the point that it's beyond playable. (below 30 FPS)

Personally, I would prefer to make web versions of my game using Construct 2 while using a proper programming language for developing on mobile platforms (which I'm learning) but that takes time. I'm hoping to just get something up that's playable on at least an iPhone 4. Currently my Apple dev is active but doing nothing *ouch*
B
11
S
4
G
1
Posts: 27
Reputation: 1,706

Post » Sat Oct 19, 2013 9:59 am

@flipboxgames it's not against the rules. Here's my game: https://itunes.apple.com/us/app/pigs-in-the-oven/id549867465?mt=8

It runs fine enough (around 30fps), I test on the iPhone4 as well, it's the worst iPhone performance wise since they added the retina screen without increasing the processor power, I also have a 3gs and I get consistently 15fps more than the iPhone4. You have to be incredibly careful on iOS, even if Ejecta is the fastest wrapper currently (way more fast than cocoon) it's still limited, especially since Construct is not optimised for Ejecta.
B
29
S
9
G
6
Posts: 525
Reputation: 8,294

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, artbava, Bleenx and 6 guests