Calculator Tools Calculator Tools
Create

Mini Mario Game

Nov 25, 2023

About this app

A simplified Mario-like platform game with jumping and movement mechanics.

[ { "search": "", "replace": "\n" }, { "search": "function updatePlayer() {", "replace": "function updatePlayer() {\n checkCollision();" }, { "search": "function draw() {", "replace": "function checkCollision() {\n if (player.y + player.height >= canvas.height - 20) {\n player.jumping = false;\n player.y = canvas.height - player.height - 20;\n player.velY = 0;\n }\n}\n\nfunction draw() {" } ]

Related apps

Put this on your site

Source

                    [
{
"search": "<canvas id=\"gameCanvas\" width=\"800\" height=\"400\"></canvas>",
"replace": "<canvas id=\"gameCanvas\" width=\"800\" height=\"400\"></canvas>\n<div id=\"platform\" style=\"position: absolute; bottom: 10px; left: 0; width: 100%; height: 20px; background-color: #000;\"></div>"
},
{
"search": "function updatePlayer() {",
"replace": "function updatePlayer() {\n checkCollision();"
},
{
"search": "function draw() {",
"replace": "function checkCollision() {\n if (player.y + player.height >= canvas.height - 20) {\n player.jumping = false;\n player.y = canvas.height - player.height - 20;\n player.velY = 0;\n }\n}\n\nfunction draw() {"
}
]