Made for the Rising Star 2017 competition from a limited starting codebase. This game came first in the round it was created for.

Competition

I made this game for the 2nd round of the “Sumo Digital Rising Star” Competition. I was one of five finalists and came first in round two with this game.

For the second round of the competition, contestants were given an existing unity project to build upon to make any game they wished. I created this game, Intersect and it came first in the round.

I’d had the general idea for the game in my head for a while. I remembered playing a flash game or something many years ago but I had no idea how I’d find it again to reference so I just worked from memory as to what the mechanics were, remembering more about separating the balls than taking area. Over time i realised I’d misremembered the mechanics and so began focusing more about the area capture mechanics over the separating balls mechanics.

The games were marked by industry professionals and I received three pieces of feedback for Intersect:

  • Judge 1: Jezzball inspired - difficult/overly precise input mechanics, really really nice audio effects, generally nicely polished/shippable, online scores!

  • Judge 2: Solid implementation of a well-established game style. It would benefit from clearer communication to the player (either at the start of the game or via the tutorial) that lines initially must be drawn between the borders of the screen. The game would benefit from some more work on polishing player reward for key achievements - e.g. having effects and animations when you achieve a good score, etc.

  • Judge 3: Very fun and original. I have no remarks about the code, everything seems fine. Only use of http requests and server data in my group, very impressed!

About the Game

“Left-Right Algorithm” Write-up - Custom Algorithm

Algorithm Code

The hardest part in making the game was working out how to calculate the area that the player has cordoned off each time they drew a line. In theory the player could draw polygonal areas with an arbitrary number of sides, correctly identifying the area they have created and colouring it in was quite difficult.

I spend a good few days near the beginning talking to friends to get ideas on how to accomplish this task. I ended up combining several ideas together to create a general outline for how the algorithm should work. I referred to the algorithm as the “Left-Right” algorithm due to how it checked the left then right sides of the line.

The key points

  • Every line draw by the player would snap to the line grid, ensuring all the lines were connected
  • Whenever the player finished drawing a line, the algorithm would first run to find the area on the left side of the line, then the right side
  • The key idea was to slowly build up the polygonal area one vertex at a time

Area Calculation and Creation

  1. We iteratively explore from the start and end vertices of the drawn line
  2. Each iterative step takes a starting vertex and attempts to find the next vertex along the line the starting vertex is resting on
  3. Using this, we build our polygon from both ends of the drawn line at the same time, stopping when both ends meet
  4. We now have the set of vertices describing the polygonal area that has been cordoned off
  5. We can then split this polygon into triangles so that we can easily calculate area and draw it to screen
  6. We then check that none of the triangles contain a ball. If they don’t then the area can be added to the total cordoned off area.
Gif visually explaining the algorithm

Gif visually explaining the algorithm

Global Leaderboard

One of the suggested features for the game was a leaderboard so the day before submission I decided to add one. I decided if I was going to have to faff around with reading a local file I might as well make a global leaderboard using a website api to add and retrieve. This feature ended up taking the entire day (which seems obvious in hindsight). I created a simple node.js app that would store the top 10 scores, storing them in a mongoDB database. The client would be able to get and post to the website to get the top 10 scores and post it’s own score to the leaderboard if it beat one of the top 10.

Setting up the leaderboard server and web requests was relatively straightforward (I had done most of this a couple of years previous in my event planner project), so I managed to do it quite quickly. A large portion of the time to implement the leaderboard was spent struggling with Unity’s GUI system. I had great difficulty making things line up nicely.

The global leaderboard functioned well and had the desired effect among my playtesters, many of them played the game multiple times in a row, trying to beat another person’s score, adding additional replayability to the game.

Music and Sound Effects

I had two initial ideas for the music, one was a traditional approach - a calm, laid-back song playing in the background. The other idea was for the music to be created “live”. To make the music to be based on what’s happening in game by attaching the notes to the balls colliding with a wall.

I went with the second approach, but inn order for the music to not get boring I couldn’t just use a single chord for the whole game. Instead I chose to have the chord change every time a line was successfully drawn. Whenever a ball collided with something it would pick a random note from the current chord to play and when a line was started or finished it would play the root of the current chord (though an octave down from the ball notes).

This system worked very well and was very pleasing. A nice upshot of attaching the notes to the balls is the relatively random timings you would get between notes. As you progressed through a level and cordoned the balls into smaller areas or played levels where the balls moved faster, they would collide more often and so the time between notes would decrease. This helped to increase the intensity of the music as you got to harder levels or got closer to finishing your current level which was a nice bonus.

I’d like to thank my friend cesque for providing the audio clips for the game.

Dev Images

First draft of left-right algorithm

First draft of left-right algorithm


Adjusted colour scheme

Adjusted colour scheme


Added levels and score

Added levels and score


Attempting to work out splitting polygons into triangles

Attempting to work out splitting polygons into triangles