Build Your Own Game (BYOG).

Highlighting the reasons why creating at least one game from scratch is essential for developers in general and front-end web developers in particular.

In recent times, there has been a lot of emphases given to learning how to code. This may be because lots of startups and companies want good coders. Or our generation has come to a point where they believe programming is one of the top needs for progress. This has given birth to many startups including Codeacademy (one of the first), CodeSchool (my favourite!), Learnstreet (funded by Vinod Khosla) etc. and a revolution at

“Everybody in this country should learn how to program a computer because it teaches you how to think. — Steve Jobs”

If programming is so important, then what’s the problem — the pain point. They are these two kinds of people: Those who don’t know programming and the others didn’t enjoy their first experience with it. It’s relatively easy to teach programming to people who don’t know it but want. Majority of these sites work like a charm for them. That’s understandable because anything with good content is useful for people who are interested.

But what about people who lose their interest as soon as you ask them to code a calculator in C on a boring console.

I can relate to this. I am a Computer Science Major. I liked programming complex C/C++ problems, understanding how the Operating System works and even the RISC/CISC Architecture in Microprocessor. But they were all boring at one time. Some of the reasons were:

  1. I felt it unnecessary to program a scientific calculator or even write complex sorting algorithms when I knew the outcome of the program and maybe I could have solved the same problem without needing a computer. That being said, I liked some very complex problems from Euler where the input dataset was so large that the best way to solve the problem was to write an efficient program.

  2. I could never relate to its use. I mean in a real-world scenario where will I witness it and where will I use it. Is it not the whole idea of programming to create something that solves a real-world problem. Sadly when I started, I could not understand how a hash algorithm or an automata theory can change how machines work.

  3. Code is as at times as good as the design — the interface that communicates with the end user. The way a normal button is positioned, it animates and reacts to an action. Design is important, but its introduction comes far too late.

A decade back when there were no CSS3 and HTML 5, and every site looked like just a wireframe, Javascript was only used for some basic animations and alert boxes and we had set of tools provided by Windows Forms to build desktop apps, there were some brilliant 2D and even 3D games that were being developed. Even now irrespective of whatever device you are on— most games are much better and well thought through than apps, websites and software. Why so? We have a similar pool of programmers in both these fields. Why is every single interaction — touch, mouse or keyboard — so precisely defined in games. Why is making a multiplayer game with a 3D Surrounding more doable than a collaborative environment on the web such as one we are making at WhiteShark.

This makes me think if the level of both programmers and designers are better in game development/design. Or wait for a second, are they more interested somewhat!

Let’s think about it in detail.

  1. When I am creating a game, there are some game mechanics or physics involved. There may be an angry bird thrown like a parabola or a paper jet steering in the air and its direction being influenced by the wind blowing. These situations are more real. We have witnessed them in our day to day life. We know that if our game is not matching our experience, there is some problem.

  2. I feel it’s imperative only to create things that you will love to use at the beginning. It’s necessary also because once you start using something that you have build, you can answer this fundamental question —Do I like it? If the answer is yes, there is a high possibility, that you will keep going. Now consider a scenario, where a programming class is building a Library Management System. Do you think every student will use that LMS system after they have to make it? Now consider a team working on creating a cool game like Temple Run. Now guess what will be the answer.

  3. Try explaining Object Oriented Programming like C++ to a novice user. Ask them to write the same program that they built in C, taking the “advantage” of a Class, Inheritance, Modular programming etc. His first reaction will be — Why do I need to spread the same thing in separate files creating a useless class and defining and calling methods when I can write it in one file?
    I understood the concept of OOP’s and how small things in code can bring a lot of change during the process of creating games. To create multiple enemies I had no option but to create a class, and then create objects of the enemies. Also, some of the sprites (heroes/enemies) in games had some of the same properties but few different ones as well. That’s where I felt the need of Inheritance.

Coding has to be fun. It has to be purposeful. It has to be something that we feel excited about, can relate to and then cheer at the AHA! Moment. Whether you are teaching or learning to programme, try creating a game. You will not have to memorise the concepts. It takes years to understand that everything in a HTML page is like a box with width = actual width + border + padding + margin. There is a high chance that you will miss or ignore some of the pixels, but when you were creating a game where two such boxes are colliding, every pixel will matter.

Interest matters.


Now read this

Game-Based Courses.

Earlier this year, during a small stint at UNESCO MGIEP, I got a chance to lead Games for Learning team at the institute. The team only had one full time and one part-time member when I joined. The first thing that we needed to do was to... Continue →