I have used html (for game interference and structure) CSS (for styling the game) and JavaScript (for game logic and functionality along with blackened logic using Node.js) for this project:










Robot-Battle Royale








body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f4f4f9;
}

game {

display: flex;
flex-direction: column;
align-items: center;
margin-top: 50px;

}

canvas {
border: 2px solid #444;
background-color: #e3e3e3;
}

const canvas = document.getElementById('battlefield');
const ctx = canvas.getContext('2d');
canvas.width = 800;
canvas.height = 400;

document.getElementById('startBtn').addEventListener('click', startGame);

function startGame() {
console.log('Game Started!');
ctx.fillStyle = 'blue';
ctx.fillRect(50, 150, 50, 50); // Example of robot rendering
}

const express = require('express');
const app = express();

app.use(express.json());
app.use(express.static('public')); // Serve HTML, CSS, and JS files

app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html');
});

const PORT = 3000;
app.listen(PORT, () => console.log(Server running on http://localhost:${PORT}));