js13k Day 1

I’m going to try and chronicle my js13k submission. Its been a while since I’ve done any game development, so expect that with the time constraints I have (full time job + 2 kids) it wont be so great. But in order to actually finish a side project I figure some constraints are needed.

Day 1 Objectives

  • Settle on how I’m going to organise the files
  • Get the main ‘player’ on the screen

Github repo

I’ve decided to go with straight files, concatenated using gulp. I’m used to seperating my code, and concatenation provides an almost module-like approach. I’ll minify later, once i’ve got the game up and running.

I’m going with what I know — I’ve made games using c# and c++ so that is predominantly class based, i’ll use the same patterns. Seeing as I have a time limit I need to put what I know to task.

Each sprite will have its own canvas and render from that onto the main canvas. I’ll probably need to make another canvas for the background.

For now, variable names will be the full name. Optimise once the game is how I want it.

I got the player onto the screen pretty quickly (there some rendering problems that may be because of scaling) and tried to implement some basic movement using vector math. Reaslied that I’ve completely forgotten what functions do what, I got a ‘sort of what i want’ thing happening. clicking in a quadrant should move the ball in the opposite direction.

Goals for tomorrow

  • add drag events so you can ‘push’ the ball
  • make the ball reflect off the sides of the canvas.