Momentum logo
Team 3 Classroom

Games Programming in JavaScript

Posted on Aug 3rd, 2020

This is the last week of Phase 1, so we will have a week-long project that you will work on in study groups and end the week with technical presentations on Thursday.

Today’s topics

  • Building games in JS
  • The Canvas API

Project

Build a game

This project is due on Thursday, August 6th.

Study groups for this project are to encourage you to put your heads together to solve the problems this project poses. You will need to wrestle with this material; read other people’s code; take that code apart and run it, change it, and break it to understand what it’s doing; read documentation and just try stuff until things start to click for you. Doing this with other people will help a lot!

Object Oriented Programming in JavaScript

Among the resources below are some slides and links about JavaScript’s object system and other topics in Object Oriented Programming. I’ve opted not to go over these to leave more time for working on the game (we’ll go over much of it when we start working with Python), but I’m including them below for those that are interested (it can also help you to understand what’s going on in some of the example code you might see out there).

Pair/group assignments:
  • Kim & Jon
  • Sloan & Harrison
  • Tori & Shane
  • Robert & Kyle

Link to assignment invitation

TODO for tonight

  • Watch Mary Rose Cook’s video; read her annotated code. Get the updated space invaders code from our examples repo and run it locally. Read that code, change it, and see what happens. See if you can start to understand what is happening. (Links to all of these things below)
  • Play with the Canvas API.
  • Play the games that are provided as options in the homework assignment.

  • Get started writing the code: a good first step is to draw a player on the screen in your own browser. Then, see if you can make that player move.

End of Phase Presentations are on Thursday

Instructions for technical presentations

⭐️EXTRA/TMI

Code, slides, and video from class

creating a single-page app with AJAX and game previews

Posted on Jul 31st, 2020

Hey everyone, hope you’re having a good weekend. Here’s some links to go with the assignment you’re working on this weekend, including slides and another example to look at. I’ve also included previews of the games you’ll be choosing from for your final projects. The next week will be tough, but we’re going to come out of it better coders (and/or teachers)!

Games to Pick From

⭐️EXTRA/TMI

For more information about how the internet works and the mechanics of a request over HTTP, check out this comic by the always brilliant Julia Evans!

Code, slides, and video from class

Using APIs with JS and Fetch

Posted on Jul 30th, 2020

Today’s topics

  • Using JSON for retrieving data
  • Basics of HTTP requests
  • Make requests with Insomnia client to GET data
  • Make GET requests using the Fetch API and display response data on a page

Code, slides, and video from class