Monday, August 29, 2016

CommandLine | Day 9

Time flies. 

So since the pitch I wrote over a week ago I've been working on making a quick proof of concept.

First was my own attempt, which I quickly realised was very inefficient. I was satisfied with my UI and interface, and the concept was slowly taking shape: a battleship game that was more of a crew simulator, with the player issues commands and talks to his/her crew by typing them into a command prompt, much like ye olde computers. However, the scale of the project I envisioned became quite daunting, and I quickly asked my friend Nicolas, who is a way better programmer than me, for help.

CommandLine v1.0

It's in this version that most experimentation happened, like keyword-based commands vs rigid strings, something which I may still want to implement;

The impressive thing here is that it would get the actual names of functions from a 'commands' script, and it would check the string entered in the InputField to those. the code itself became the list of commands.

After a few days of work I started anew, fresh and with the knowledge I gained from v1.0, I started work on v2.0 with a focus on getting the commands read through lists and the unity inspector. A completely different approach to v1.0.

By making a class 'words' and it having a list of itself I could simply make branches of words, making a sentence. Dialogue or command could then be checked and (this is where I realised the difficulty of what I was trying to do) run a function with some variables.

This worked very nicely, but at this point I just asked Nicolas to go ahead and write me some code, which he did almost instantly.

That brings us to the current v3.0, which is based on Nicolas' code and that I will be building upon to get the command and dialogue system up and running. Something about tress and delegates and stuff. SuperTree.

Here's to collaborations.