Skip to content

Instantly share code, notes, and snippets.

View straker's full-sized avatar

Steven Lambert straker

View GitHub Profile
@straker
straker / README.md
Last active April 24, 2024 12:16
Basic Pong HTML and JavaScript Game

Basic Pong HTML and JavaScript Game

This is a basic implementation of the Atari Pong game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When a ball goes past a paddle, the other player should score a point. Use context.fillText() to display the score to the screen
@straker
straker / README.md
Last active April 20, 2024 10:20
Basic Snake HTML and JavaScript Game

Basic Snake HTML and JavaScript Game

Snake is a fun game to make as it doesn't require a lot of code (less than 100 lines with all comments removed). This is a basic implementation of the snake game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score
  • When the snake eats an apple, the score should increase by one. Use context.fillText() to display the score to the screen
@straker
straker / README.md
Last active April 16, 2024 08:49
Basic Tetris HTML and JavaScript Game

Basic Tetris HTML and JavaScript Game

This is a basic implementation of the game Tetris, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

@straker
straker / README.md
Last active April 15, 2024 07:56
Basic Block Dude HTML and JavaScript Game

Basic Block Dude HTML and JavaScript Game

This is a basic implementation of Block Dude, an old TI-83/4 Calculator game. It's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • More levels
  • Add more levels and have the next level start once the last one is finished
@straker
straker / README.md
Last active March 31, 2024 07:00
Basic Doodle Jump HTML and JavaScript Game

Basic Doodle Jump HTML and JavaScript Game

This is a basic implementation of the game Doodle Jump, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Platforms Types
  • There are 4 different types of platforms: Normal, Broken, Moving, and Disappearing
@straker
straker / README.md
Last active February 24, 2024 15:01
Basic Bomberman HTML and JavaScript Game

Basic Bomberman HTML and JavaScript Game

This is a basic implementation of the NES game Bomberman, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Player death
  • The player should die when it is hit by an explosion from a bomb
@straker
straker / README.md
Last active February 12, 2024 08:24
Basic Classic Helicopter HTML and JavaScript Game

Basic Classic Helicopter HTML and JavaScript Game

This is a basic implementation of the classic Helicopter game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Score / Distance
  • As the helicopter moves right, the score / distance should increase. Use context.fillText() to display the score / distance to the screen
@straker
straker / README.md
Last active February 7, 2024 11:59
Basic Breakout HTML and JavaScript Game

Basic Breakout HTML and JavaScript Game

This is a basic implementation of the Atari Breakout game, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Lives
  • The player should have 3 chances to remove all the bricks. Display how many lives the player currently has using context.fillText(). Remove a life when the ball goes below the screen
@straker
straker / README.md
Last active January 24, 2024 07:13
Basic Sokoban HTML and JavaScript Game

Basic Sokoban HTML and JavaScript Game

This is a basic implementation of the game Sokoban, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • More levels
  • Add more levels and have the next level start once the last one is finished
@straker
straker / two-way-binding.js
Last active December 23, 2023 04:30
Simple and small two-way data binding between DOM and data
/**
* @param {object} scope - Object that all bound data will be attached to.
*/
function twoWayBind(scope) {
// a list of all bindings used in the DOM
// @example
// { 'person.name': [<input type="text" data-bind="person.name"/>] }
var bindings = {};
// each bindings old value to be compared for changes