Saturday, May 12, 2018

Biosensing Project

For our project Ryan, Grayton and I decided to make a skiing game that used two biosensors, one on each arm. Ryan made the two sensors, and Grayton made music for the game and did the documentation. In order to use the bio-data in our game I used Max 7 to take in the data from the microphones. I then did a UDP send that sent the amplitude from each mic 10 times per second. I used OSC Simpl to receive the data in the Unity game engine:

https://assetstore.unity.com/packages/tools/input-management/osc-simpl-53710

The idea of the game is that it is an endless runner where the player has three health points, if they hit a tree they lose one. There are coins that give them extra points and health pickups that will give them one health point, to a max of 3. The player can move left and right to avoid the obstacles by using their muscles. The sensors on their arm will send the data to Unity and which ever is louder will be the direction the player will move towards.

<pre><code>
----------begin_max5_patcher----------
1818.3oc6a0zbihCD8blp1+CTt1iY7hj.Dr21S64sp81ToRQ.EGMCFXA4rIy
T67ae0G.FGCJxwfrmLdxT9CPF59oW2p6mk+1u7gqVbWwSj5EN+tymbt5puwO
xUxiINxUsG3pEqieJIKtVNvEqI00wqHKtt4jLxSL4I9MFolg5NdM64Lh7DcG
JeyZZdFgIuPvdGsXCq8vf1CSSke3h697Gg3tKQYLK4AZ9paqHILkg6EgW5ds
S.BHdxyU7HDtz04l1Oj5xydtjn9DKV3bi7T+2u7Awy7mt1X++tMLVQtwtIvb
2Do2MC8Ddluu7IX2iZby6hyWcLtJqX0pLxb3pvPctJJ.tzWLUFZrqRy4e1a1
dMqhWSXjpaI4w2oLZ22LLjS9WtMuOgmeGpJb.ttyBmORKY.gjjcEaOv2.N+w
RFFCEJiS9hS8yqcbWx+uwPA5.hKb0G9K4GApvivvebC+g5bS+HnbFGCsV3+n
Y5ennl4jUjDmIdU24uuHmUS+p71CD7yCMpPbAx4Atxw9GUz3rEG.74oC9fXY
.iOVFvDoVj.MarjQgtxhJlC1sWNiSLp4qMQrzf3KsFHxG2jl4DfZRBG.xWmm
+G3bA5BzR3hjYh7ijfVDZlgtwxNuIsrljmtE7bfbx2wCgfCFBcGZQNOCfPbf
D7.9gawv2LNceVA2rN1z2vg7E+dfZ05XoSDnw8v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aCXn7K+ncOFbQo2NXKv.XqY8+yCkdOZYdw5
2dWApJ.TUI9NWl2KZ79tSiWLxjNgTaK8KZ7tSC652o6Hgxc3nPNdgCuHwqwR
79V02Ul400Np6hlD0cwvNJxOyh6dQY2iLnh703zjuOGa2Yf9eKOpZcjkHG30
93gPb2akB0GVJW3K+AcJs.wIdATTWroJo8NzryDc5YEo7JFn4coQ9T299r+f
dfllRx2QXZdfcWlTMBhZrYEZhYIDA1x1E1H7RrXmsMr.SLrWZ91vv3MDzao0
wLL6SwD0xcdhX.iLL6aWlXVgV2rLh3irtY4Y5jHvplExnYQn8YWHilGgd12v
7mHCaMMsrf1zd.uaQn7W7dfpSGjKt6c8tWSsu3MO9BLT4KQ63KQyqu.MxW7s
OgwLCy9ojDMh43cNZXtmqw9FUsm8KQ.ZTYnH74pgY+5igF0QA7DLUZzBxuLB
wFFluwFFztFFxXCyt0VAMK+p8WQBZV9U62NMvr1osehewuVgWuqUf8mJA9mq
HlYkVZ+7X.iRWX+D+.iJSDcBBJMS+A6WlHv0zYR6l2GXRthSAy2BZU1nAcbY
4ijp5lKsxjVrN9yEUh2iuV8dZt58pMNvhJxiz5c9BqVDWk7.kQRXapTpx+TX
ydnXw5hTRU9Fpbz7iHsA9C++FbmSw
-----------end_max5_patcher-----------
</code></pre>



The Max patch that sends the bio data
The game showing all the UI and the tree, coin and health pack

One of the two sensors that straps to your arm


No comments:

Post a Comment