Feature Request: The next best thing to coding...

Discussion and feedback on Construct 2

Post » Mon Nov 30, 2015 7:56 pm

Hey everyone. Jeremy here.

I had an idea and I wanted to run it by you. Now I know the odds of ever getting a code editor in C2 or C3 are slim but what I think would be a better alternative is this.

The option to type out your events and actions versus double clicking. NOW, I know what you may immediately say; "why isn't that a waste when I can just click?" Yes and no.

For those who really like to type and program, we need that fix. I have a fixation with typing code. We need the feeling of typing to solve problems instantly, it's more gratifying. So, I am wondering if this is possible. Imagine this:

Blank event -> Hit 'Enter' on the event and it turns into a textbox (just like a comment box would look like). From there you enter the code needed to call the event. So, you would type in something like this.

Code: Select all
everyTick();


Once you hit enter it would look like the code block we are used to

System | Every Tick

I am completely serious with this because too many times I have felt tempted to go type out code elsewhere and always wound up back with Construct 2. Now, the reason I always wind up is because I love it's simplicity. I love it's events and although I love having the click everything option, I think having this option would soothe the need for coding all together.

This was just an idea to put out there to gage how everyone else feels!

Thanks for listening!
Ever feel like you can't finish the game you are working on? It's time for a game plan, it's time to discover game design.

http://www.discovergamedesign.com



Check out my other courses:

https://www.jerementor.com
B
63
S
16
G
5
Posts: 58
Reputation: 6,481

Post » Mon Nov 30, 2015 8:22 pm

The problem is getting a good function name from all the actions and conditions, since they are mostly just sentences and there isn't any real consistency. I guess the function names from the runtime could be used, but I imagine some plugins could have some names completely different from the action/condition. Construct Classic allowed python scripting which allowed you to do this to an extent, but you couldn't do the same thing as with events.

Beyond that point the idea of a typed scripting version of events was proposed before and one argument against it was needing to deal with the syntax and typos of such a language, which is a task in and of itself. Kind of a different beast to what C2 does already.

You could unofficially do this already though, by generating event xml files. But it is a lot of work as I see it.
It has the same issue as trying to convert a capx file to say c++ source code: It's simple on a very small scale, but to support everything, fix bugs and support changes as C2 updates it becomes a ridiculous task.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Mon Nov 30, 2015 8:28 pm

@R0J0hound that makes sense. I understand on a massive scale it's a huge ordeal but I really meant it just for the already existing C2 events and actions. Even if everything had to prefixed with CL (Construct Language) cl_everytick(); so it would define the function names... Also, if you had an object called obj_Player then it would access what is already there obj_Player.Platform.Speed = etc. etc.
Ever feel like you can't finish the game you are working on? It's time for a game plan, it's time to discover game design.

http://www.discovergamedesign.com



Check out my other courses:

https://www.jerementor.com
B
63
S
16
G
5
Posts: 58
Reputation: 6,481

Post » Mon Nov 30, 2015 8:31 pm

It's never going to happen with C2.

Whether it will be a possibility with C3 is still unknown.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,374
Reputation: 58,430

Post » Tue Dec 01, 2015 12:46 am

Would be nice though. I may look into seeing if people would want to collaborate into making it a viable plugin of sorts. It is a big idea, but if implemented - it could really benefit those who are more suited for typing code!
Ever feel like you can't finish the game you are working on? It's time for a game plan, it's time to discover game design.

http://www.discovergamedesign.com



Check out my other courses:

https://www.jerementor.com
B
63
S
16
G
5
Posts: 58
Reputation: 6,481

Post » Tue Dec 01, 2015 1:34 am

What you are asking here is a custom programming language specific to Construct ACE architecture, which I don't think it will ever going to happen because it's kind of defies the idea of what Construct is. You know, that "No Programming Required" thing.

That said. I really miss the "copy events to text" feature from CC and will really like to see it working both ways in C3. Where you could select bunch of events, hit ctrl+c and paste it in text editor, and also opposite of that, where you write some text and after pasting it into C2 event sheet, the editor will automatically create events for you - then probably what you are asking for could work as well.
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,597
Reputation: 34,821

Post » Tue Dec 01, 2015 3:36 am

I had a similar idea sometime ago and was going to propose it sometime soon. My insight was to just develop a way to pick events by typing instead of creating a full-blown new script system. Kind of an hybrid.

Streamlined lists could serve the purpose to expose all possible events and aid discoverability, while an alternative typed method could serve experienced users to gain production speed.

I discovered a fuzzy matching algorithm that seems to work very well and is very forgiving with typos. It can be used to match the display text of events, so it remains familiar to current users and doesn't require a new script system. I made a rough interactive mockup as a proof of concept that you can try below:

Autocomplete Proof 01

1 - Type the object name (can be very fuzzy like "sp3" for Sprite 3)
2 - Press ENTER or RIGHT ARROW to commit and go to next field
3 - Type the condition (skipping vowels or typing just the beginning of words still works very well *)
- BACKSPACE to clean the field (press again to go back one level)
- LEFT ARROW and RIGHT ARROW navigate fields

*you can also continue to type/repeat parts of a new word until it converges to it


Now this is just a bare bones of what it could be, but it all revolves around a fuzzy matching system and the limitation to only pick existing events (there's no way to get syntax error due to mistyping). Ideally after picking the condition it should be able to navigate the condition fields using the arrow keys to type numbers, strings or objects. By pressing DOWN a flying list could appear bellow with the top 5 alternative matches, where you could switch by pressing UP or DOWN, then press ENTER, RIGHT ARROW, or go all way up to make the list disappear.

I used the final condition text in the mockup, but probably a way better alternative would be to first match the condition name (like it appears on current lists), and on pressing ENTER or RIGHT ARROW switch to the final condition text (e.g. "Compare X" => ENTER => "X = 0"). It's possible to leave it open to match both the condition name or the final condition text, but that probably may give some unexpected results sometimes (maybe not).

This fuzzy match system could very well be used to match objects, functions, variables, and all types of linked references in all kind of dialogs. Even for auto-casting similar conditions when an object type is changed: if one object type uses "set X" an another "set position X" it probably could detect it as the best match. It may not give a perfect match 100% of the time, but it sure would help in a lot of situations.
Last edited by Animmaniac on Thu Dec 03, 2015 12:48 am, edited 1 time in total.
Scirra Employee
B
151
S
53
G
17
Posts: 711
Reputation: 17,775

Post » Tue Dec 01, 2015 4:04 am

@Animmaniac Yes! That is exactly all I was looking for! Fuzzy matching is brilliant and I love your proof of concept. It gives the versatility and even if that flying list was like code-hint on any other text editor, it's a game changer for a "no programming required" engine. Even with the alternative way, by pressing enter that still opens up the door to faster "programming" with Construct regardless if it's only approximate!

Also, the streamlined lists would be a lovely alternative to what we are currently using and I'm sure beginner programmers could see that as a more visual way to understand what the Construct Language actually has! *Hugely prefer this to the Objects with Expressions window.

My exact idea wasn't to say " Construct needs it's own script system "- but instead, it needs exactly what you have presented - streamlined/autocomplete manual entry!

Let me know how If I can help with this in anyway!
Ever feel like you can't finish the game you are working on? It's time for a game plan, it's time to discover game design.

http://www.discovergamedesign.com



Check out my other courses:

https://www.jerementor.com
B
63
S
16
G
5
Posts: 58
Reputation: 6,481

Post » Wed Dec 02, 2015 9:50 pm

Yuotta wrote:@Animmaniac Yes! That is exactly all I was looking for! Fuzzy matching is brilliant and I love your proof of concept. It gives the versatility and even if that flying list was like code-hint on any other text editor, it's a game changer for a "no programming required" engine.

Thanks. Yeah, the idea for the flying list is basically like code-hint, but adapted to a system where the auto-complete is always on so it doesn't get in the way (only when the user wants to).

Yuotta wrote:Let me know how If I can help with this in anyway!

I have some other good ideas to improve the evensheet with better structuring, an improved color coding, and some power edit-in-place features that could probably speed things up a lot. However these are just some mockups and ideas for a proposal. I have no power nor the knowledge to implement this in Construct, it's up to Ashley and Tom. I definitely would love to redesign the eventsheet and the overall C3 interface, but it's not on my hands.

Also I would not expect any changes like these for C2, if it happens it will probably be for C3.
Scirra Employee
B
151
S
53
G
17
Posts: 711
Reputation: 17,775

Post » Wed Dec 02, 2015 11:24 pm

Why not get rid of the event sheet altogether?
Make an event object to open a modal window in the layout.
Make it even more oop by tieing object events there too.
Right click sprite, edit sprite events.
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Next

Return to Construct 2 General

Who is online

Users browsing this forum: fearfulelephants and 7 guests