Ludei's answers to your questions

Discussion and feedback on Construct 2

Post » Wed Apr 02, 2014 8:46 pm

"Memory management
This one was interesting. Apparently C2 is the only engine they have trouble with in this manner, and they have quite a few problems with the C2 implementation of memory management. They are convinced that C2 is doing this wrong, and making it difficult for them to do anything. Nevertheless, they did say that they had some workarounds in the works."

I just wanted to address this. As to why this is so.

The standard form of memory management is to just release any reference to a variable. This allows for JS engine to garbage collect and clear out the memory. However by letting an automated GC run often produces the in game stutter effect; as often GC is done in batches. To get around stuttering and to better efficient memory use to reduce slow down from memory allocation or deallocation; Ashley implemente a custom objects holder. That way when an object isn't needed any more it sits in back for when it's needed again. Thus no slow down for destroying and creating new objects. The GC is avoided and performance remains pretty steady. An element you wouldn't get if we used auto GC. If you wanted steady performance you would as the developer(not C2/Ashley) would need pre-allocate all your objects and never destroy them during the course of the level and manage them yourself.... more annoying than you want to really delve into.

Ok. So Ashley implemented an advanced memory manager. However the memory manager requires JS selected memory deallocation commands like "delete". This is because most of C2 plugins run on prototype objects and delete is better fore removing them. So let's see what they do in the next while.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

Post » Wed Apr 02, 2014 9:01 pm

Hmm ... Come to think of it ... I was looking in my intel XDK to learn a bit more of what comes out when I published my (almost finished) game and I came across (while checking the C2 js file that it gave me 800+ "errors" (which I'm certain they were warnings) about a __proto__ property being deprecated... which rose a few flags for me but since the thing is working fine I'm not giving it much thought.

Is it something I should be worried about at all? It's probably because of when C2 was made and how it was made since scripts are being replaced with faster "better" scripts all the time maybe there's some catching up still pending.

That aside... I'm still torn between using crosswalk and cocoonjs ... I've solved some issues pertaining my game's performance however I would like to put adds and leader-boards and basically use the social stuff too... as much as crosswalk publishing is giving me awesome performance Ludei's option opens up the door for me to get all the social stuff working(to a point)

I'm between a cocoon and a crosswalk (OK that's a really lame joke). I'm waiting to see if they get their plugin updated too I haven't seen any news on that so far.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,796

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests