Chromecast plugin

0 favourites
  • 8 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • 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/

  • 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.

  • 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.

  • mneilly - can you post the capx of the modified autorunner template plz?

  • is this legit!?

    would get a chromecast just for this if possible.

    would be nice to have an example + video showing it working

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hum interesting

  • https://developers.google.com/cast/docs/chrome_sender

    So it appears to be possible.

  • πŸŽŠπŸŽ‡πŸŽ‰πŸŽˆπŸ™ŒπŸŽˆπŸŽ‰πŸŽ‡πŸŽŠ yes please and thank you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)