Git Product home page Git Product logo

33c3-pong's Introduction

Massive Multiplayer PONG for info-beamer (hosted) running at 33C3

Pong at 33c3

(Original image by Tom / @weakmath)

While 33c3 was running I got the idea of implementing a massive multiplayer pong game on the big screens in the main halls of the conference.

Players could play on their phones, tablets or laptops simply by visiting a webpage that was advertised on the screens. Players would select their hall on that site and immediately enter the game. The game screen looks like this:

Playing pong

On the left and right side you see the paddles. Tap any vertical position on either the left or right third of the screen will set your paddle positions. You positions are also sent to the central game server using a websocket connection. All paddle positions for all connected players are averaged on the server to get the final paddle positions.

A custom info-beamer hosted package was running on the info-beamer device in each hall. It's service program connects to the game server and gets the averaged position of the left/right paddle 10 times per second. If forwards that position to the locally running info-beamer program where the pong code handles these updates and renderes the game. Have a look at static/tile.lua for the game logic.

Installation

Tested on Ubuntu 16.04:

$ virtualenv --system-site-packages env
$ . env/bin/activate
$ pip install -r requirements.txt

The directory also serves as a daemontools runnable directory. To start the pong web server, link this directory to /etc/service. After a few seconds the server should be up and listen to port 30000.

During 33c3 the site itself was exposed through a locally running nginx server. You can see the configuration used in misc/33c3.conf. Additionally everything was running behind cloudflare for trivial SSL setup.

Integration with info-beamer hosted

You can import the pong package into info-beamer hosted by adding a new package from this url (replace example.com with the domain where you setup the pong webserver):

https://example.com/pong/package.links

The package integrates with the 33c3 info-beamer package . So you can add the imported package as a child package to the 33c3 package. See the 33c3 package on how to configure playback of the pong package.

33c3-pong's People

Contributors

dividuum avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.