HMTL5/Canvas

Okay, I had to build a html5/canvas game? Doesn’t sound too bad right.

My first initial problem was, getting an idea! After a long time and not a lot of patience I started with the idea that I wanted to make an endless like Google’s ‘offline dinosaur’. I thought great, I’ve got an idea and I went about planning how to build it. Then realised, that I didn’t really want to do that but instead build a ‘platformer’. Ok, not really a problem seen as I was only a couple of days into the endless runner and coming from basically no Javascript experience I hadn’t really done much… So building a platformer turns out not to be that hard in fact. but, my initial idea for this was to create a kangaroo platformer, basically because at the time I couldn’t think of anything that jumps.. So I built the basics of the game, which put me up to the step where I was jumping on top of platforms and going from level to level. I was happy with my progress, as all of this was achieved in only a couple of days πŸ™‚ I thought great, I’m off to an awesome start! But something didn’t feel right about the kangaroo? Like, what was going to be the background picture? So I came up with this idea of using a pirate? Kind of a why not idea? I think it turned out pretty well, and I was very happy with my result of the overall game πŸ™‚ (All images created by myself) It turns out after hours of struggling to understand how Javascript was ever a language in the first place? (Mainly because I hated using it) now I’m getting used to how it all works. And…. It’s pretty simple. I feel I’ve grown as a developer and won’t say no to anything Javascript again, in fact I really enjoyed building this game.

How I went about building the game you ask? Well, I did start with a very basic tutorial which taught me how to have a player and how to jump onto platforms. The rest was down to me (building the layouts of the game, placing the coins, if statements, for loops, etc…) I was surprised at the fact I ended up building this game in around 2 weeks. So the very basic layout of the code goes like this. Start on level 1, load set platforms and coins. Once treasure hit, add one to the variable level making it move onto the second level and load different specific platforms and coins. And repeated that once more for the final level. An if statements was at the base of all this layout. I definitely think my code could become more robust as I have a lot of repeating chunks of code. That could be placed into functions if I had the time and know how.

I was uploading all of my code to github every step of the way. Hit this linkΒ to see.

Leave a comment