Saturday 14 March 2015

A (shortened) journey through Javascript coding



'Learning to code is like learning a new language'

I'm not sure who I was told this quote, could of been my dad, could have read it on the internet, or even just thought of it when I started writing code.

Before coming to university, I did a BTEC in IT alongside A level History and Geography. On my IT course there was a unit on Game Design which we used a program called 'GameMaker'. I wouldn't call this being 'the first time I wrote code' as the software was mainly dragging and dropping premade scripts together, but I did take a step up from the rest of the class asking about writing my own code, specifically a high score table. My teacher went away and found out how and showed it to me, however at the time the few lines of code confused me and so I didn't learn much about it.

After I got my A levels and BTEC and came to university it was time to actually start code, and what a better way than being thrown in the deep end (literally). We started group projects in small groups which I was excited about, however, our team leader wasn't very enthusiastic to do coding. At that point I put myself forward to do the coding and let the other two members of my team do the other work.

I discovered straight away that coding is hard, and without any practise or reading about how to do it was going to be near impossible. In fact, when I made my first piece of code which was a counter which went up every second I was overjoyed and cheered with happiness, it looked something like this:

                              var Timer = 0.0;
                              function Update () { 
                              Timer += Time.deltaTime;
                              }
This took me around an hour to make, with the help of tutorials and looking up online how to write code, and I needed to have more on (making it so that timer would go up at different rates due to different factors and such), but I was satisfied with it for now, and so this was the start of my coding.
Throughout the whole of the first group project I was the only member to do the code. My team leader left halfway through leaving it up to me to do any and all coding for our game. There were plenty of times where I wanted to give up, as well as times where I was doing very well, and in the end I was happy to be put as the coder as I learnt a lot from it.
An example of one of my code files for my group project game

So, now it's the second semester, and we've been put into different groups. In this group there are 4 other members which allows us to have more of us working on the same things. Again I enrolled myself as a coder as I was starting to really enjoy coding the most. Now we're halfway through our group project and so far in coding everything is going well. 

Overall going from having no coding knowledge about 6 months ago to making a basic game is quite an achievement for me, especially as I felt coding was going to be the hardest part of computer games design (which at times it was) but I do hope to keep on going with my coding and start making codes from memory without relying on a tutorial or searching on the web.

No comments:

Post a Comment