-
arduino & interaction
Continuing from the previous post, I will be exploring the first method of input for the Aplysia game project. Explorations with Arduino microcontrollers, open license C++ code and an array of components led to the first, very primitive prototype of the game controller. The advantage of using only electronics versus a game engine and outsourced camera controllers (Kinect or webcam) was the simplicity in the approach – no plugins or assets were needed to construct a playable demo.

Arduino with activating button, buzzer that plays melody and LED to signal button interaction. An ultrasonic sensor was centric to the creation of the first method prototype, and additionally a piezoelectric buzzer, LED and button for relaying information and allowing starting and stopping game sessions. It felt necessary to start with the most rudimentary components and work upwards to a more complex system, with the first being an LED blinker activated via button press. Lionel suggested searching through the Arduino references for code I could use. With my limited knowledge of C++, I adapted the Blink and Button example code into one to achieve this small test. Afterwards, I researched into including the piezo buzzer to emit a single tone or music, which was made possible with the Melody code being included in the existing Arduino code.
And, of course, I recreated the melody of Megalovania. Initial struggles with having multiple functions run in parallel to one another caused concern that some game logic, for instance having an LED blink as a sensor checks for motion, might not be possible. This was the first hurdle to get over in the project, to allow for the inclusion of any more complex logic. Thankfully, using a while() loop in the code would allow for functions to only happen when specified criteria was fulfilled. An ultrasonic sensor was attached to the Arduino; resources that explain exactly how to attach and implement the component helped greatly here. The issue with game logic was solved. An ultrasonic sensor was given to me by Lionel during an earlier discussion for the project. I consider this to be the most viable form of input for motion detection due to being able to read a distance value from the component, allowing for more interesting input applications (simulating petting a dog using hand gestures from the component, creating a piezo theremin, a stepper LED that blinks in intervals based on distance).
A while() loop was used to light the LED on the breadboard once the ultrasonic sensor detected an object in its range. With a rudimentary system built, a scoring system was implemented to the code. A ‘GAMESCORE’ integer is incremented by one for each swipe within 20cm of the sensor component. Later, this will be expanded to include decrementing the score variable if a secondary LED lights instead, if not using an inverse-parallel LED with a reversed current to provide a different light color. This may be the most cost-effective angle when producing multiple iterations of the same system to create the finalized prototype. Green/red inverse-parallel LEDs are conveniently the most common type and therefore the cheapest to purchase from electronics retailers. Three rings of LEDs will be placed within each other to make up one disc’s phases (spawning phase, middle phase and exiting phase).

Each finalized disc system will include:
- Connections to the Arduino Uno microcontroller
- A ring of LED (two varying colors together or a singular inverse-parallel diode)
- Resistors for these LEDs
- An ultrasonic sensor to detect swiping motion from a set range
- A switch or button to trigger the start of a game session
- Piezo buzzer for debugging and relaying information such as having the player lose a ‘life’ during play

Arduino Uno with sensor and LED to signal sensor interaction. 
Arduino Uno with activating button, sensor and LED to signal sensor interaction. Going forward, this system will be completed and repeated to create a 2m tall 9:16 gameboard for the first prototype method. The importance of components used in electronics is vital to the quality of the game experience and must be considered when working with microcontrollers versus game engines, in which much more room is allowed for interpretation of gameplay concepts through either pre-existing scripts or complex but easy to implement game logic.
The next post will explore and discuss the process in creating this final prototype and the beginnings of the game engine method using Unity.
-
gamejams & gamepads
The Aplysia game project was started on the 15th of July, on the back of a research visit to Alton Towers Resort park. The team for the 1-UP scheme (organized by staff at Staffordshire University, UK) was split into two to explore areas of the park for an understanding of carnival games – games of chance or skill that are built from rudimentary pieces or mechanically driven – and to devise a modern twist on them. From this, documentation and an optional prototype is to be submitted on the 1st of August, 12PM.

Initial observations that I took away from the visit were that most games were derivative of physical sports like basketball (above), often with some kind of twist. Another basketball inspired game found in the park had a wide ellipsis hoop (that appeared perfectly circular through perspective) to throw balls through, which made scoring points tricky until mastered. This stall and others like Hook-a-duck, which appear by the park entrance, would hang potential prizes overhead to coerce visitors to try their luck on their way through to rides further into the park. Hook-a-duck rewards bigger prizes based on accumulated game score. This score carries across multiple plays, encouraging replay. Each duck’s point is written on their underside, obfuscated from the player, meaning it is a game of sheer luck. This is similar to modern Gatcha game mechanics, with RNG and sunk cost or time investment comprising the core of the experience.
From asking park staff, we found that the Baskethoops game receives most of its revenue at the end of a working day, as park-goers are exiting and look to spend up the last of their expenses. This easily pushes the 12AM revenue of approximately £500 up to £3000 or even £4000 by 6PM. In an effort to appeal to a greater amount of visitors, variations of the games are placed besides one another. Prizes in each stall are chosen based on the difficulty of the game; one ball into a bucket versus two balls into a bucket rewards different sized prizes. Features are divided symmetrically across the park to decrease walking times and the chances visitors will miss the games. Mirroring out attractions in this way gives visitors access to an immediately diverse experience. The park pathways are designed in a way that funnels and congests visitors into its themed areas. This streamlined approach lends to ensuring visitors experience as much as possible too.

Battle Galleons (above) is a more interesting attraction in that there is no win/lose condition, instead allowing observing visitors to join in on the excitement and spray those the ride itself. This was the only example of asymmetrical play that I could find in attractions at the park.
The concept formulated from the visit – Aplysia – is an inversion of the Dunk Tank carnival amusement, where in the player must ‘catch’ balls that pass them by, with too many balls passing by causing the player to fail. The game is ER-based (Extended Reality) and displayed on a 2m tall screen in front of the player with the balls appearing visually on the screen. A sensor takes the player’s motion as an input and considers balls to be caught when they place their hand over that respective area. A score at the top of the screen is displayed and will print tickets for the player at the end of their play session. As the game finishes, a camera will take a photo of the player and allow them to buy or print via the park QR code system, similarly to the park rides.

It would be placed in Alton Towers Resorts’ X-Sector, besides Oblivion and The Smiler. This area of the park is themed around a sinister government facility, and so the game will be presented as a Pavlovian Conditioning experiment, conditioning the player to follow instructions without thinking. To push this theme further, the amusement will be a clinical white with laboratory signage, to make players feel like they are stepping into a testing zone. Flat lighting and a dot matrix screen will feed into this theme further, while keeping production costs low. Alternatively, a large LED screen could be used, with the detecting sensor placed on the backboard instead. This screen would run a version of the game in Unity, using each sensor as an input on a gamepad. Investigations into interfacing with game engines with unconventional inputs will be undertaken going forward.
The attraction will be designed to be configurable based on the height of the player. This will allow wheelchair users, children and other shorter visitors to also take part in the game. The discs on the highest areas will no longer spawn, dependent on height. This can be set either via sensor/camera detection or by an attraction operator.

After a conversation with Lionel Jayaraj, a research lecturer at Staffordshire University, we discussed three methods to work through:
- working with microcontrollers and ultrasonic sensors to create an exclusively electronic proof of concept
- optical (camera-based, Unity, potentially using the Kinetic 1.0)
- a hybrid method involving both a microcontroller and Unity with a screen display
Currently, I am exploring my options with the components available, repurposing open license C++ code and at a later date working towards making my own bespoke code for the project, which will hopefully be made available to hobbyists on the project’s conclusion.
My goal for this project is to explore unconventional gamepads and methods of play in the modern world, in which gamepads and VR handsets dominate.