Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k1r0s/gam2d
canvas 2d playground, trying to wrap canvas 2d api in several OOP patterns using kaop
https://github.com/k1r0s/gam2d
Last synced: 10 days ago
JSON representation
canvas 2d playground, trying to wrap canvas 2d api in several OOP patterns using kaop
- Host: GitHub
- URL: https://github.com/k1r0s/gam2d
- Owner: k1r0s
- Created: 2017-07-03T22:34:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-24T19:24:24.000Z (almost 7 years ago)
- Last Synced: 2024-10-13T02:13:48.767Z (24 days ago)
- Language: JavaScript
- Homepage: https://k1r0s.github.io/gam2d/
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## gam2d
Launch:
`npm i`
`npm run build`
`http-server` (use what ever static server you love)> warning: keyboard is disabled by the game to track arrows and space key. That could mean you can't reload page with CTRL + R or open DevTools with F12 (neither CTRL + SHIFT + I). Use `inspect element` instead.
---
What this project is all about:I wanted to learn canvas rendering (html5 Canvas 2d API)
I found funny but native API was so low level that I decided to organize a lightweight solution for early game developers which I find useful for learning purposes.. (if you are looking for hard game development try threejs which is nice of course :D).
Also separate most of the code in `common` dir which I would like to improve and add more common solutions.
I'm trying to do by myself using html5 Canvas 2d API to build a simple example with:
- A way to handle input events within game context
- An example to move images around (AKA movement)
- An example to implement colliders within objects
- A way to configure how many renders or ticks will be fired for each `requestAnimationFrame`
- Separation of concerns (rendering, ticks)
- OOP features with kaop (inheritance, static classes, even more features are not used on this project)
- More to come... (I hope)Consider this project as a WIP, coz I'm trying to learn game development (I would like).
Feel free to contribute if you like.