Pongsense is a simple implementation of the game Pong with flutter (for android). But with a twist, the player paddle is controlled with the ESense Earable.
As the player tilts his head to the left and right, the paddle follows. This gives an interactive and dynamic way to play an old classic.
- Target domain: Anyone who wants to replay an old classic while also getting some movement in
- Application class: Gamebox
- Senses used: Motory skills and vision (coordination between head position and eyes)
- Addressed part of memory: Long-term procedural memory (sensory memory)
To play the game with the best experience, follow these steps.
- Open the app and enable Bluetooth and GPS
- Start your ESense Earable
- While on the
Connect
-Tab, click onConnect
- Wait until all connection state items have a checkmark
- Go on the
Calibrate
-Tab - Tilt your head to the far left an click
Calibrate Left
- Tilt your head to the far right an click
Calibrate Right
- Now all calibrate state items should have a checkmark
- Go on the
Play
-Tab - You can now move the (blue) player paddle by tilting your head from left to right
- Try to get a high score before loosing all your lives (displayed on the top left, over the current score)
- Have fun 😄
Every feature of the app has a person responsible for it. This person created most or all of it.
Feature | Paul | Rico |
---|---|---|
Custom flutter ESense fork | ✔️ | ✔️ |
🔀 Tab routing with bottom navigation bar | ✔️ | |
🔌 Connect tab | ✔️ | |
📐 Calibrate tab | ✔️ | |
↩️ Communicate global state to widgets with event-callbacks | ✔️ | |
👀 3D representation of eareble accelerometer | ✔️ | |
👾 Ingame components (player/ai/ball/blockers) | ✔️ | |
🎲 Responsive ingame blocker grid generation | ✔️ | |
🚀 Improved collision detection for fast moving ingame components | ✔️ | |
✔️ | ||
🎵 Ingame soundeffects and music integration | ✔️ | |
🏆 Ingame pause and endgame overlay | ✔️ | |
♻️ Ingame game reset handling | ✔️ | |
📡 BLE connection state handling | ✔️ | |
👷 Failsafe eareable initialization sequence | ✔️ | |
💥 Unexpected disconnect handling | ✔️ | |
📏 Calibration handling | ✔️ | |
📋 Eareable config sensitive calculations (needs custom fork) | ✔️ | |
🎯 Eareable orientation calculation | ✔️ | |
📯 Eareable event propagation for Flame components | ✔️ |
We created a custom fork for the flutter_esense package.
To be able to convert the ESense outputs in usable formats like g
or m/s^2
, you have to get the current device configuration. Specifically to convert the accelerometer output, you need the accelerometers sensitivity factor.
The problem is, that the original flutter package didn't map the ESense output to the provided event class (see here). Additionally we added utilities to convert the config values into the sensitivity factors specified in the ESense specification (see here).
The project was created by Rico Münch (uozjn) and Paul Wagner (ujhtl).
The Audio Files that are used in the project are imported from Storybooks.
The following Libraries are used in the project
- flame (2D game engine)
- flame_audio (audio for Flame)
- esense_flutter (custom fork) (ESense connection)
- permission_handler (ask for permissions on android)
- ditredi (3D visualization package)
See the dependencies in the pubspec.yml
for more information.