Giter VIP home page Giter VIP logo

egymkart's Introduction

EGym Kart

An interactive and flexible adapter for the eGym Training Devices that maps certain real-time-training-data to a GameController. Additionally it currently maps from the GameController to simulated Keyboard strokes so we are able to control games that are running on the machine.

Also, this repo contains an idea for an App to easily start games - just open the file frontend/eGym 64.html in your browser

Contributors to this Project

This was developed during a hackathon. Special thanks to:

  • Paulina Baginska (Project Management and Pitch Preparation)
  • Jan Wingefeld (Project Management)
  • Timo Morawitz (Pitch Preparation, Design and Frontend App)
  • Johannes Eisenlohr (Coding)
  • David Losert (Coding)

Special thanks to all members of MunichMakerLab as well as Deborah Köpfer for the valuable inputs and a ton of fun.

Also Thanks to the Organizers of Burda Hackday for a really nice Hackathon.

Contact

If you have any questions about this project, feel free to contact me at [email protected]

How to make it work?

You need a NodeJS Installation on your machine. Then:

  • Checkout or Download this repository
  • Execute npm install to install all dependencies
  • If npm install fails, check if your OS has all package dependencies for robotJS (see section Building)
  • Execute npm start to start gaming (see more details in Section Use with Mario Kart)

To start the tests, execute npm test

A Note on Code Quality

This repository was implemented during a hackathon and we therefore had to put in some hacks to be fast (especially timeouts in tests. etc). Don't mind us - it was a long night ;)

Architecture & Further Contribution

We set this repo up to be easily extendable by the eGym people. Our goal was for them to be able to have predefined interpreters for their data that can control a virtual GameController (currently an N64 one) which can be mapped to whatever output is needed (currently a simple keyboard output). There are the following packages:

  • EGymConnector: Very basic module to connect to the EGym ZeroMQ Server and retrieve and parse all messages
  • EGymDispatcher: Uses the EGymConnector and allows for several listeners to be registered - so it is basically responsible to dispatch all messages retrieved from the eGymConnector to all currently registered listeners
  • MessageHandlers: Predefined Handler that interpret the EGym Message and can be configured to execute certain controller commands on certain inputs. Currently there are two handlers:
    • ThreeStepHandler: Executes Controller Commands when reaching a certain, positional step on the machines
    • ContinuityHandler: Executes "holding down" a Button as long as the machine is constantly pushed from concentric to accentric mode in a configurable timeout
  • Game-Controller: A abstracted and virtual game controller which has several predefined GameControllerCommands that can be executed. This is just an abstract interface that needs to be implemented by a fitting output controller
  • Keyboard-Controller: Implements the Game-Controller by simply mapping the GameControllerCommands to Keyboard strokes on the current system

Use with Mario Kart

Somehow you'll have to start an Emulator that runs Mario Kart. You have to own Mario Kart to be allowed to do this.

Keyboard Mapping

The current Keyboard Mapping for the Controller would be Arrow-Keys for directions & 'e' as the A-Button on the N64 controller - so you have to configure the emulator to follow this convention. Alternitavely, you could adjust the Keymap in the KeyboardGameController

Players

For the sake of the Hackathon, we used two static players with static RFIDs (see index.js). You will have to adjust those RFIDs to your own (or make it dynamic)

There are two player types:

  • Steering: A player who can steer the car by holding the workout device in concentric or eccentric (for left & right) or middle position (for driving straight)
  • Accerlating: A player who can accelerate the car only by constantly moving the workout device from concentric to eccentric and having no more than 1 second between the two extremes.

Start the Game

  • Start Mario Kart and step through the menues to start a game
  • Exectue this App with npm start
  • Switch the focused window back to Mario Kart
  • START WORKING OUT

What would be next?

  • Implement proper EGym Device Mode: The current workout modes on the eGym-Devices are not really good for playing, as they usually stop after a certain time or after certain repetitions. In a game this is not forseeable. Therefore the Machines would need modes with little weights that can run until the game is actually over.
  • Frontend-App: Implement an App to dynamically control players and games (let players connect with each other via the eGym Screen, assign which player has which role in a game etc.). A Mockup of this App can be found in the frontend Folder. A clickdummy by simply opening the frontend/eGym 64.html file in your browser.
  • Integrated Game Execution: Make the actual game be started by the Application instead of having it to start manually (like right now)
  • Stream Game: Stream the started game to the application so all players can see it on their eGym Device Screens

egymkart's People

Contributors

gott50 avatar davelosert avatar

Stargazers

Naitik Sharma avatar Pedro avatar

Watchers

Jan Schmidle avatar James Cloos avatar Peter Fröhlich avatar Ricardo Gomes avatar Tim Bodeit avatar  avatar  avatar  avatar Cecile Neu avatar Adrian Menzel 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.