Tuesday, June 12, 2007

Computers Talk? Part 1

So, you’ve been a gamer most of your life. You fell in love with video games. One day you realize you can make your own games, wouldn’t that be cool. You begin researching the subject and you realize you have to learn computer programming languages. You say, okay let’s get started and you buy a bookshelf worth of computer programming books. You open them up and you begin to read what these computer languages are about and they start teaching you about the basics of programming. As you continue to read, the more confused you get about computer programming. You begin to ask yourself HOW IN THE HELL CAN SOMEONE DEVELOP A LANGUAGE FOR COMPUTERS?
My dad majored in computer science and I remember that was the first question I asked him when I tried to learn HTML for the first time; a computer language used to develop websites. My dad told me he used to teach some classes when he was a grad student and his students would ask him the same thing.
Understanding the concept of using a computer language is not too hard to explain, but when you have no direction, learning a computer language can be confusing and difficult. Today I’m going to try and help you understand this concept through teaching you the easiest programming language ever; HTML. I know that you want to make video games, not websites. This is the first language I learned and it really helped me develop a base to understand the overall concept of computer programming. If you don’t understand this, it will be very difficult to write programs, let alone make video games.
If you just bear with me, you will develop a much greater understanding of computers and languages and you will put yourself ahead of everyone else who has already stopped reading this blog.

Let’s begin.

The first thing you need to understand when looking at computer programming and games is the program that is developed for the game tells everything that system needs to do. In order to write the program you need to use a computer language to do this. Computer languages were developed because once computers were invented during the 1950s, people realized that they can’t just talk to their computers using our ‘human-style’ languages. We had to develop computer languages with rules and guidelines that the computer could understand. Like Spanish, English or eve latin, computer languages also have their ‘grammar rules’ and ‘sentence structures’. Each line of coding has to be grammatically correct or the computer will not understand what you are telling it and your program won’t work. It’s as simple as that. The hard thing is learning the grammar and the rules and being able to apply them. Since I’m going to be teaching you HTML, it will be much easier for you to understand the grammar concept of computer programs.
One thing to remember before we start is each language has their own set of grammatical structures and rules that you need to follow. Some are more similar than others, but just remember to keep that in mind.

The Language of Websites
HTML stands for Hyper Text Markup Language. This language is used to tell the Web Browser how this page will be shown and designed. What’s really cool about using HTML is you can write the program using Word or even NotePad. (Ironically enough NotePad is the better choice of the two.) So to begin, you will need to open NotePad, or a program that is equivalent.
The overall structure of writing an HTML document (think of it as writing formalized paper) has the same basic structure as every web page ever written. This is what it looks like:



Like in any language, you need a subject in each sentence so the person you’re talking to know the people, things, places or ideas you’re talking about. It’s the same when writing in HTML. As you can see there are angle brackets, < >, around the words HTML, HEAD, TITLE and BODY. These brackets tell the computer that this is the subject I want to talk about.
The first subject is , which signals the beginning of a document written in the language HTML. The second subject is which signals the section of the document where you put general information about your webpage, such as the

No comments: