Edit time widgets

For developers using the Construct 2 Javascript SDK

Post » Sun Sep 07, 2014 4:00 pm

I can't seem to find much information about this and in the searches. So maybe someone can point me in the right direction or add some features. I would like to add Edit Time widgets to objects. This is to assist in creating information structures and visual guides during edit time.

As an example I created a template on the store called NodePath that does CSV brute force path finding. Works great. However setting up csv graph over lot's of nodes is a pain. I started with a C2 template csv graph creator. However this needs to be in runtime with the idea of getting a string to put in at edit time. Then at runtime can rebuild the graph node. However this requires a lot of extra work that seems to be best that this occurs on the editor side.

http://studioryu.net/dev/nodepatheditor/
* Right click to create a node anywhere
* Right click on a node to destroy it
* Hold left mouse to drag a node
* Hold left mouse on a green dot to create a drag path to another node.
* Right Click on an arrow to destroy the path.

I was thinking to create a behaviour that only needs to store the properties. So any Sprite can act as a node so this doubles up the use of a Sprite. However Behaviours can't draw anything. So I thought to create a NodePathCore with settings options(similar to Mouse,Keyboard....) that can draw all the edit time stuff of the behaviours. Nope can't do that either because if it's not a "world" it doesn't get the draw command.

So I relented and decided to make it all a Plugin. however I soon found there is not enough programming features to do widgets.
I can draw a node
I can draw a line between the node
I can't create a widget(green drag and drop and arrow) that can be interacted with.

There is no are no additional mouse features in the manual for OnMouseDown/MouseUp.... which I think could be a minimal feature addition. Also it would be fantastic to have Widget handles in the edit time system. As an example the could be used to have edit time sizing for behaviour/plugin settings, such as circles, ovals, or dragable lines.

So if some one knows how to do this I would love to know. if not I know @Ashley is a busy guy. But opening up more edit time features would be awesome.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Mon Sep 08, 2014 12:37 am

Perhaps you could color code the order, grayscale perhaps, but honestly a path editor should merit an official plug, just like the tilemap plug.
The problem is getting people to agree on its features.
Otherwise an external editor, paired with an array is the best option imo.
Given that we now have cubic, and qarp, curves in events are a little easier.
Image ImageImage
B
168
S
50
G
164
Posts: 8,228
Reputation: 105,575

Post » Mon Sep 08, 2014 2:27 am

I'm not sure I agree/disagree that such a feature should be an official plugin. Many of the best tools for UDK, Anarchy, Unity are tools created by non in house developers. In fact having outside developers create the tools first gives in house developers an opportunity to improve. Where I work we used to work with ToolKit2D for Unity. However Unity team developed a cleaner 2D api. It's not a robust as TK2d, but it's core foundation was easier to use and worked well.

If we had access to more interface controls in the IDE for both Plugins and Behaviours this would offer devs like R0j0, Rex, Luna yourself and myself more flexibility in creating powerful tools. As it is most of the SDK only offers access to JS interface lib rather than an integrated power tool. With C2 focus on being an easy entry and powerful 2D game making system offering more advanced devs to create advanced tools would be a big boon to C2 community and quality of C2 games.

I thought about an external editor. But managing paths over more than one screen size layout is unfeasible. With no IDE interface to monitor the linking of nodes in the IDE managing such feature is more inconvenient than convenient.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Mon Sep 08, 2014 7:11 am

I had thought about a node-path-like plugin before, but just like @jayderyu said, there is nothing could do in edit time.
B
108
S
26
G
259
Posts: 4,433
Reputation: 145,689

Post » Mon Sep 08, 2014 12:57 pm

Edittime extensibility is not at all supported in C2. If we rebuilt the editor, we would make extensibility of the editor one of the focuses of the project.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Mon Sep 08, 2014 9:10 pm

Is that an option, or is that more of a C3 thing?
Image ImageImage
B
168
S
50
G
164
Posts: 8,228
Reputation: 105,575

Post » Mon Sep 08, 2014 10:03 pm

Ashley wrote:Edittime extensibility is not at all supported in C2. If we rebuilt the editor, we would make extensibility of the editor one of the focuses of the project.

I'd love for you to go into detail about the features you imagine for an eventual rebuilt editor, even if you can't promise anything.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Mon Sep 08, 2014 10:17 pm

It would be of the scope of C3. Ideally the whole editor would provide APIs for modifying every part of the project, UI, exporting and more, so you can customise everything.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Tue Sep 09, 2014 2:12 pm

@Ashley
Thanks for the info. I had no idea that you guys are choked pointed by the IDE layer you are using. That's a real pity. Who knows. Maybe when you guys find another ace programmer; that could be a thought to redo the IDE with interface features, but .... also more platforms.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest