Coder Social home page Coder Social logo

kablam's Introduction

Kablam Logo

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.

Examples

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.

Usage

NPM

$ 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

Browser CDN

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

Dev

  1. npm run setup to setup first time (installing dev packages)
  2. npm run dev to watch & build lib and the website (the website might take some time to build for the first time)
  3. go to http://localhost:3000/play
  4. edit demos in demo/ to test
  5. make sure not to break any existing demos

also check out CONTRIBUTION.md

Community

Github Discussions

Misc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.