Scirra cog

About Us

We're a London based startup that develops Construct 2, software that lets you make your own computer games!

Archives

Browse all our blog posts

Latest Blog Entries

We love brains!

Join us! Joiiinnn ussss! Mooooree brains!

Finding in Construct 3 projects

by Ashley | 13th, February 2017

Construct 2 users often design very large projects. When things start to get complex, it can be hard to answer questions like "where is this object used?" or "can I delete this?". So for Construct 3 we redesigned some features, and added some new ones too. Here's an overview of the new tools we're providing to review your projects and help make sense of them.

Improved event search

Searching events in Construct 2 was fairly basic: it essentially filtered events down to those matching the search term. This wasn't always the clearest way of presenting matches. To improve this, we've redesigned the event search feature. First of all there are new options such as the ability to search through the whole project, and match case.

Event search options in Construct 3

Once you run the search, the results are displayed in a separate Find Results list. This is another bar which you can dock to the interface, like the Project Bar or Layers Bar. This lists all the matching results with highlighting and information about the location of the match. It will also list results from the entire project if you so chose.

Event search results in Construct 3
Event search results in Construct 3. Click to expand.

The search results update automatically if you delete content from the project. Alternatively later on you can manually redo the search to update the results. Note the events themselves aren't filtered, so you can see everything in its original context.

Searching for text in an event sheet is a quick and easy, and as you can see also returns results from comments, event groups and expressions. However this is not always particularly helpful. For example you may want to look for an object name, but get a lot of results in comments, or unrelated strings in expressions. Worse, you may find that searching for an object name still matches other object names. For example if you search for Sprite, you still get results for Sprite2 because that name also includes the search term Sprite.

Event search results for the term 'Sprite' in Construct 3
These results show a mix of 'Sprite' and 'Sprite2'.

It is awkward to pick through results like these. To solve this problem, we designed a new feature.

Find All References

There is a new type of search you can do: Find all references. This finds the list of references to a given object, object behavior, instance variable, plugin or behavior. It covers the entire project, and the results are precise: if you Find all references for the object "Sprite", you get only references to that specific object.

The 'Find all references' menu option in Construct 3

Even if the term "Sprite" appears in event groups, comments, other object names, or anywhere else, Construct 3 knows that's not a match. Internally, this uses a redesigned architecture to identify references to elements of the project. For example Construct 3 can distinguish between the text "Sprite" in the string "Click this sprite", an unrelated reference in the expression Sprite2.X, and an actual object reference in the expression Sprite.X.

In the returned list, every single result is a reference to the actual object that was searched for. There are no unrelated matches like there were with text search.

Find references results in Construct 3

This is invaluable for quickly reviewing projects and finding where an object is used.

You might also have spotted that Find all references also returns results from layouts. The top result indicates there is 1 instance of Sprite on Layout 1. This helps you find where instances are actually used across layouts as well. When you double-click a layout result, the layout opens, selects those instances, and scrolls and zooms the viewport to fit them all in the window. For example here's what happens when you double-click the layout result when doing 'Find all references' on the monster sprite from the Ghost Shooter tutorial:

Layout results with 'Find all references' in Construct 3

Notice how the Layout View fits all the monsters in the window. If the objects were used on a different layout, there would be a second layout result in the list. This makes it incredibly easy to skip between layouts and get a quick overview of everywhere an object is used.

Other kinds of search

Find all references can also:

  • Search by object behavior, returning a list of results to a specific behavior (e.g. everything referencing the player's Platform behavior)
  • Search by instance variable, returning a list of events that reference a specific instance variable (e.g. everything referencing the Monster health instance variable)
  • Return a list of which families an object belongs to
  • Search by an entire plugin or behavior, for example finding all references of the Tiled Background plugin

Searching for an entire plugin or behavior can be done from a new dialog which lists all the addons used by a project, and which object types use them:

Viewing addons used by a project in Construct 3

This makes it easy to see which plugins, behaviors and effects you've used in a project. The results also list every object in the project using that plugin. Secondly you can quickly identify unused plugins with no references and delete them.

Conclusion

The improved event search and the new Find all references search are designed to make it very easy to review projects. It's also an incredibly useful tool for quickly looking around someone else's project, identifying how and where they have used things. The results of Find all references are precise enough that you can be confident that the results are comprehensive, that every result matters, and nothing else has been included by accident. Reviewing across layouts also helps remind you what you've placed, and where. This helps you answer questions like "where is this object used?" quickly, easily and with confidence.

Catch-up

Missed our earlier announcements? Here's a list of all the news about Construct 3 so far:

Promotional footer image for Construct 3
Now follow us and share this

Tags:

Comments

4
mltreadway 6,214 rep

You guys are Awesome!👍

Monday, February 13, 2017 at 12:52:51 PM
1
XpMonster 14.3k rep

Scirra cares for our time.
And time is money so I think 100$ is a little price to pay for a year of awesome engine which saves our time and nerves with it.

Monday, February 13, 2017 at 12:53:50 PM
4
hmmg 7,064 rep

this would be very useful , I had this kind of problem to collapse and expand all my folders to find an object :'(

Monday, February 13, 2017 at 12:53:52 PM
8
chadorireborn 59.9k rep

Finally. It was a pain searching in C2.

Monday, February 13, 2017 at 12:54:16 PM
4
KENYONB 2,115 rep

Nice enhancements! 👏

Monday, February 13, 2017 at 12:57:07 PM
5
mnashwan 816 rep

find and replace ?!

Monday, February 13, 2017 at 1:03:03 PM
3
glerikud 20.7k rep

I can see this will help out a lot of developers. Also this was a feature requested by many. Great work Scirra. :) Thank you.

Monday, February 13, 2017 at 1:04:43 PM
3
Psychokiller1888 4,490 rep

Good stuff!

Monday, February 13, 2017 at 1:05:02 PM
2
rozpustelnik 5,546 rep

I like what I see :) Great feature! Keep'em coming :)

Monday, February 13, 2017 at 1:08:46 PM
2
amarcelo 5,184 rep

Another great feature!!! Wainting more news!!!

Monday, February 13, 2017 at 1:10:02 PM
2
ALLMarkMade 7,411 rep

Yes that is a great feature.

Monday, February 13, 2017 at 1:14:12 PM
1
abdalghani 8,545 rep

Go on we are waiting for more

Monday, February 13, 2017 at 1:18:48 PM
0
Soluna Software 5,131 rep

Take my money! 😊

Monday, February 13, 2017 at 1:19:01 PM
2
MassimoF 2,036 rep

YESSSS! this is One of the my most needed features. Great!

Monday, February 13, 2017 at 1:27:18 PM
3
Draconiz717 807 rep

Awesome feature guys! I was thinking, I don´t know if you guys will agree with me, but a great feature would be if we could change de color of the boxes in the event sheet, so we can organize our logic with this colours, what do you guys think?

Monday, February 13, 2017 at 1:30:49 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.