Menu

Hello JavaScript; A flappy bird game

0 Comments

Hola, I was learning javascript today and in that process, I have started to make this simple game.

A simple Flappy-Bird style obstacle dodging game.

Play the game here!

If you cross a score of 52, honestly Kudos to you!

After using CPP, C# like class based OOPS languages, using JS was a bit of variation. I was so used to classes,  methods & inheritance previously. So it took me a couple of days to grasp the prototype based inheritence.

Class Based vs Prototype Based. Java/CPP follows class based inheritance—a top down, hierarchical, class-based relationship whereby properties are defined in a class and inherited by an instance of that class (one of its members). In JavaScript, inheritance is prototypal—all objects can inherit directly from other objects. Hierarchy is accomplished in JavaScript by assigning an object as a prototype with a constructor function.

The more I used it, the more I admired it. It was brilliantly designed and very flexible. Dynamically you can inherit from anything and make a good use of the base class. But with no compilation, it was a bit tricky to understand what may fail. After all, my project had hardly 3 files, so it was easy to understand and keep a track of dynamic inheritances which I am using. But am yet to understand how bigger projects are managing this.

But none the less, brilliant language and I will be using more of it :)

You can find the source here.

Leave a Reply

Your email address will not be published. Required fields are marked *