Week 2 of our final project

The Part Time Peeps
2 min readJan 31, 2021

This week we had to finish and present the MVP and the result can be seen below. We have a canvas with a block at the bottom that can be moved left or right by user input, and we have obstacle blocks that drop randomly from top to bottom. We’ve started work on what happens when the objects collide and hopefully by next week, we will have finished this functionality.

The sprint started with a pair adding ESlint for code quality and configuring Jest to print the test coverage statements when the files are executed. We also had a chat about TDD because at that point we haven’t actually written any tests and we were curious how testing works in game development. And so, the other pair took on the responsibility of extracting objects from game.js by using the TDD practice, starting with the playerPiece aka ‘The syringe’. Our tests involve a lot of mocking and deciding what needs testing is definitely not as obvious as in our other projects because there is no logic in our game yet.

Importing and exporting objects brought an issue that was annoying to solve as we couldn’t find a lot of information about our specific problem. Our tests were failing in the browser and we were advised to use Babel and configure it for Jest. The steps that we did to sort this were:

In the command line: npm test — — init, then npm install — save-dev babel-jest @babel/core @babel/preset-env

In package.json write this script:

Then create babel.config.cjs and write:

Apart from focusing on MVP and TDD, we’ve also created a Start Game button and we’ve done a diagram for our visuals and a domain mapping of our game to help us moving forward. It has been a productive week, but we are starting to feel the pressure of time as we only have 2 weeks left of the course and our energy levels are quite low. But we’re hanging in there!

--

--

The Part Time Peeps

We are Amit, Amy, Anastasis, Ellen and Sabiha and we’re the first part time remote cohort at Makers Academy.