Chromecast plugin

Post your completed addons to share with the community

Post » Mon May 25, 2015 3:43 am

Hey all, I was "dinking around" with Construct 2 last year and ended up putting the effort aside. I was recently reviewing some of my abandoned projects and realized that I'd already written a Chromecast receiver plugin for Construct 2 and thought I would share it. (Written is a strong word... it is really just hacking the existing code from the Scirra Javascript API tutorial and code from Google).

Hopefully it is of use to folks. I've tested it out before posting to be sure it works. I've put some minimal instructions on the wiki along with the source and a packaged .c2addon.

Since it is just the receiver side, it requires you to write an Android app that uses the Google Cast API.

https: //bitbucket.org/mneilly/c2astreceiver/
B
2
S
1
Posts: 2
Reputation: 304

Post » Fri May 29, 2015 2:07 pm

Thanks for this plugin Mneilly! What's the receiver side of the app do? I'm just curious because I haven't played much with the Cast API.
Check out http://3dswing.com/ for games (in the works) and tutorials on Q3D plugin for construct 2.
-Masterofwin
B
9
S
2
Posts: 53
Reputation: 664

Post » Sat May 30, 2015 12:21 am

Hey Bhain7, thanks!

The Google Cast API supports two primary modes: media receiver and custom receiver. A media receiver app can use a stock Google provided app or it can customize the UI. These are centered around playing audio and video.

For games, you need to use a custom receiver with custom messages between the sender and receiver. A receiver is basically a Javascript app that runs on the Chromecast and talks to a sender via the API.

A Construct 2 game can run on the Chromecast (as the receiver) but you need another device (the sender) to control it. So if you implement an Android, iOS or Chrome desktop app that monitors keyboard, mouse, touch, voice etc, it can send custom messages to the C2 game based on what the user is doing.

In a modified version of Autorunner, I added a single event which detects when a message is received, checks if that messages is "jump" and if so simulates a jump.

c2astreceiver exposes the Google Cast API to Construct 2 but I don't currently provide any higher level functionality. Google also just announced new APIs at Google IO which I hope to take a look at this weekend.

The best place for a deeper understanding would be the Google developer site:

https ://developers.google.com/cast/docs/receiver_apps

You can see what Chromecast supports in terms of HTML5 by pointing it to:

https ://html5test.com

via the developer console.

In terms of Construct 2 and Chromecast compatibility... I can only say that I haven't run into an issue yet.

In regard to the sender app, maybe the sender app can be created using C2 (and another plugin) since C2 can run on Android but I haven't investigated that possibility yet.

I hope that answers your question. :)
B
2
S
1
Posts: 2
Reputation: 304

Post » Wed Jul 29, 2015 11:08 pm

@mneilly - can you post the capx of the modified autorunner template plz?
B
87
S
44
G
16
Posts: 1,009
Reputation: 17,946

Post » Fri Sep 18, 2015 8:33 pm

is this legit!?
would get a chromecast just for this if possible.
would be nice to have an example + video showing it working
B
33
S
6
G
2
Posts: 241
Reputation: 3,011

Post » Mon Jan 04, 2016 1:52 am

Hum interesting
B
65
S
9
G
7
Posts: 176
Reputation: 8,924

Post » Fri Jan 08, 2016 4:00 am

www.h1k3.tech

We are here for you!
B
87
S
23
G
16
Posts: 715
Reputation: 16,835

Post » Mon Dec 12, 2016 8:26 am

🎊🎇🎉🎈🙌🎈🎉🎇🎊 yes please and thank you.
B
52
S
26
G
8
Posts: 121
Reputation: 8,526


Return to Completed Addons

Who is online

Users browsing this forum: eleanorawesome and 0 guests

cron