Drawing Lines with Unity

with the gl api

Before I move on to the next tutorial on Unity I need to cover a few things. Mainly, how to draw lines using Unity. I’ve decided to port the flight control tutorial I worked on a couple years ago to C# and Unity. And although it is not absolutely necessary to use the drawing API for that particular tutorial, it wouldn’t be as much fun without it.

Dots and Lines: The AI

in unity

Adding an AI player to the game couldn’t be simpler, really. I add a class called ComputerPlayer and I end up using all the same handlers the “human” player uses: HandleTouchDown, HandleTouchMove and HandleTouchUp.

Puzzle Game: Dots and Lines

in unity

This next game is a version of something I used to play when I was a kid but never knew the name for it. You might have played this as well. Basically you draw a grid of dots on a piece of paper. Then two or more players alternate connecting two adjacent dots with a line until you form a square. Squares mean points! So in other words, a kind of tic tac toe.

Rock Paper Scissors Lizard Spock 2

in unity

Now for the second version of Rock Paper Scissors Lizard Spock. This time a puzzle game. The objective is to clear the grid completely, but you can only select tiles by beating them in Rock Paper Scissors… fashion.

Rock Paper Scissors Lizard Spock

in unity

This next game uses most of the logic from the previous game, but turn the traditional Word Game into a kind of match three engine. In this grid the player must select tiles which beat one another at Rock, Paper, Scissors, Lizard, Spock.