Submit templates for repl.it/templates here.

← Back to all posts
CanvasGame.js, a framework for building games in pure JS
SixBeeps (5036)

Philosophy

I like making games using programming languages in as pure of a form as I can. Sure, you could make something using something like Unity, but that takes away from the fun of stuff like rendering and simplicity. That's why I've taken an interest in making games in pure HTML, JS, and CSS. Not only does this mean that I get all those things that using a high-level framework hides away, but it also means backwards compatibility. So, to sum things up, I want

  • Simplicity
  • Purity
  • Compatibility

But when you have a lot of projects that use the same things over and over again, it get tedious to re-write some of that code. Hence, I made a framework that not only meets my objectives, but I can reuse it wherever.

Usage

CanvasGame.js runs on pure, unaltered JS. You can even look into the source code to see what it's like in there, although it might get a little bit dangerous \(º □ º l|l)/

Since this is all base-level stuff, you'd use it as if it were not even there (except it is). Rendering to the canvas using conventional methods is used quite a lot, all this framework does is set up an environment for you to make your game.

There is a README file included in the Repl. That'll get you set up with a really simple structure to work off of. It also includes the documentation for everything you can do with CanvasGame.

Comments
hotnewtop