How to play :

  • Click the window to enable game and sound

  • Point with the mouse the desired direction

  • Use the arrow keys on your keyboard to accelerate

“Glitch City” is a 6-hour production flash desktop game demo I recently built [desktop version only].

I consider creating games a great help for thinking about mobile app XR applications.

The gaming environment offers a multi-disciplinary approach to any sort of problem. Storytelling, 3D Modeling, Animation and Sound turn into a unique gesture, where players subconsciously can contribute to the evolution of the virtual space that has been created.

Here is a short breakdown of what you are currently playing.

JPG03.jpg

Circulation & Camera Motion

void Update()
{
rotationX += Input.GetAxis("Mouse X") * lookSensitivity * Time.deltaTime;
rotationY += Input.GetAxis("Mouse Y") * lookSensitivity * Time.deltaTime;
rotationY = Mathf.Clamp(rotationY, -90, 90);

transform.localRotation = Quaternion.AngleAxis(rotationX, Vector3.up);
transform.localRotation *= Quaternion.AngleAxis(rotationY, Vector3.left);

rb.velocity = Vector3.zero;
rb.velocity += transform.forward * Input.GetAxis("Vertical") * Time.deltaTime * speed;
rb.velocity += transform.right * Input.GetAxis("Horizontal") * Time.deltaTime * speed;

JPG06.jpg

Colliders - Accessibility

void Start()
{
Cursor.lockState = CursorLockMode.Locked;

rb = GetComponent<Rigidbody>();
}

void OnCollisionEnter(Collision collision)
{
if(gameObject.CompareTag("Collider"))
{
speed = 0f;
}
}

JPG02.jpg

Scale 1D - Clip Loudness

currentUpdateTime += Time.deltaTime;
if (currentUpdateTime >= updateStep)

{
currentUpdateTime = 0f;
audioSource.clip.GetData(clipSampleData, audioSource.timeSamples);


clipLoudness = 0f;
foreach (var sample in clipSampleData)
{
clipLoudness += Mathf.Abs(sample);
}
clipLoudness /= sampleDataLength;

SoundscapeScales = GameObject.FindGameObjectsWithTag("SoundscapeScale");
foreach (GameObject r in SoundscapeScales)
r.transform.localScale = new Vector3(1, clipLoudness*3, 1);

JPG01.jpg

Rotation - Clip Loudness

SoundscapeRotates = GameObject.FindGameObjectsWithTag("SoundscapeRotate");
foreach (GameObject r in SoundscapeRotates)
r.transform.Rotate(0, clipLoudness *8, 0, Space.Self);

JPG04.jpg

If Condition

void Update () {

Distance_ = Vector3.Distance(Pos1.transform.position,Pos2.transform.position);
if (Distance_ <50)

{
Debug.Log("NOW THE CITY CHANGES!");
Obj1.SetActive(true);
Obj2.SetActive(false);
Obj3.SetActive(false);
Obj4.SetActive(true);

GetComponent<Aberration>().enabled = true;
GetComponent<Sharpen>().enabled = true;
GetComponent<EdgeFilter>().enabled = true;



}
else if (Distance_ > 50)

Simplest prototype scene : here a list of consideration post build.

  • UI simple concern - Mouse click input is not needed to switch a condition.

  • Nesting Conditions - Distance triggers sound -> Sound triggers scale > Scale might be triggering something else.

  • Gaming Environment - City Grid - suggesting the trigger, but not completely.

What might be coming next :

  • Building as colliders > Sound as condition for altering presence of colliders > Spatial boundaries undefined in time.

  • More players. etc.

“ City asset by Anton Moek.

“ Code, Materials, Sound by myself.

“ Tested on Google Chrome and Safari.