This weeks theme was “Peace” or “Piece”, it was left rather ambiguous…
The object of the game is to prevent unrest from rising. You start off doing this by your presence and staring at groups of people, as the people get more unruly you unlock new tools to put them in their place.
We had a week to make it but in reality I probably only had 8 hours in total to work on it.
There is some basic leaderboard support, players who maintain the peace longer earn higher placing.
I managed to write some code that will scan the \Roms\ directory for any file ending in “.gb” and store them in an array of strings so that they may be called whenever the user wants to load a new game!
Then we instantiate a 3D model for each ROM and store that in a list.
var info = new DirectoryInfo(path);
var fileInfo = info.GetFiles();
int i = -1;
foreach (FileInfo file in fileInfo)
string romName = file.Name.TrimEnd('.', 'g', 'b');
GameObject InstantiatedRom = Instantiate(romToInstantiate,
new Vector3(transform.position.x - (i * 0.1f), transform.position.y,
transform.position.z - (i * 0.1f)), transform.rotation) as GameObject;
InstantiatedRom.transform.parent = gameObject.transform;
I also added the ability for the user to pull in any labels for their ROM collection. In the loop we put the following:
if (romCarts[i].name == romList[i])
StartCoroutine(GetLabel("file://" + path + file.Name, i));
Then we make the function that pulls the images in as Textures:
public IEnumerator GetLabel(string URL, int index)
var www = new WWW(URL);
yield return www;
romCarts[index].GetComponent().labelGO.renderer.material.mainTexture = www.texture;
I just need to add some controls to help navigate through them and then I’ll be releasing a new version!