I remade '79 Asteroids, using only stuff I learned through chapter 16 in EloquentJavascript

I’ve determined that I learn best by exposing myself to new stuff, then finding building some project that implements that new stuff (sorta ‘cementing’ it in). I’ve been working through the ElequentJavascript.net book since May and around a month ago I figured that I knew enough to rebuild the oldschool Asteroids arcade game.

I think it is interesting because it doesn’t use any concepts that aren’t covered by the end of chapter 16 in EJS (well, minus destructuring - I stumbled onto that and it’s useful as hell, so I used it). Because of this, the entire game is inside a huge 1100 line JS file and there are no sounds - I haven’t learned yet how to use multiple files or use a resource hosted on a server somewhere else.

I did learn and use Git, which wasn’t covered by EJS.

As a game, it isn’t great. It’s too hard, for one. Thankfully I didn’t set out to learn addicting game design, because I would have failed that lol.

Other cool thing is that, since I know the organization of the program super well now, I think I’ll build this any time I try to learn a new language. Building this covers a lot.

RGxjMy88Tx

You can play it at: https://quidge.github.io/asteroids/. You can find the repo here.

5 Likes

I should add: EJS is hard. There was a point around chapter 10 or 11 that I almost started crying at my laptop. Keep going back day after day, as it does get better …eventually. If you’re like me you’ll reread some chapters many times.

A positive of the EJS difficulty is that you gain a confidence in your own ability to persevere difficult concepts. I’ve been outside school for awhile and haven’t done anything that stretches me mentally like EJS since then, so it’s really nice to again have confidence that I can learn tough material.

Also, this project took me something like 70-100 hours and I had planned on it taking ~25. I think that’s just the nature of software.

Very cool. Nice work.