Finalized Terminal Hacker:

Having finished Terminal Hacker, I thought I would put my results here. Some of the functionality, particularly the time delays was something that I pulled over from the Unity 2D course (coroutines).

I need to give special thanks to @mortepcandvr for the Quit code function.
(How do I make the quit button work for WebGL?)

http://www.sharemygame.com/share/ee170f27-5da7-47b5-a62e-69aafebaa18d
(Posted September 7th, 2018 so good until October 7th, 2018)

2 Likes

My pleasure to be of any help! - and not to forget, the original poster for that technique was actually @Rob, I only added some test results on timing and memory/processor usage :slight_smile:
One good thing I like about Unity Coroutines (IEnumerator return type), (unlike the .NET System.Threading API,) they don’t complain as much about not being on the [UnityEngine] mainthread when you try to interact with other gameobjects.

Thanks to the difficulties with getting StopCoroutine to actually work (just google “stopcoroutine not working”)
I was working on a reliable method for remotely signalling Coroutines to self-destruct/end (using bool flags rather than callbacks/events) but there are several possible techniques [besides StopCoroutine] - (a) initiate a singleton Coroutine (single IEnumerator returned) so you only have to worry about one Coroutine for a given method running at a time and (b) save that IEnumerator handle for a given Coroutine so you can remote-kill it at any time with StopCoroutine
https://docs.unity3d.com/ScriptReference/MonoBehaviour.StopCoroutine.html

I’ll keep working on it :slight_smile:

2 Likes

I have to say this was a really good take on the Terminal Hacker game. You didn’t just quit when the lecture was over you refined it to be a full game. Awesome job!

Privacy & Terms