Code?

Discussion and feedback on Construct 2

Post » Fri Jan 10, 2014 11:27 pm

If you really "need" to add code, there is the javascript SDK that allows you to add plugins/behaviors.

But truth to be told, most "already coders" that come to C2 just don't take the time to learn C2's ways and see that their programming knowledge will allow them to take advantage of the event system quicker than a "non-coder".
Make your coder friend study the manual and the tutorials and realize that THERE IS NO NEED to code, the event system IS coding.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Sat Jan 11, 2014 2:30 pm

the current eventsystem is amazing, the thing to look for is to make the input of events as smooth as possible, the autocomplete list are a great example of that, another one would be to be able to create variables on the spot(like if you forgot to add a variable to an object you just add it there and then) or another would be adding plugins (like mouseinput) without the need to go to the leveleditor.

but it could go even further and rethink the entire popup selection thing to like a full autocomplete input. It could actually be some kind of expert mode (or experimental mode :) )
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Sat Jan 11, 2014 8:10 pm

Well, given that internally all the visual events are being turned into XML anyway, it would take a different kind of parser that could parse a construct text grammar and translate back/forth into XML. Add intellisense, color syntax, highlighting and it would be pretty nifty. A text interpreter is not something that would have to be coded from scratch, there are plenty of libraries that could be leveraged. I'm not saying it's a trivial task, but it's doable.

Most of the people I know who come from a coding background and use Construct's main complaint isn't that "they can't do everything with scripting system that they could with coding", it's that (to their eyes), it's that a traditional coding environment makes it easier to trace code flow and keep things organized. And I get that; even with zooming out/etc, an entire screenful of Construct 2 events would probably shrink to a mere paragraph of script text.

It also makes things a little more resilient, copying/cutting/pasting text is a just naturally less prone to potential weird failures that might happen when moving events between event sheets. Having text coding would also potentially make cutting and pasting between Construct projects easier as well, not to mention stock text editor stuff like Find, Find/Replace, etc.

That being said, the keyboard control has come a long way though occasionally you'll lose input focus in the event sheet and have to click on something to bring it back so you can continue using the keyboard.

Even though I'd certainly appreciate the ability to script using code, given the amount of feature-work Scirra has on its to-do list at this time I tend to lean towards making something like this low priority.
B
31
S
7
G
8
Posts: 232
Reputation: 6,254

Post » Sun Jan 12, 2014 2:23 am

In a sense.. there's not been anything meaningful advance on coding since the C was created. Everything later(C++, Java, JS) has been just libraries and syntactic sugar atop that. Actually, with some additions, games like this could well be made with Lisp.    

IMHO the claim that one 'does not write code' with Construct is more marketing than anything real. Since all in all programming is just making bunch of instructions for computer to do what's asked to... And in the end the 'language' ain't the most important factor.

I know some people who still do games/demos etc with computers like C64 and Vic20... So it's matter of perspective I'd say.

What really matter is that tool fits the need, it does what's supposed to do and produces decent results.
Need help? Upload .capx file with your question.
B
16
S
4
G
2
Posts: 233
Reputation: 2,560

Post » Sun Jan 12, 2014 10:14 am

[QUOTE=Kyatric]
But truth to be told, most "already coders" that come to C2 just don't take the time to learn C2's ways and see that their programming knowledge will allow them to take advantage of the event system quicker than a "non-coder".
Make your coder friend study the manual and the tutorials and realize that THERE IS NO NEED to code, the event system IS coding.[/QUOTE]

This is The Truth (with bot T capital letter).

I'm a coder, and an old school one too.
My first project in C2 was full of arrays, matrix, for loops, bunch of variables just because I was using it just as another programming language, not as the instrument it was meant to be.
More and more I was going in developing it, I kept asking "is it possible there isn't a better way to do it with behaviours/plugins?" and the 99% of the time the answer was "yes".
I've never finished the project in the way I thought at the start and I'm completely rewriting it in a more "Construct's way".

The only thing I keep using as coder are Event sheets as they were classes in C# but that's just my forma mentis and a way to keep thing in order ( this post clarifies what I mean, if you're interested in it).Jeff Skyrunner2014-01-16 19:40:28
I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
B
30
S
13
G
4
Posts: 141
Reputation: 4,832

Post » Sun Jan 12, 2014 4:35 pm

@Jeff Skyrunner:
As a long time C# veteran I'm not sure I agree with the comparison of event sheets to classes. If anything, the closest thing to a class that construct has would be a sprite object (with some set of member properties) that acts as a Construct container for any complex class members (such as Array, Dictionary, etc) coupled with On create/On Destroy events to represent object instantiation and disposal. Inheritance is sort of mimicked by the introduction of Families.cacotigon2014-01-12 18:02:11
B
31
S
7
G
8
Posts: 232
Reputation: 6,254

Post » Mon Jan 13, 2014 11:55 am

@cacotigon

Sorry, I didn't explain myself: I didn't mean that events can be considered the same thing as classes, but only that I use events file to keep a logical order "as they were" classes... that is, I write all functions related to "hero" in the "hero" event file, all functions regarding "enemy" in "enemy" event file, and so on. :)
I'm not a insane, my mother had me tested

I'm an engineer. To save time, just assume I'm never wrong
B
30
S
13
G
4
Posts: 141
Reputation: 4,832

Post » Tue Jan 14, 2014 7:48 pm

@Jeff Skyrunner

oh, gotcha. :) That's typically the way that I do it as well; I usually setup a folder hierarchy in the Event Sheet, so I have an Enemies Folder and then have event sheets for each specific Enemy, OgreSheet, TrollSheet, OrcSheet, HobgoblinSheet, etc. (Depending on how much customization each enemy has from the generic enemy "parent" behavior)
B
31
S
7
G
8
Posts: 232
Reputation: 6,254

Post » Wed Jan 15, 2014 7:01 am

[QUOTE=Jeff Skyrunner] [QUOTE=Kyatric]I'm a coder, and an old school one too.
My first project in C2 was full of arrays, matrix, for loops, bunch of variables just because I was using it just as another programming language, not as the instrument it was meant to be.
More and more I was going in developing it, I kept asking "it is possible it isn't a better way to do it with behaviours/plugins?" and the 99% of the time the answer was "yes"; I've never finished the project in the way I thought at the start and I'm completely rewriting it in a more "Construct's way".[/QUOTE]
Oh, this is very nice to know from someone with more coding experience. Glad to know someone sees it my way.

I can't code, I'm horrible at it and never liked to (I finished a C# course anyways, code a couple small games), so I'm using Behaviours and Plugins as much as I can, in fact, I try to reduce the Events and Objects as much as possible.
I already optimized my first project a LOT by doing all this, and will apply to all my future projects.
Thanks for your opinion.
B
33
S
9
G
1
Posts: 156
Reputation: 3,034

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: tarek2 and 4 guests