Making a game in JavaScript

For the past few months I’ve been working on a game using JavaScript. I’m a much better programmer now than I was when I started. Here are some pros and cons so far:

Pros:

  • Loads of references online
    • I’ve never had much of a problem finding out how to do “normal” JavaScript stuff. I did run into problems when I was using a small animation library as it seemed nobody had tried to use it for gamedev on an html canvas. Ended up removing the library entirely.
  • JavaScript is very forgiving
    • Its very easy and doing stuff in a weird way will usually end up working. This is a double edged sword as I have to do quite a lot of refactoring after each feature.

Cons:

  • Libraries are confusing
    • I struggle with libraries because I don’t know exactly how it works, and always have questions which are not answered online, thus I end up making most features from scratch.
  • Can’t do stuff with local files
    • Annoyingly JavaScript seems to be restricted from reading or writing local files for “security” reasons. Not sure if Node would help me get around this but need to look into it.
  • Compiling to an app store compatible format is tricky
    • I’m planning to use PhoneGap to compile the project (if I ever finish it) which limits you to one project, and then you have to pay. It also doesn’t seem very well supported any more. Need to look into alternatives.

I hope to have something to show soon, but until then its just going to be me ranting about JavaScript.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s