Airconsole controller maker

Post your completed addons to share with the community

Post » Wed Jan 25, 2017 11:24 am

@cjbruce
1- I'm figuring this out ... Have you tried triggering a message inside your condition ? Like on mouse click on sprite -> send message "up". ?
2- Yes
3- Fake it by rotating your controls 90 degrees and align them vertically so the the play is forced to hold the smart-phone horizontally.
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Wed Jan 25, 2017 11:48 am

X3M wrote:@cjbruce
1- I'm figuring this out ... Have you tried triggering a message inside your condition ? Like on mouse click on sprite -> send message "up". ?
2- Yes
3- Fake it by rotating your controls 90 degrees and align them vertically so the the play is forced to hold the smart-phone horizontally.


@X3M - You rock!

1. Working on it now. :) I'm building a simple screen.html to test.

2. Sounds good. Sometimes HTML elements get a little wonky on screen rotations for mobile devices, but hopefully this isn't an issue if I don't make the actual buttons themselves visible.

3. Will do. When I am normally writing a controller.html file, I set AirConsole.ORIENTATION_LANDSCAPE in javascript. I don't have everything running yet, but I just wanted to make sure the controls rotate when I move the phone around.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
51
S
16
G
25
Posts: 425
Reputation: 17,423

Post » Wed Jan 25, 2017 12:04 pm

Anonnymitet wrote:
X3M wrote:@Anonnymitet Investigating... (I didn't test them because of how lazy I am...)
@Psychokiller1888 Roger

Edit: I screwed up the IDs, fixing ... Crap.

Plugin updated!


Sorry for the inconvience




Fantastic! Is there a download link for the updated plugin? ;)
Last edited by Anonnymitet on Wed Jan 25, 2017 12:06 pm, edited 1 time in total.
B
58
S
24
G
14
Posts: 775
Reputation: 13,166

Post » Wed Jan 25, 2017 12:14 pm

cjbruce wrote:
X3M wrote:@cjbruce
1- I'm figuring this out ... Have you tried triggering a message inside your condition ? Like on mouse click on sprite -> send message "up". ?
2- Yes
3- Fake it by rotating your controls 90 degrees and align them vertically so the the play is forced to hold the smart-phone horizontally.


@X3M - You rock!

1. Working on it now. :) I'm building a simple screen.html to test.

2. Sounds good. Sometimes HTML elements get a little wonky on screen rotations for mobile devices, but hopefully this isn't an issue if I don't make the actual buttons themselves visible.

3. Will do. When I am normally writing a controller.html file, I set AirConsole.ORIENTATION_LANDSCAPE in javascript. I don't have everything running yet, but I just wanted to make sure the controls rotate when I move the phone around.


Orientation is a little weird in portrait. The AirConsole logo is sideways, and on the side of the screen. I'm working on manually modifying c2runtimectrl.js to lock the orientation in landscape. Is it possible to modify the plugin to set an orientation?
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
51
S
16
G
25
Posts: 425
Reputation: 17,423

Post » Wed Jan 25, 2017 1:23 pm

@Anonnymitet Just adding some stuff
@cjbruce I'm testing all the possibilities
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Wed Jan 25, 2017 2:19 pm

X3M wrote:@Anonnymitet Just adding some stuff
@cjbruce I'm testing all the possibilities


@X3M,

Thank you!

I haven't (yet) figured out how to modify the code in c2runtimectrl.js to lock orientation in landscape. I'll keep poking around and (hopefully) post a solution here once I figure it out.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
51
S
16
G
25
Posts: 425
Reputation: 17,423

Post » Wed Jan 25, 2017 6:22 pm

@X3M,

In order to force a landscape orientation, I added {"orientation":"landscape"} to the c2runtimectrl.js:

So, instead of:

Code: Select all
         _this.airconsole = new AirConsole();


I used the following:

Code: Select all
         _this.airconsole = new AirConsole({"orientation": "landscape"});


Could this capability be added directly to the plugin?
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
51
S
16
G
25
Posts: 425
Reputation: 17,423

Post » Wed Jan 25, 2017 7:38 pm

@cjbruce Done
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Fri Jan 27, 2017 4:34 pm

@X3M and @Psychokiller1888,

I've played around a bit with the plugin, but have not been able to send messages from the screen back to the controller. A few questions:

1. I assume that the sendhandshake() message is being sent from the screen to the controller, then back from the controller to the screen, all handled behind the scenes by the AirConsoleController plugin on the controller side and the AirConsole plugin on the screen side. Is this correct?

2. Since the airconsoleController plugin doesn't have any event triggers or expressions to receive messages, I am using the AirConsole plugin on the controller side to try to receive messages. I have tried the following, neither of which seem to work:

Image

I need to be able to send the following types of information from the screen to the controller:
airconsole.nickname
the current screen to display (loading game, too many players, character selection screen, in-game screen, game over screen)

Is this something that needs to be handled in the controller plugin or the screen plugin?

Thanks for your help on this!
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
51
S
16
G
25
Posts: 425
Reputation: 17,423

Post » Fri Jan 27, 2017 5:19 pm

@cjbruce Have you tried creating an Airconsole object in your controller and getting the nickname inside an OnDeviceJoin condition?
I think that the nickname that you will get is yours, If I'm not wrong. It is worth a try.
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests