Unused plugins on a exported project

Discussion and feedback on Construct 2

Post » Sun Jul 29, 2012 12:46 pm

Hi Ashley

I am currently working on a template project, building those annoying parts of making a game (sound events, alert dialogs, menus...) one-time only, so I can focus on the fun part later!

I noticed that, when exporting a project, a plugin (i.e. Keyboard) without any mentions in the event sheet will still be present in the exported c2runtime.js

I'm wondering about the disadvantages of having them there. Will it slow down the game in a noticeable way? Would it be useful if we had an automatic way of removing those objects?

This is currently not a problem for me because I'll be removing any stuff I won't need from my projects at the start. However, if I wanted to make a cross-platform game, I would love to simply comment the Keyboard or Touch conditions in the Event Sheet and not have their respective plugins in the exported version.

Thanks in advance!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Sun Jul 29, 2012 6:05 pm

There is not much advantage to removing them. For example the Keyboard object will not have any performance impact on a touch device, and the Touch object will not have any performance impact on a desktop computer. It will add about 10kb to the exported javascript, but that's not a big deal.

I do not think unused plugins should be automatically removed, because it's conceivable a third party plugin could do something useful after simply being added to a project. In this case if C2 automatically removed the plugin it would stop the plugin from doing its work as well. So if you want to remove a plugin from your project, just make sure it's deleted from the project bar.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Mon Jul 30, 2012 9:37 am

Great, if there's no impact in the performance, there's really no need to remove them. Thanks Ashley!
B
107
S
40
G
10
Posts: 456
Reputation: 13,202


Return to Construct 2 General

Who is online

Users browsing this forum: BBaller1337 and 15 guests