/Tron

Primary LanguageJavaScript

Tron (Dancing With Myself)

(nick dambrosio)

Goals

Use OOP to drive the design of an HTML5 Canvas game. Be able to pull this off on my own, in... dramatically less time than originally hoped.

A personal goal of mine was to not spend any time on styling this game and just focus on the functionality, so I could get it done in the ....36 hours remaining until it's due. This goal flew out the window after I realized I couldn't stand staring at the project without some basic styling. Woops. Maybe I'll write a blog post about how I don't have time management.

V.05 'It's just two snakes, right?'

Mod2 is an exciting one. We spend a lot of time in the terminal and working with objects. Gametime's goal is to satisfy the need for visual feedback and have fun while you're learning OOP.

'fun' is a misnomer.

This project had a much more robust starter-kit. With the movement/collision detection already written for us. I spent the weekend leading up to this project's due date working on personal projects and honing my portfolio, assuming that Tron would just be a slightly modified snake. Hooboy.

After finally diving into the code, I noticed that the starter-kit we received had a MUCH different approach to.... well... everything. Resisting urges to delete it and revert back to what I knew, I decided to brace the storm and punch the piniata til it worked.

Progress Screenshots

screen shot 2018-08-20 at 6 25 45 pm

screen shot 2018-08-21 at 12 54 58 am

V.06 'What if you just delete that code right there'

After not being able to figure out why my tails weren't appearing on the screen, despite unshifting into the array, I reached out to a classmate. Turns out I kept the starter-kit's 'clearRect' call. Once removing that the tails appeared just fine. MADNESS.

Progress Screenshots

screen shot 2018-08-21 at 1 46 39 pm

I've got tails now! but don't have the collision on them working....

screen shot 2018-08-21 at 3 16 34 pm

V.08 'Oh yeah, tests'

With the core functionality of my game finally working as intended, collision detection finally working on the walls, tails, and players, linter showing zero errors, and a clean CSS file, I actually see a light at the end of the tunnel. Now to get all my tests passing, get the project management details posted, and GET SOME SLEEP

screen shot 2018-08-21 at 11 44 37 pm

V1 'The World'

ezgif com-optimize 1