The Chromecast USB device is thought of as a device to beam content onto big screens. Its mainly used to beam movies and tv shows.
This “casting” action is done by sending bits wirelessly from phone to the Chromecast USB, attached to a giant screen.
Being techies, we often wonder …
We spent some time looking into the documentation. It appears that the phone (sender) can be programmed to beam data to the chromecast USB (receiver).
Based on this simple theory, we could build an interactive game. We could have the user *do stuff on the phone, and the results *get beamed onto the big screen.
We set about building a soccer game. We narrowed it down to the one thing people love seeing: goals!
A: Penalty kicks! We first designed a simple wireframe diagram, to classify all objects and entities in the both parts.
Figure 1 - Clear separation of the flow
We split the project into 2 teams.
Team A worked on the sender app, using Android, Cordova and HTML5.
Team B worked on the receiver app, using HTML5.
Both teams had to work on their own challenges, as well as communicate with each other by setting common standards for transmitting data.
Team A had to build an Android (Cordova) app that has a small HTML5 game, that allows user to flick the soccer ball. The view captures that of the player, looking down at his/her feet.
It was initially tricky to place the game into Cordova, but we managed it with a good frame rate. The next challenge was having the phone sync up to the Chromecast USB. This involved careful, step by step following of instructions in the developer docs. Once that’s done, we had to translate that into actionable code in the app.
Team B had to design the goalie and goal scene. They had to figure out where the ball should come out from, given a set of data passed over by the sender app.
Based on the data (generated by the user’s swiping motion), the soccer ball should move/curl accordingly, into the goal net.
To make it challenging, we had a rather smart goalie who would block the user’s shots, deflecting it away from the goal.
The game loop is kept simple: score as many goals with 10 shots. Once the 10 shots are done, we show a quick rundown of results.
The entirety of the receiver is written using HTML5, our top choice for multi-platform code.
Here’s a quick video. We added a few fun sound effects as well.
Video - Everyone loves a good finger workout
Figure 2 - Goalie is chilling
Figure 3 - Goalie working hard to block that shot We hope that this article serves as a blueprint for future innovation in Chromecast games.
Ping us if you’ve made something cool, and would like to share it.
MarketJS is a company that leverages HTML5 to provide cross-platform solutions to clients. We have been serving clients since 2012.
MarketJS offers a variety of products and services:
We can be reached at support at marketjs dot com.
"We found MarketJS very easy to work with, and were impressed with how quickly they delivered and responded to our questions."
Rebecca MacDonald, VP of Marketing, Active Navigation
"MarketJS was very easy to work with, and they were always responsive to our questions and requests"
Jeff Robertson, Vice President of Technology & Operations, Carbon8
"MarketJS consistently delivers quality games on time and on budget. They are a great partner."
Scott Sheppard, President and CTO, MoZeus
"We had a great experience working with MarketJS. They were able to move fast on a tight timeline project and deliver exactly what we required with record time and quality. Definitely will be working with them on future projects to help bring our client’s digital needs to life."
Lauren Boutette, Account Director, Lumency
"MarketJS went above and beyond to deliver our projects tailored to our needs. Very swift and quick response and turnaround time. Highly recommended."
Yazan Al Tamimi, Account Manager, Socialize Agency
"Thanks so much for the work your team did. MarketJS was able to work with us to create a custom solution that exceeded our expectations."
Mike Davis, Sales Manager, ComQi
"We are really satisfied with MarketJS. They are quick to help with any troubleshooting and implementation."
Liliya H., Content Specialist, Telecoming
"It was a great pleasure working with MarketJS, they really helped thinking along with our needs. The delivery of the content was always quick and every custom request we had was possible to develop."
Willem van Ditzhuijzen, Business Development, CreativeClicks
"We are extremely happy with the content and service which MarketJS has provided us."
Matt McPherson, Director / Strategic Accounts , Wildtangent
"MarketJS provided excellent support and responded well to ad-hoc requests."
Seah Li-Wei, Project Manager, Spoon Creative
"MarketJS collaborated with our team really well and delivered quality work."
Kevin MacDonald, CTO, TeachTown
"MarketJS has been outstanding; they were patient and very helpful in delivering quality service that matches our custom game requirements."
Marlon Santos, Researcher and Senior Software Engineer, University of Sydney
"We've worked with MarketJS on a number of games now and always find them to be easy and efficient to work with."
Ben Gilbert, Project Manager, Ichi Worldwide
"We are very pleased working with MarketJS, it was far above our expectations in terms of deliverables."
Didier Seevraz, Digital Media Specialist, Lottotech
"MarketJS was fast, responsive and very customer focused. It was a pleasure to work with them."
Bryan Wursten, Senior Digital Editor, Boy Scouts of America
Our team shall be in touch within 12 hours.
If completing forms is not your cup of tea, feel free to email us directly at [email protected]