Kablam.js is a fork of Kaboom.js
This fork has some principles which really differentiate it from the main Kaboom library:
- Improved Pysics Engine:
- The physics/collisions are a bit dodgy on Kaboom, which is the main reason I made this fork.
- No NFT Stuff:
- They aren't good for the environment, I don't like them, on top of the fact that their use is limited, at most.
- Separated assets, lubrarym and everything else:
- In kaboom, the library, website, demos, and assets are all in one massive repository. If it isn't obvious, this is a bit of an issue in terms of performance, as downloading a whole megabyte to a machine to run a simple game is very :|.
- Better FPS:
- This is on the backburner right now, but general performance improvements are to come, I just need to figure out in what areas these will occur.
- Greater Control:
- This library gives you greater control over the elements at hand. No more creating something and theres no way to get resulting element. For example, you'll actually be able to get the audio context from a played audio file.
I've removed the examples section from the readme of this fork, mainly as I feel it will become neglected, along with the fact that any Kaboom.js code should work A-OK.
$ npm install kablam
import kaboom from "kablam";
kaboom();
add([
text("oh hi"),
pos(80, 40),
]);
also works with CommonJS
const kaboom = require("kablam");
Note that you'll need to use a bundler like esbuild
or webpack
to use Kaboom with NPM
This exports a global kaboom
function
<script src="https://unpkg.com/kablam/dist/kablam.js"></script>
<script>
kaboom();
</script>
or use with es modules
<script type="module">
import kaboom from "https://unpkg.com/kablam/dist/kablam.mjs";
kaboom();
</script>
works all CDNs that supports NPM packages, e.g. jsdelivr, skypack
npm run setup
to setup first time (installing dev packages)npm run dev
to watch & build lib and the website (the website might take some time to build for the first time)- go to http://localhost:3000/play
- edit demos in
demo/
to test - make sure not to break any existing demos
also check out CONTRIBUTION.md
- Thanks to abrudz for the amazing APL386 font
- Thanks to Polyducks for the amazing kitchen sink font font
- Thanks to 0x72 for the amazing Dungeon Tileset
- Thanks to Kenney for the amazing 1-Bit Platformer Pack
- Find bitmap fonts: Oldschool PC Font
- Featured on Console 50
- Thanks to Umayr for kindly offering the "kaboom" npm package name
- Please buy fireworks on kaboom.com
- Documentation for v0.5 here
- How to do a KABOOM on a Trampoline