[Feature Request] Clean Up

Discussion and feedback on Construct 2

Post » Mon Apr 08, 2013 1:02 am

I use a tool called R# in Visual Studio when I do C# code. It helps me do things like refactor my code and make it generally nice to look at.

One thing that I love on it, Find all unused assemblies and remove.

Basically if I have code that would bloat my application on compile and it is not used, it finds and removes it.

I would love to have a tool that finds all unused Sounds, Sprites, Objects and just gives me an easy list to pick and delete some.

For those who say i'm just bing lazy, I'm getting to the point where it takes me awhile to sort through it all.

This becomes pretty important when we talk about mobile downloads etc.

Thoughts?firebelly2013-04-08 01:02:42
B
30
S
10
G
7
Posts: 416
Reputation: 7,234

Post » Mon Apr 08, 2013 2:33 am

+1
B
31
S
6
G
4
Posts: 160
Reputation: 5,998

Post » Mon Apr 08, 2013 3:07 am

iirc, C2 doesn't compile empty events.

However, I agree with making it easier to sift through stuff to clear it up, especially sprites that do not exist on any layout- However, I do believe It may be a difficult glitchy thing to detect certain thing-

Say we have the sound file, "Enemy1_Hit.ogg", and a Sprite with a variable called "Name" (which would be set to "Enemy1")
Now, the sound is currently not being used in events. Now say we do a "Play sound" action, which isn't directly pointing to the "Enemy1_Hit.ogg" file, but rather [Sprite.Name & "_Hit"]. That would mean the sound would play correctly, yes; but the sound isn't directly being pointed at in the events- therefore, how would such a tool be designed to automatically "know" if the sound would be used or not when it's not directly used? Aha
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Mon Apr 08, 2013 5:08 am

So the google compiler, most likely throws warning, but it would also be nice if there was a code analysis tool for C2. "You have 24 objects with default names, is this correct?", "You have more than 20 items in a folder, consider making subfolders"
B
30
S
10
G
7
Posts: 416
Reputation: 7,234

Post » Mon Apr 08, 2013 3:11 pm

This is already on the todo list, and has been for a while. Hopefully it'll appear eventually.

C2 does include empty events BTW, because to remove them it would have to prove the condition methods have no side effects, which is difficult. (You can do things like call functions which run actions from the expression of a condition.)
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228


Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans, humanescape, Triforce and 5 guests