Afference

Screen Shot 2017-03-31 at 1.37.17 AM.png
Game File (Linux): 
Game File (Mac): 
Game File: 

A lonely entry to the Spektrum Crush "Permadeath Radio" Jam.

Possible epilepsy warning.

Wander around. Touch things. Stare. Hum.

When you reach the yellow area, there is no further to travel. Quit at any time.

Controls:

WASD to move.

Mouse to look.

Space to jump.

E to interact.

Credits:

Uses the First Person Drifter control by Ben Esposito.

Piano sample is Frank Levy playing Chopin's Op. 32 No. 1 (Nocturne No. 9 in B Major), under Public Domain license, via musopen.org. I've modified it in various ways.

Various paid & free assets from the Unity Asset Store were used/repurposed.

Made For: 
An event

Comments

clyde's picture

I really like how the

I really like how the gaze-attractive movement from the first scene informs the dérive in the third(?)
It was a beautiful game to play. Even though you said it was over in the yellow room, I found myself trying to press the button-looking cube-monolith in the center because it resembled the quadruped buttons.

I have a technical question: Are the red dots on the 3d grid in the yellow room particles or gameObjects? I often want to make a large amount of duplicates without them being game-objects; I just want to determine their transforms and render them but I don't know a good way to do that.

Controlling Particles at Runtime

Thanks for the feedback! They are indeed particles. It sounds like Unity has been making substantial improvements to rendering large quantities of prefabs, but some things just look better as constellations of billboard quads.

Here's a stab at illustrating the bits involved:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ParticlePlacer : MonoBehaviour {

	ParticleSystem pSystem;
	ParticleSystem.Particle[] particles;
	int totalParticles = 0;

	void Start () {
		init ();
		demonstrate ();
	}

	void init() {
		// Note: If you want to set up the system in the scene editor, this involves a bit of repetitive setup before things will work.

		// I think the minimum is: 
		// - Disable the emission module.
		// - Set simulation speed to 0 (unless you want the other forces/etc. applied).
		// - Assign a material.

		// Also, make sure the global/local space setting is what you intend.
		// (This determines whether the GameObject's transform affects the particles.)

		pSystem = gameObject.GetComponent ();

		// Here's an example of how one might set up a new system at runtime, if you want to go that route.
		if (pSystem == null) {
			pSystem = gameObject.AddComponent ();
			ParticleSystem.EmissionModule emissionModule = pSystem.emission;
			emissionModule.enabled = false; // Disable emission.
			ParticleSystem.MainModule mainModule = pSystem.main;
			mainModule.simulationSpeed = 0; // Stop the default particle gravity/forces/animation/etc from running.

//			// If you want to build everything at runtime, you'll probably want to adjust the renderer too:
//			ParticleSystemRenderer pRenderer = gameObject.GetComponent ();
//			pRenderer.material = yourParticleMaterial; // (If you don't set this, you'll get pink squares)
//			pRenderer.renderMode = ParticleSystemRenderMode.VerticalBillboard; // (Change this if don't want standard billboard particles.)
		}
	}

	void placeParticles(Vector3[] positions, Vector3 offset, float scale, Color32 color) {
		// For placing particles, the steps are pretty simple:

		// Build an array of particles.
		totalParticles = positions.Length;
//		pSystem.Emit (totalParticles); // If you want to configure everything in the ParticleSystem component, use this to generate the initial particle data.
		particles = new ParticleSystem.Particle[totalParticles];
//		pSystem.GetParticles (particles); // If you want to configure everything in the ParticleSystem component, use this to retrieve the initial particle data.

		// Edit/define each particle (e.g. with positions, etc).
		for (int i = 0; i < totalParticles; i++) {
			ParticleSystem.Particle p = particles [i];
			p.position = positions [i] + offset;
			p.startColor = color;
			p.startSize = scale;
//			p.rotation3D = Vector3.zero; // use rotation3d for rotating meshes (and apparently this prop is not a Quaternion?)
			particles [i] = p; // This looks weird, but it's absolutely necessary, because these are values, not references.
		}

		// Assign the array of particles you just described to the particle system.
		pSystem.SetParticles(particles, totalParticles);
	}

	void demonstrate() { // This is just for testing. (But it still looks nice.)
		List positions = new List ();
		for (int i = 0; i < 1000; i++) {
			positions.Add (Random.onUnitSphere * 5);
		}
		placeParticles (positions.ToArray(), this.transform.position, 0.2f, Color.blue);
	}
}

clyde's picture

Thanks. It is more complex

Thanks. It is more complex than I imagined. I'll try it out.

What a fascinating

What a fascinating experience!
Felt like I was wandering around the mind of an architect, the high-contrast and flat characteristics of this game's color schemes really hit me as sort of both mechanical and human at the same time.
Neat!