[Suggestion] Configuration Setting on Prev/Export

Discussion and feedback on Construct 2

Post » Fri Sep 06, 2013 8:16 am

Hello,

I'm making a game for android and I have to set the use mouse input to Yes for testing on desktop and to No when I export to avoid double input on the phone.

That's only an example, but there are probably other situation when we need a different configuration between preview and export.

Also my problem is that my export take a lot of time (maybe another suggestion would be to not re-export assets already exported... sprite sheeting can take a lot of time), so I'd like to avoid configuration mistakes.

So here is my idea:

We already have a configuration panel that seems to keep object's configuration states.
So maybe we could set up construct to set one of the configuration for the preview, and another for the export.

This way, for my example I could set the use mouse input to yes in my preview config, and to no in my export and just forget about that (:

Hope it makes sense
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Fri Sep 06, 2013 7:10 pm

Double input? Does this have something to do with right clicking, and having the touch plugin act the same as if it was a left click? I've been wanting an option for the touch plugin to have a left click only option for this reason.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Fri Sep 06, 2013 10:14 pm

This is a good idea. And is supported by many IDE's. Like Visual Studio, and Code::Blocks. This would be really nice in Construct 2.
B
10
S
2
Posts: 25
Reputation: 733

Post » Fri Sep 06, 2013 10:58 pm

Well we have the "Is in preview" condition.
You could put the configurations in groups and enable/disable them based on that.

Then just delete the unwanted group and is in preview condition when you
export.


Or does that even get exported @Ashley?newt2013-09-06 23:00:43
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Post » Sat Sep 07, 2013 12:31 pm

IIRC "Is in preview" is still exported, but most events are really a tiny amount of data, there's virtually no performance or file size overhead. We could probably add an optimisation to remove it on export anyway.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Sun Sep 08, 2013 7:30 am

@Arima
Nope, it's just that when you set the Touch plugin's property "use mouse input" to "yes", the javascript will register events for onmousedown/onmouseup/onmousemouve as well as for the touch events.
But some devices (well, for now I've only seen it on Xperia), catches mouse events as touch events.
So when you touch, the "on Touch start" trigger will trigger twice.
So if you do something like "on touch button" > change layout and you land on another UI with another button at the same place, it will also touch it.
So I basically have to remember to disable "use mouse input" each time I do an export. And I have to admit, I forget very often...

@newt @Ashley
All properties aren't available via events (the "Use mouse input" of the Touch plugin isn't), so no, I can't always use the Is in preview condition to have various configurations. And in my opinion, it shouldn't be the role of the event sheet (it's hard to read enough as it is)

Also my idea of setting different configurations for export or preview could be expanded to set different configurations for the various type of export you can do (html5, arcade, phonegap, cocoon, node, etc) and also the various type of preview (desktop, on LAN,...)
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Sun Sep 08, 2013 7:47 pm

Agh - I didn't know about some devices registering clicks as well as taps. Thanks for the heads up.

There is a condition to check if the game is running via cocoonjs, I know you said you'd prefer a non-event solution, but perhaps that would help.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Mon Sep 09, 2013 12:41 pm

@Arima
I'm using phonegap, because cocoonjs adds 4 to 5 Mb to the games and at work I need something around 1Mb.

And I think on cocoonJS it doesn't happen because they run their own engine.

Also any condition you can find isn't usefull since there's no action that say "Touch: set use mouse input to Nope"

It's only an edit time property. Hence sensible to the configuration settings in the long forgotten configuration panel I discovered some days ago, and then I got this idea.
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561


Return to Construct 2 General

Who is online

Users browsing this forum: Tokinsom, Yahoo [Bot] and 19 guests