CLASSic Art

THE GAME:

For this project our group decided to make a game for school-trips going to the rijksmuseum. We thought of making it a multiplayer game that was going to allow the teachers to make a game, and allowing the children to join this game, and choose from one of 4 teams to compete for the highest score. The goal of the game is to go around the rijksmuseum to look for the 3 given paintings. Once you find the paintings, they will have an AR game tied to them, which will explain the art theory behind the piece, and then continue to a puzzle which includes some of this theory.

 

HOW WE MADE IT:

We thought of the game as a Mobile game because kids these days already have smartphones once they’re seven. But, to still make it safe, we thought of making it a multiplayer matchmaking game, where a special version of the game was given to the teachers, so they could start a match, and the children could join it. We also wanted the teachers to always know where or what the children where doing. So we thought of creating a help button, to inform the teacher if a child ever needs help. And a map, so they could also know where the children are in the museum.

For the map, i decided to make my own little map system, that used the location tracking of the phone, and a simple image with the right longitude and latitude of the upper right corner, and the lower left corner. This way, any map could be implemented, and it would work.

So, for the game the teachers would give the children the name of the match, they could join it, and then be let free inside the museum to explore. At the end the teacher could tell who won, or who got all the puzzles first. And because the children themselves could not see the results, the teacher could even say that everyone won. So there would not be anyone who lost.

Location Tracking Code:

public class LocationTracking : NetworkBehaviour {
	[SyncVar]
	public float latitudeLocation;
	[SyncVar]
	public float longitudeLocation;
    private bool updateStart = true;

	public IEnumerator Start()
    {
    	//Check if player activated location tracking
        if (!Input.location.isEnabledByUser) { yield break; }
		
        //Start tracking
        Input.location.Start(0.5f,0.5f);

		//wait 20 seconds to initialize location service
        int maxWait = 20;
        while (Input.location.status == LocationServiceStatus.Initializing && maxWait > 0)
        {
            yield return new WaitForSeconds(1);
            maxWait--;
        }
        
        if (maxWait < 1)
        {
            print("Timed out");
            yield break;
        }

        if (Input.location.status == LocationServiceStatus.Failed)
        {
            print("Unable to determine device location");
            yield break;
        }
        else
        {
        	//Location tracking succefully activated
            print("Location: " + Input.location.lastData.latitude + " " + Input.location.lastData.longitude + " " + Input.location.lastData.altitude + " " + Input.location.lastData.horizontalAccuracy + " " + Input.location.lastData.timestamp);
            latitudeLocation 			= Input.location.lastData.latitude;
		    longitudeLocation 			= Input.location.lastData.longitude;
            CmdUpdateLocation(Input.location.lastData.latitude, Input.location.lastData.longitude);
        }

        Input.location.Stop();
    }

    void Update(){
        if(updateStart){
            StopAllCoroutines();
            StartCoroutine(loop());
            updateStart = false;
        }
    }

	public IEnumerator loop(){
		StopCoroutine(Start());
		yield return new WaitForSeconds(2);
		StartCoroutine(Start());
		StartCoroutine(loop());
	}

    [Command]
    public void CmdUpdateLocation(float latit, float longit){
        latitudeLocation 			= latit;
		longitudeLocation 			= longit;
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *