Game Development


Concept: 

We wanted to explore outside the screen, and try to create new ways for the player to engage with the game. So we didn’t go very deep into the concept of the game but experimented more with technical possibilities. 

Tangible control: 

Balance board --control the hole’s direction, Spin board---Time counter/pick the hole’s shape to fit only the right shape’s falling objects, pressure sensor.

Fully use Physics: Gravity, No Gravity, Collider, Physical materials.

Experimental coding part (Arudino + Unity + communicating the two):

  1. Our first attempt was testing with four buttons on arduino to control unity player movement. The hardware worked well in Arduino and the player movement is smooth in unity with the keyboard controller. However when we combine the two parts, the movement became a bit glitchy. It might be something wrong with the unity receiving process but we couldn’t be so sure. In the end we managed to minimize the glitch but still couldn’t get it as smooth as using the keyboard directly. 
  2. Then we replaced the buttons with a tilt sensor, which can detect 5 directions including initial horizontal position, left, right, backward and forward. We tried with many different codes, sometimes the player moves too fast that it was gone immediately, sometimes the player could only move in one direction in unity though Arduino could detect all 5 positions, and sometimes the player does not respond to the sensor at all. Our suspicion was that the sensor is not working well, so we replaced it with some other sensors for testing, including a sound detect sensor (not sensitive enough to move smoothly and only have 2 status) and a 2 directional tilt sensor (we tried to use two 2-directional tilt sensor but one of them always overwrites the other one), in the end we got back to the 5-directional tilt sensor, and found out that it wasn’t the hardware part’s problem but the communication method between Arduino and Unity. 
  3. For the communication part, we tried most of the tutorials we could find from youtube and other Arduino websites. Firstly we use digitalWrite(), serialWrite() and serialPrint(), for the buttons and the sound detector, it all worked out well. But for the tilt sensor it couldn’t work smoothly. After all kinds of methods we found that the return method can also be delivered to Unity, and it’s overwriting serialWrite(), also, it could only read numbers instead of strings. At first we had the Arduino part serialWrite(“go Left”) as it’s easier to console, but later found that was disturbing other process and we end up using only return + a number for each direction (0 for left, 1 for right, 2 for forward, 3 for back and 4 for staying horizontal). 
  4. We thought the balance board has enough tilt degree for the sensor to detect but found out that it just wasn’t enough. However adding extra height to the balance board could be dangerous to the player, so we decided to use this one as a demo first and refine it with a proper balance board in the future (takes several days for a new balance board to arrive). 

Visual part & Unity code (Arranging assets and game scripts): 

  1. Sound has always been the most tricky part of all and we don’t know why :( Fortunately it worked in the end. 
  2. We tried to develop a simple and clear visual appearance in order to let the players focus more on the game’s important elements especially when they can be unbalanced while seeing the screen, so a cartoonish shader is what we wanted. Also bright color for the fruits and a little bit unsaturated background would make the falling process much clearer.
  3.  Coding process is a step-by-step process. First we tried to make the fruit collide with a lower surface in order to detect whether the fruit got into the hole or not. However, it seems to have some conflict with the physic engine and at last we manage to use the OnTriggerEnter function by adding one more mesh collider for each fruit. Then we write the code to let them fall randomly by time with the Invoke() & Random.Range (,) function. Then we add the timer to the main game scene and I used Time.timeSinceLevelLoad to count the time starting from loading the scene rather than the game. 
  4. For the UI part, we tried to use big letters and bright colors. Also we made the timer RED when there’s only 10 second left.

Get Go Tangible!

Leave a comment

Log in with itch.io to leave a comment.