[Suggestion] Function Jumper

Discussion and feedback on Construct 2

Post » Tue Feb 25, 2014 7:48 pm

First of all sorry for the bad topic name not sure what to call it :D

But was thinking of another feature that could be useful, as most are aware of when using lots of function, there might be calls to these all over the place.

So a feature that could be very useful I think would be if you could right click or shift+left click a function call in your code, and jump to that function. And maybe make it so you could jump back again. Would be very useful, for me at least, I tend to expand functions over time but forget where I put them, sometimes, so it would make it a quick way to jump there. Think that would be a really nice feature.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sun Apr 20, 2014 10:51 am

Are there any chance that something like this could be added....soon :D?

When working on big projects, at least in my opinion the number one thing you really start to feel is missing in C2 is tools that help you organize you project. Even though this might not solve all of it, it would really improve coding speed for such projects.

Some other things that would also be a huge improvement, is a search functionality that goes through all event sheets and list those event sheets where there are a match.

Also the ability to drag several objects at the same time in the project window.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sun Apr 20, 2014 11:00 am

Ashley often states that suggestions should be shown to be of use to most users and not just to the person making the suggestion.

It would help to give more examples of how it would be useful.

Would it be possible to have an event sheet that just has all your functions on it and include it wherever needed? That way all functions are readily accessible.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,375
Reputation: 58,432

Post » Sun Apr 20, 2014 11:24 am

You could just place a comment above the event where the function is!

comment.jpg
You do not have the required permissions to view the files attached to this post.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Sun Apr 20, 2014 11:43 am

Yeah agree it could be useful, but already using a lot of comments. And in your case it would work. But when you have events where there might be 9-12 lines before a function call and maybe even several calls after each other which again call other functions. It start to take quite some time to track through the code. You would almost end up having more comments than code :)
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sun Apr 20, 2014 11:49 am

nimos100 wrote:Yeah agree it could be useful, but already using a lot of comments. And in your case it would work. But when you have events where there might be 9-12 lines before a function call and maybe even several calls after each other which again call other functions. It start to take quite some time to track through the code. You would almost end up having more comments than code :)


I understand where you coming from. I tell you about my pattern of working. Might help you organize things for now. Basically, I try to keep things simple. Have a look at this image.

functions.jpg
You do not have the required permissions to view the files attached to this post.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Sun Apr 20, 2014 11:52 am

zenox98 wrote:Ashley often states that suggestions should be shown to be of use to most users and not just to the person making the suggestion.

It would help to give more examples of how it would be useful.

Would it be possible to have an event sheet that just has all your functions on it and include it wherever needed? That way all functions are readily accessible.


If you take Megatronx screenshot, what you would do is simply Shift+left click "Call "CastSpell...." and C2 would go to where you have defined that function, so you wouldn't have to track it yourself through your different event sheets. Its basically just a quick search for functions. Besides making navigating a project a lot easier, it would also help make troubleshooting easier, as you can very quickly follow a path through your project and check where things might go wrong.

And as stated its mostly for big projects, in my project for instant I have 27 event sheets with 3454 events, where most are functions, but think most people that are even working on semi big projects would benefit a lot from such feature.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sun Apr 20, 2014 12:09 pm

megatronx wrote:I understand where you coming from. I tell you about my pattern of working. Might help you organize things for now. Basically, I try to keep things simple. Have a look at this image.


I fully understand what you mean and think everyone that comment there code, find ways to do it so its easier to work and keep track of things, I do that my self as well.

But in my opinion comments used in the way you do it, is only due to you not having the right tools available and therefore you do it that way, which is logic. But I think most people that uses functions, name them so from the name it self you know what it does. So normally you wouldn't need to comment a function call at all. But rather you would comment the function it self. So in my opinion it is just an area where C2 could help the users a bit better. And its not really something you would see the greatest importance of, if you were working on a small project, because they ofc are fairly easy to track.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sun Apr 20, 2014 12:29 pm

nimos100 wrote:
megatronx wrote:I understand where you coming from. I tell you about my pattern of working. Might help you organize things for now. Basically, I try to keep things simple. Have a look at this image.


I fully understand what you mean and think everyone that comment there code, find ways to do it so its easier to work and keep track of things, I do that my self as well.

But in my opinion comments used in the way you do it, is only due to you not having the right tools available and therefore you do it that way, which is logic. But I think most people that uses functions, name them so from the name it self you know what it does. So normally you wouldn't need to comment a function call at all. But rather you would comment the function it self. So in my opinion it is just an area where C2 could help the users a bit better. And its not really something you would see the greatest importance of, if you were working on a small project, because they ofc are fairly easy to track.


I agree. I work on big one too. However i would still comment due to comments being easier to read. And when I come back after some time to that particullar section is good to remind myself the logic i was following.

But yeah, that would be useful to have that "go to function" option. However my priority right now is to push "Disable collisions only between two objects". Other wise got to write whole events group with custom collisions and hope that they will work under performance stress!
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099


Return to Construct 2 General

Who is online

Users browsing this forum: jobel and 2 guests