Is c2runtime.js is different for each project?

Discussion and feedback on Construct 2

Post » Thu Mar 17, 2016 8:53 am

Hi,
Can anybody please clarify that is c2runtime.js is same or different for each project.
The idea is that if c2runtime is same for all project, then we can put it into a common folder and all project take this js from that folder.
This is to reduce the size of the project.
Also which files are common in any exported html5 project (like jquery-2.1.1.min)?

Thanks
B
10
S
2
Posts: 20
Reputation: 694

Post » Thu Mar 17, 2016 1:46 pm

size doesn't really matter (except for the apk size, but nothing else).

it's not the same for each project, but it can be.
why? when you add to an object for example - behaviour "bullet" and "turret" - you get 20 lines of code in c2runtime, 10lines for each.
in other project you have bullet and no turret behaviours - you are spared 10 lines of code.
therefore you save.. well.. big massive max 1KB :)
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Thu Mar 17, 2016 1:58 pm

It's different for every project, because only the plugins, behaviors and effects that your project actually uses are compiled in. This means it can be a pretty small script for small projects.
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Thu Apr 21, 2016 11:51 am

Thank you for your reply. My follow-up question is that if let say 10 projects are using the same number of plugins, behaviours and effects; shouldn't be a good idea that they are compiled separately as a common file and a separate additional file for non-common objects (objects that changes per task).
B
10
S
2
Posts: 20
Reputation: 694


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests