It’s been a couple of days since the last update, and I’m making good progress so far!
The game looks mostly like I want it to look (except for the player ship that’s going to get a reworking tomorrow). Collision detection works, garbage collection works, the basic game script is in place. I’m still missing the final boss, and also the miniboss I’ve got so far is probably the easiest opponent in the whole game.
The whole thing can be played through in about two minutes - that’ll probably go up a bit with said final boss, maybe to three minutes. But I don’t think somebody who has never played a shmup before will beat it on the first try.
What’s still also missing is a scoring system that actually produces reasonable results and makes getting a high score actually challenging. So far, every run that makes it to the end will have exactly the same score - that’s not really interesting.
Kongregate statistics integration is mostly there and already debugged. Music is in place, as are some sound effects - though one or two of those are still missing.
In total, I have spent about 10 hours with this project, which is less than I hoped to do, but I’m still dealing with The Move™ and searching a job, which takes up some time as well and is the reason I gave me a whole week of time for this. Five hours or so are still missing until the whole thing is finished, I guess.
On a side note, the script that spawns enemies is probably the worst bit of code I ever wrote and I really, really have to share it with you.
[code language=“csharp”] using UnityEngine; using System.Collections;
public class GameScript : MonoBehaviour {
public GameObject starryThingPrefab; public GameObject magnetThingPrefab;
public GameObject minibossBannerPrefab;
private float timeElapsed = 0;
private bool encounter1triggered = false;
private bool encounter2triggered = false; private float encounter2time = 0.0f;
private bool encounter3triggered = false; private float encounter3time = 0.0f;
private bool minibossBannerTriggered = false; private float minibossBannerTime = 0.0f;
private bool minibossTriggered = false;
private bool encounter1Atriggered = false; private float encounter1Atime = 0.0f;
private bool encounter2Atriggered = false; private float encounter2Atime = 0.0f;
private bool encounter3Atriggered = false; private float encounter3Atime = 0.0f;
private bool finalBossTriggered = false;
private bool scriptFinished = false;
public void Update() {
if (scriptFinished) return;
timeElapsed += Time.deltaTime; if (!encounter1triggered) { TriggerEncounter1(); return; }
if (!encounter2triggered) { if (timeElapsed >= 5) { TriggerEncounter2(); } return; }
if (!encounter3triggered)
{
if (GameObject.FindObjectOfType
if (!minibossBannerTriggered)
{
if (GameObject.FindObjectOfType
if (!minibossTriggered) { if(timeElapsed > minibossBannerTime + 5) // no more enemies! { TriggerMiniboss(); } return; }
if (!encounter1Atriggered)
{
if (GameObject.FindObjectOfType
// check if game is finished
if (GameObject.FindObjectOfType
private void TriggerEncounter1() { encounter1triggered = true; GameObject enemyA = (GameObject)Instantiate(starryThingPrefab); GameObject enemyB = (GameObject)Instantiate(starryThingPrefab);
enemyA.transform.position = new Vector3(3.5f, -7, 0);
enemyA.GetComponent
enemyB.transform.position = new Vector3(3.5f, 7, 0);
enemyB.GetComponent
private void TriggerEncounter2() { encounter2triggered = true; encounter2time = timeElapsed; GameObject enemyA = (GameObject)Instantiate(starryThingPrefab); GameObject enemyB = (GameObject)Instantiate(starryThingPrefab);
enemyA.transform.position = new Vector3(3.5f, -7, 0);
enemyA.GetComponent
enemyB.transform.position = new Vector3(3.5f, 7, 0);
enemyB.GetComponent
private void TriggerEncounter3() { encounter3triggered = true; encounter3time = timeElapsed;
GameObject enemyA = (GameObject)Instantiate(starryThingPrefab); GameObject enemyB = (GameObject)Instantiate(starryThingPrefab);
enemyA.transform.position = new Vector3(3.5f, -7, 0);
enemyA.GetComponent
enemyB.transform.position = new Vector3(3.5f, 7, 0);
enemyB.GetComponent
GameObject enemyC = (GameObject)Instantiate(magnetThingPrefab);
enemyC.transform.position = new Vector3(8, 0, 0);
enemyC.GetComponent
private void TriggerMiniboss()
{
minibossTriggered = true;
GameObject miniboss = (GameObject)Instantiate(starryThingPrefab);
miniboss.GetComponent
private void TriggerEncounter1A() { encounter1Atriggered = true; encounter1Atime = timeElapsed;
GameObject enemyA = (GameObject)Instantiate(magnetThingPrefab);
enemyA.transform.position = new Vector3(3.5f, -7, 0);
enemyA.GetComponent
private void TriggerEncounter2A() { encounter2Atriggered = true; encounter2Atime = timeElapsed;
GameObject enemyA = (GameObject)Instantiate(magnetThingPrefab);
enemyA.transform.position = new Vector3(3.5f, -7, 0);
enemyA.GetComponent
GameObject enemyB = (GameObject)Instantiate(magnetThingPrefab);
enemyB.transform.position = new Vector3(3.5f, 7, 0);
enemyB.GetComponent
private void TriggerEncounter3A()
{
encounter3Atriggered = true;
GameObject enemyA = (GameObject)Instantiate(magnetThingPrefab);
enemyA.transform.position = new Vector3(3.5f, -7, 0);
enemyA.GetComponent
GameObject enemyB = (GameObject)Instantiate(magnetThingPrefab);
enemyB.transform.position = new Vector3(3.5f, 7, 0);
enemyB.GetComponent