Special thanks go out to two Root Beer Float Studio members who volunteered their time to making this happen. Ryan implemented a "kiosk mode" feature into the game, so that after a minute of inactivity, the game returns to the main menu. Ashley designed a beautiful handout, a great piece that visitors can pick up and take home. They'll be printed four-up on 8-/12x11" paper, and here's a raster version of the design.
Handout Front |
Handout Back |
Knowing that Ryan was adding the kiosk feature directly to the game, I focused on making an interface that would be most useful to the player. At first, I hoped to just be able to run the game in a fullscreen browser window, but all browsers I could find have a "feature" in which moving the mouse to the edge of the screen pops up a prompt to get you out of fullscreen mode.
Fullscreen Chrome browser with the mouse having been pushed to the top edge |
After a bit of surfing, I discovered that Chrome has a kiosk flag that does exactly what I need. I created a batch file that starts Chrome with the "--kiosk" flag, followed by the location of the WebPlayer html file, and it works like a charm. I put a shortcut to this batch file into the Startup directory, and now booting the machine takes you right into the game. So, in the case of failure, a volunteer at the Backyard area need only reboot the machine, and we should be fine.
Incidentally, it was easy to customize the WebPlayer HTML file with a bit o' CSS to get the look above. I'll share it here in case it's useful in the future (to me or to you).
<script type="text/css">
body {
background: #5d337b;
}
#unityPlayer {
position: absolute;
top: 50%;
height: 600px;
margin-top: -300px;
left: 50%;
width: 1024px;
margin-left: -512px;
border-style: solid;
border-width: 4px;
border-color: #262263;
}
I'm using a little CSS magic to center the fixed-sized unityPlayer div in the screen. This will work fine as long as the kiosk display is at least 1024x600 resolution, and if it's not, we have even bigger problems. The small purple border around the game makes it pop against the background when playing the game.
Chrome in Kiosk Mode |
A brief note about the value of reflective blogging. When I started this post, I had an inelegant, resolution-dependent hack for vertically centering the game in the browser window, and I had failed to consider complications of context menus (right-clicks). As I was copying my CSS over to FormatMySourceCode, I thought that there must be a better way; a few jumps around the Web led me to the absolute positioning, fixed-size div trick. As I was generating the screenshots for this post, I realized the vulnerability introduced by the right mouse button, and again, a bit of trial and error led me to the current approach.
Finally, I would be remiss if I did not thank Al Rent for inviting Root Beer Float Studio to showcase our game in the Ball State Backyard.
See you at the fair!