My Base Code for LD 41
Once again I will be using my base code that I have built up since LD 26. It is written in JavaScript and can be used to create HTML5/canvas games. You can find the base code on github: https://github.com/ZYXer-/base-code-2d
Features: - a simple game loop - mouse/keyboard input processing - image/sound/webfont preloading - dealing with different screen resolutions
Additional classes for: - playing sounds (using SoundManager2) - loading and displaying PNG fonts - particle systems - pathfinding (using A*) - image processing class to generate 8-bit style graphics - utility functions for procedural map generation - simple one-body physics - a text class that is way more powerful than fillText() - scaling to easily display pixelart at various screen resolutions
Since LD 40, I have made a few bug fixes and added the following features: - added the polygon offset library by Alexander Milevski (https://github.com/w8r/polygon-offset) - sound can now fade in and fade out - extended the performance monitor to measure update and draw call execution times as well as measuring custom tasks - added utility function to draw rings, ring segments, and circle segments.
I’m distributing the code under the GPL2 license, so feel free to use any part of it for your own project. And please – like always – report any bugs ;)