Bey blade 2d Battle simulator

🎉 Winner: {{ winner.name }} 🎉

Leaderboard

  1. {{ p.name }} - ❤ {{ p.health }} - ⚙ {{ Math.round(p.rpm) }} rpm- ⚙ 0 rpm {{ p.name }} - 🏆 1st Place 🥈 2nd Place 🥉 3rd Place {{ p.place }}th Place

About

This is a 2D battle simulator inspired by the Beyblade franchise. It uses HTML5 canvas to render the arena and JavaScript to handle the game logic. Keywords: Beyblade, 2D, battle simulator, HTML5, canvas, JavaScript.

How to play

Enter the names of the players in the textarea. After clicking "Start", the players will be pitted against each other in an automated battle. The winner will be announced at the end. Nothing needs to be done during the battle, just watch and enjoy!

Power ups

Game phisics

The game's physics are based on simple collision detection and basic kinematics. When two or more players collide, the players involved take damage proportional to their speed and mass. The players' positions and velocities are updated every frame using the following equations:

The game also uses a simple bounding box collision detection algorithm. When two players' bounding boxes overlap, the game checks if the distance between the centers of the two players is less than or equal to the sum of their radii. If the distance is less than or equal to the sum of the radii, the game triggers a collision event.