Beast 2D is an open-source JavaScript game development framework that provides a variety of features to aid in the creation of 2D games.
Beast 2D provides a sprite animation system for creating animated game elements.
The framework includes an event handling system to manage input events and signals within the game, such as keyboard and mouse input.
Beast 2D offers a flexible system for creating game entities and managing their components, allowing for easy creation of various game elements like players, enemies, and objects.
It provides methods for managing the HTML canvas element, including setting up the viewport, clearing the screen, and updating game elements.
Beast 2D supports scene management, allowing developers to create and manage different game scenes, including backgrounds, game objects, UI elements, and physics colliders.
The framework includes a physics system with support for rigid bodies and colliders, enabling developers to add realistic physics interactions to their games.
Beast 2D offers various UI features such as buttons, labels, images, and layouts for creating menus and interfaces.
It includes an asset collection system for loading and managing game assets like images and audio files.
Beast 2D provides functionality for controlling the camera viewport within the game world.
The framework includes additional tools such as a vectors library for mathematical operations and calculations.
Follow these steps to set up Beast 2D in your project:
<html>
<body>
<canvas id="screen" width="500" height="500"></canvas>
<script type="text/javascript" src="vectors.js"></script>
<script type="text/javascript" src="events.js"></script>
<script type="text/javascript" src="engine.js"></script>
<script type="text/javascript" src="physics.js"></script>
<script type="text/javascript" src="tools.js"></script>
<script type="text/javascript">
// Global update function
function update() {
// Clear screen with black color each frame
clear("black");
// Update the canvas object
canvas.update();
// Set the update to repeat
setTimeout(update, canvas.timeout);
}
update();
</script>
</body>
</html>
Join our community of developers, share your projects, and get support.