Thursday, 7 November 2019

Welcome


Welcome to Unity for Non-Coders
Do you want to create video games?
Do you want to learn how to code?
Do you want to learn Unity?

Then, this blog is for you.

What is this Blog about?

This blog is a guide for Non-Coders (NonC's) who wish to learn and understand coding for Unity.


Why should you read my blog?
Easy, I want you to learn. I am a teacher after all.

There are tons of good information scattered on the internet. It's also true that some information is obscure, incomplete or simply wrong. When that information is correct, it tends to be over-complicated or hard to follow for Non-C's.

Why is it so complicated sometimes?
The answer is 'frustrum'. It's all about scope.

Your scope (say, your actual knowledge) has a "zone of proximal developmet" (Vigotsky). In short, if you are in that zone, you can learn; otherwise, you will see the information as boring or simply as a black hole, ten light years away.

I would like you to find a place to understand coding in a thorough, clear way.

I don't consider myself a good coder but a good thinker. I respect coders so I turn to them to ask specific or advanced questions. Being a coder is more than coding: it is a way of being and thinking. You cannot simply call yourself a coder because you code.

Do I consider myself a coder?
Well, I love to code. I have been fascinated by it since my first code line. What I am is a teacher... and sometimes I put on my developer hat and I work as hard as I can.

Final words
This blog is about my way of doing things. When it comes to good coding, I care about facts. If the code works, fine; if it doesn't, redo it. If there's a better way of doing it, do some research, ask around, experiment, check and recap.
I am not a trained coder so I have to make up with effort.


Paraphrasing what Captain D says: Develop games with your heart, use your brain for everything else.

Syntax

Briefing
In this short entry, through a simple analogy with everyday language, you will understand the concept of syntax in terms of writing code.



What is syntax?
As a starting point and based on the Wikipedia definition, I've come up with this answer:

"Syntax is a set of rules, principles, and processes that govern the structure of a system."

Basically, syntax is analysis of a language structure.



Rules, principles and processes: what does it all mean?

Rules:
They are unchangeable: you can't bend them, you can't break them. It is what it is, period. If you follow the rules, the programme works; if you don't, it doesn't.


Principles:
There are two ways of interpreting this concept:
1. The foundations, the base structure. The core theory behind a programming language. They are highly abstract.
2. Think of a recipe or good practices. Good coders have developed better or more efficient ways of doing things. Those ways have become techniques that can be applied to different situations. You can use them or not.

Processes:
Well... It's the actual putting into practice of those rules and principles when you're coding.



What's programming, anyway?
Programming is just like "writing"... in fact, you "write" programmes pretty much the same way you write anything else.



What's the difference, then?
Easy, programming languages are not natural languages (English, Spanish...): they don't undergo natural processes of development in the same way human languages do.

Human language never stops developing and it's unpredictable. Programming languages are born a certain way and stay that way until a new version is developed and launched.

That's why you have versions tagged 2.0, 3.5 and so on. We don't have an English 2.6... so far.



Anything else?
Yep, in natural languages there are thousands of different operations you can perform, whereas in programming... well, for now, for us, when it comes to C# in Unity, you can only declare or instantiate something.

So, in natural languages you may doubt the veracity or the accuracy of a statement. It simply depends on the context because you can't know its real meaning beforehand — it requires further analysis. That's why we call it "proposition".

But you know how complicated the concept of "truth" can be in real life, right?



In computational programming languages, the concept of truth is binary and absolute. Something is true or not, period.

That's why we talk about "declarations" and "assertions" instead of "propositions". Got it?



⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢⇠⇡⇣⇢


Applying what we've seen so far

Given the sentence:

"I am writing a Blog."


Rules: The rules say that, in a well written English sentence, I need a subject, a verb and, in this case, an object. They also establish that a sentence starts with a capital letter and ends with a full stop.

Principles: can be interpreted in two ways:
1. As theory. We should know tenses, semantics (the meaning of words) and some basic grammar to understand that "I" is the one doing the action and "a Blog" is an object.
2. As practice. We could have just written "by writing this, I declare that I am writing a Blog". That means that, in practice, there are many ways of conveying the same (or similar) meaning.
Process: The actual situation of a person (me) at the computer hitting the keys on the keyboard... thinking and choosing the format, the medium and all the words you are reading.



The same thing applies to programming.

There are rules, there are principles and a process I'm following to write something like this:

public class NameOfTheClass ()
{

}



What does that mean?

Well, we are not going to dwell on the meaning of what that actually means in terms of coding. For now, we can bet that, if it is a piece of code, it surely is based on rules and principles.

That's about it for our short tutorial about syntax, but once you learn about methods and classes, you will thoroughly understand the analogy between coding and writing a simple sentence in, say, English... or any other language.



Where to go from here?
You can go and find out what a method and a class is in the "Method and class" entry on this Blog.



Paraphrasing what Captain D says: Develop games with your heart, use your brain for everything else.
x

Presentation

Who am I?

I am the sum of many instances of myself that, when put together, conform me:

I am Director and co-founder of a small video games studio called Ravenstone.

I have a Master’s degree in Professional Translation (EN<>SP) with double specialisation: new technologies and audiovisuals.

I am a graduate Teacher of English as a Second or Foreign Language (ESL/EFL). I've been teaching EFL at primary and secondary schools for eight years.

I am a 3D artist (Blender) > Props, level design, level art.

I am C# programmer (Unity). So, I am also a game developer.

I am a game designer.

I am a proffesional musician (my pseudenym Mordred-X)

I love to study. I love to learn. I love to know. I love everything I do, thoroughly.