landgreen / n-gon

2-d physics rogue-lite platformer shooter
https://landgreen.github.io/n-gon/
GNU General Public License v3.0
143 stars 205 forks source link

Interest in game design #112

Closed MemeCake789 closed 10 months ago

MemeCake789 commented 10 months ago

Hi there! I am a big fan of this game and wanted to create a game similar to it. I have done some learning into matter.js and I was just wondering how you made the game and how each file is used. Thanks!

landgreen commented 10 months ago

Well, n-gon isn't written in a way you would want to copy. I was just messing around when I came up with the general file structure. I'm surprised it works at all.

A good starting point for web based games is this template project I wrote for the CS class I teach: https://codepen.io/lilgreenland/pen/zoZNVX It has the JS HTML CSS code for making graphics and animating them. In the JS section there are key and mouse inputs. It also has an animation loop at the bottom.