Dodging astroids in bootcamp

So ends week two of tech bootcamp. I am so looking forward to having a day off tomorrow …mostly to study! We’ve done three “sprints” this week (and a boatload of other things as well). The sprint we did on Monday and Tuesday (involving a lot of jQuery and object prototype inheritance) seems like it was weeks ago. The second sprint was all about callbacks and promises, promises, promises. Yesterday and today, we were tasked with using D3.js to build a cool (but seriously a pain in the tachat to build) ‘video’ game that is not too dissimilar from the old Astroids arcade game. We had to build it completely from scratch.

My partner and I managed to get first circles, that we then replaced with astroid images, moving in a random pattern. We got the player object (we wanted it to be a space cat image but ran out of time, so it was just a circle that changed colour depending on whether it was at the start position (white) before the game began, turning yellow once the player started moving it with the mouse, and red if it couldn’t avoid the zipping astroids and got blasted). We got the ‘highest score’ and ‘current game score’ to work — but after 8 solid hours, we could not find and fix what turned out to be a single line of mangled and partially missing code that kept the count of the number of collisions and reported them to them player. More specifically, the counter was all good, we just couldn’t get the program to recognize that a collision had happened. Gah.

Even with that minor (ok, so seriously major) flaw, the game we created is pretty darn cool, if I do say so myself. We didn’t do too shabbily, given that we’d never heard of this D3 library thing* (see below for what it is) or worked with SVGs before, were told the documentation is ….sparse …and that we were going to need to use it in a way it wasn’t designed to be used: Go forth and read, Google, hack, cry, and pull your hair out.

Check mark for all of the above!

***D3.js (or just D3 for Data-Driven Documents) is a JavaScript library for producing dynamic, interactive data visualizations in web browsers. It makes use of the widely implemented SVG, HTML5, and CSS standards.


2 responses to “Dodging astroids in bootcamp”

  1. Omer Zak says :

    So you are not a superwoman and not a female version of Chuck Norris.


    Links about using D3.js to build spectrograms:!topic/d3-js/Tv99Bd-doKs

    Full OpenGL support by a browser: WebGL.

    • israeliminx says :

      Omer, heh, sadly not! Today, I’m also woke up sick as a dog with the cold/flu thing that is running amok in both the senior and junior cohort.

      Thanks for the links!!! Reading them now to add weapons into my arsenal — a female version of Chuck Norris is definitely my dream 🙂

Leave a Reply

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

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

Google photo

You are commenting using your Google 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

%d bloggers like this: