Barcode Epidemic

From MRC Centre for Outbreak Analysis and Modelling
Revision as of 17:41, 14 August 2014 by Admin (talk | contribs)
Jump to navigation Jump to search

Work in Progress!

Playing the Game

Getting Started

Usually, everything will have already been set up. So to get everything working, the sequence of events will normally be along these lines:-

  • Plug in the router and switch it on.
  • Plug in the laptop (server) and switch it on.
  • Plug in projector/tv screen, and connect laptop to it.
    • Test that in advance of any public event.
    • Not all TVs are friendly. Check the notes about the laptop you're planning to use - whether it has a DisplayPort (HP), HDMI port (Lenovo and others), or a VGA port (almost everything). Check carefully you have the right cable as they are similar! And verify that what you're plugging the cable into supports it and works...
  • Check that laptop is joined to mrc_outbreaks network.
  • Double click on Live Epidemic on the laptop
  • Turn some tablets on. Check they join mrc_outbreaks network.
  • Start scanning barcodes.

How The Game Works

  • The game works in social events of maybe 30+ people, in a well bounded arena!
  • Start it by giving one or two people in the crowd a barcode. (Seed infections).
  • Tell them to go to "infection control" - the people with the tablets.
  • The victim sees the infection controller and presents the barcode.
  • The infection controller scans their barcode, then destroys it.
  • The tablet tells the infection controller how many infections they should make.
  • The infection controller scans a barcode for each of those new infections, and gives it to the victim.
  • The victim is told to spread these infections to whoever they want. Tell each new victim to visit "infection control".
  • The victim is told they are now immune to further infections. However, it's most fun to keep this fact secret.
  • If the victim is given any more barcodes, they must accept them, but they shouldn't visit infection control again.

The Parameters

Installation from Scratch

If something has gone wrong, or the Barcode Epidemic needs setting up on new equipment, then the following should be everything you need to know. I'll use the current equipment to describe the process; steps will differ with different equipment obviously, but the principles should still work!

The Web Server

  • We need to run a lightly HTTP server with PHP. I'm going to install Abyss (www.aprelium.com/abyssws/download.php) :- simple, free and very lightweight.
    • If you go with Abyss... I installed to C:\Abyss - meaning the root will be C:\Abyss\htdocs.
    • I usually choose to install it as a Windows service, and tick start up automatically. Easiest that way.
    • Installation is very easy - you just give a user/password for admin, after which browse 127.0.0.1:9999 and login to administer the server.
  • Install PHP support for Web Server
    • Abyss provide an easy PHP package at www.aprelium.com/downloads. Currently, I'm seeing PHP 5.5.15 at the top.
    • Install with defaults.
    • In Abyss maintenance (127.0.0.1:9999), Configure, Index Files, Add index.php.
    • In Scripting Parameters, tick Enable Scripts Execution. In Interpreters, click Add. Set Interface to "FastCGI (Local - Pipes)". For Interpreter, browse to where you installed PHP, and choose php-cgi.exe. Set Type to Standard. Add "php" in Associated Extensions table.
    • Ok, Ok, and Restart.
  • Add the Content
    • Delete the default contents of C:\Abyss\htdocs and unzip the Web Pack into that folder instead. Visit 127.0.0.1 (and perhaps refresh the browser), and you should see the welcome screen.

Router and Wireless Connectivity

Using (for now!) The Belkin N750DB router. This router can't do DHCP reservations - it can't ensure that every time you connect to its wireless network with the same piece of equipment, you'll get the same IP address. This is exceedingly surprising and tedious, and this section will soon be replaced when we get a router that can do this simple task. In the meantime:-

  • The Router
    • All it needs to do is create a wireless network for us. The Belkin is setup to provide a network called mrc_outbreaks, and dish out IP addresses in the form 192.168.2.x, where x>10. Use the WPS button on the router to share the password - I won't publish it here!
  • The Server
    • Join the mrc_outbreaks network.
    • The router itself has IP 192.168.2.1. We want the web server to be 192.168.2.2.
    • Go to Control Panel, Network and Sharing Center, Change Adapter Settings, Wirless Network Connection (mrc_outbreaks), Properties, and Internet Protocol Version 4 (TCP/IPv4)
    • Make a note of the existing settings, as you'll need them to turn the laptop back to normal later.
    • Use the following IP Address: 192.168.2.2. Subnet mask 255.255.255.0. Gateway 192.168.2.1

The tablet

  • Test by taking a tablet.
  • Join the mrc_outbreaks.
  • Browse to 192.168.2.2 to test it.
  • You need two extra apps. Pic2shop does the barcode scanning for us, and there's the Live Epidemic app itself.
  • To install these apps, I'm going to assume you've installed the Android tools, and the hack for the HP tablets described here.
  • Connect a single tablet at a time to the laptop. In a command window, change directory to where you put your Android Development Tools (eg, cd \Program Files\Android).
  • Then cd sdk/platform-tools. Might be a good idea to copy any apk files you want to install into that folder.
  • adb install app.apk (where app.apk is the path to the package you want to install - pic2shop.apk or liveepi.apk)
  • The apps will install.
  • You might need to tell the Live Epi app where the web server is. Click the "three dots" icon in the top left corner, and set the website to http://192.168.2.2/epi/
  • Then scan a barcode. If it appears to work, then it probably does!

The Live Display App

  • On the server laptop, there are some tools