Koding Kevin (KK) was the game I developed alongside my dissertation for university. The aim for this game was to create an interactive learning platform to help teach student to learn programming. The idea was that teachings could be disguised as elements of a video game and to be self-contained within the one application/game.

From researching other applications and tools to help teach both children and adults programming I found that there are a small number of games that attempt to follow this pattern. With most learning platforms there is a certain element of 3rd party assistance is required, whether they are from the internet (youtube and written tutorials) or from a teacher, I wanted to explore whether an all in one solution would achieve this, and still be fun as it is a game after all. However, I wanted the game to simulate actual programming rather than a visual method of programming used by certain applications.

Using a similar platform that I had use to develop a previous project I used a 3rd party plugin (developed by Tiaan Geldenhuys) for Unity 3D that would allow the player to reveal command line interface (CLI) and input code and use code to manipulate game objects. For example, in order for the player to push a button on the other side of a wall, the player could instantiate a cube on the other side of the wall which could drop onto the button, by manipulating the game using the CLI.

However, what initially started with a simple idea of how to teach students how to learn programming, the project had evolved into a quite well rounded method to teach a number of other subjects, including maths and physics… With further development this project could lead to more subjects covered within the one game.

 

 

Code Snippet:

using UnityEngine;
using System.Collections;

public class Create : MonoBehaviour {
	
	public static void Block(int x, int y)
	{
		//find player game object
		GameObject player = GameObject.Find("Character");
	//	Debug.Log(player.transform.direction);
		 Vector3 playerDirection = player.transform.TransformDirection(Vector3.right);
		Debug.Log("Players current direction is: - " +playerDirection.z);
		
		
		if (playerDirection.z < 0.1)
		{	
			GameObject.Instantiate(Resources.Load("block"), new Vector3(player.transform.position.x + x, player.transform.position.y + y, 0), Quaternion.identity);
		}
		else
		{
			GameObject.Instantiate(Resources.Load("block"), new Vector3(player.transform.position.x - x, player.transform.position.y + y, 0), Quaternion.identity);
		}
		
		
		Debug.Log("Block Created");
		//return myString;
	}
	
	
	public static void Sphere(int x, int y)
	{
		//find player game object
		/////////////////////////
		//Need to find direction/
		/////////////////////////
		GameObject player = GameObject.Find("Character");
		Vector3 playerDirection = player.transform.TransformDirection(Vector3.right);
		
		if (playerDirection.z < 0.1)
		{	
			GameObject.Instantiate(Resources.Load("sphere"), new Vector3(player.transform.position.x + x, player.transform.position.y + y, 0), Quaternion.identity);
		}
		else
		{
			GameObject.Instantiate(Resources.Load("sphere"), new Vector3(player.transform.position.x - x, player.transform.position.y + y, 0), Quaternion.identity);
		}
		
		Debug.Log("Sphere Created");
		//return myString;
	}
	
	public static void Stair(int x, int y)
	{
		//find player game object
		GameObject player = GameObject.Find("Character");
	//	Debug.Log(player.transform.direction);
		 Vector3 playerDirection = player.transform.TransformDirection(Vector3.right);
		Debug.Log("Players current direction is: - " +playerDirection.z);
		float playersCurrentX = player.transform.position.x;
		float playersCurrentY = player.transform.position.y;

		
		
		if (playerDirection.z < 0.1)
		{	
			GameObject.Instantiate(Resources.Load("Stair"), new Vector3(player.transform.position.x + x, player.transform.position.y + y, 0), Quaternion.identity);
		}
		else
		{
			GameObject.Instantiate(Resources.Load("Stair"), new Vector3(player.transform.position.x - x, player.transform.position.y + y, 0), Quaternion.identity);
		}
		
		
		Debug.Log("Stair Created");
		//return myString;
	}
}




Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.