Getting Started with Beep8
To use Beep8, you need to include the library in your project. You can do this by adding the following script tag to your HTML file:
<script src="https://cdn.jsdelivr.net/gh/BinaryMoon/Beep8/dist/beep8.min.js"></script>
You will also need to copy the assets directory from the Beep8 repository to your project. This directory contains the default images and sounds used by the library. You will then need to define the location of the assets directory when you create a new Beep8 instance:
window.addEventListener(
'load',
() => {
beep8.init(
function() {
// Your app initialisation code here.
},
{
// The name of your game
NAME: 'beep8 Game',
// The location of the assets files.
FONT_DEFAULT: "./assets/font-default.png",
FONT_TILES: "./assets/font-tiles.png",
FONT_ACTORS: "./assets/font-actors.png",
// The div that stores your game.
CANVAS_SETTINGS: {
CONTAINER: '#game-container',
}
}
);
}
);