the cutting room mirror

The World's Hardest Game

This article has a talk page!
view on tcrf.net

This page details bugs of The World's Hardest Game.

This page or section needs more videos.
There's a whole lotta words or pictures here, but not enough videos. Please fix this.

To do:
Any more glitches that have been found in the Flash or HTML5 versions?

Corner Bug#

Please elaborate.
Having more detail is always a good thing.
Specifically: Explain the glitch more properly.

The Flash version has a glitch to where if you were to go up/down and go left/right, this will cancel out the carve functions.

The HTML5 version added code to fix the glitch:

// fix carving cancel move bug - up
        if (player.movedUp && player.carvedDown) {
            player.y -= PLAYER_SPEED;
            if (player.bouncing) {
                player.bounceY -= PLAYER_SPEED;
                player.bounceTarget -= PLAYER_SPEED;
            }
        }

        // fix carving cancel move bug - down
        else if (player.movedDown && player.carvedUp) {
            player.y += PLAYER_SPEED;
            if (player.bouncing) {
                player.bounceY += PLAYER_SPEED;
                player.bounceTarget += PLAYER_SPEED;
            }
        }

        // fix corner bug - up/right
        if ((keyRight) && (keyUp)) {
            if (walls[level][Math.floor((player.top - distance - WALL_BORDER_BOTTOM) / TILE_SIZE)][Math.floor((player.right + distance + WALL_BORDER_LEFT) / TILE_SIZE)] == 1) {
                if (player.prevX == player.x - PLAYER_SPEED && player.prevY == player.y + PLAYER_SPEED) {
                    player.x -= PLAYER_SPEED;
                }
            }
        }

        // fix corner bug - up/right
        else if ((keyLeft) && (keyUp)) {
            if (walls[level][Math.floor((player.top - distance - WALL_BORDER_BOTTOM) / TILE_SIZE)][Math.floor((player.left - distance - WALL_BORDER_RIGHT) / TILE_SIZE)] == 1) {
                if (player.prevX == player.x + PLAYER_SPEED && player.prevY == player.y + PLAYER_SPEED) {
                    player.x += PLAYER_SPEED;
                }
            }
        }

        // fix corner bug - down/right
        else if ((keyRight) && (keyDown)) {
            if (walls[level][Math.floor((player.bottom + distance + WALL_BORDER_TOP) / TILE_SIZE)][Math.floor((player.right + distance + WALL_BORDER_LEFT) / TILE_SIZE)] == 1) {
                if (player.prevX == player.x - PLAYER_SPEED && player.prevY == player.y - PLAYER_SPEED) {
                    player.x -= PLAYER_SPEED;
                }
            }
        }

        // fix corner bug - down/right
        else if ((keyLeft) && (keyDown)) {
            if (walls[level][Math.floor((player.bottom + distance + WALL_BORDER_TOP) / TILE_SIZE)][Math.floor((player.left - distance - WALL_BORDER_RIGHT) / TILE_SIZE)] == 1) {
                if (player.prevX == player.x + PLAYER_SPEED && player.prevY == player.y - PLAYER_SPEED) {
                    player.x += PLAYER_SPEED;
                }
            }
        }
    }
}

Enemy Collision Check Fail#

Please elaborate.
Having more detail is always a good thing.
Specifically: Explain how Flash's hitbox system works properly.

In the Flash version, the game checks 9 hitbox points each frame you move: one on each corner of the player's hitbox, and five on each side of the hitbox (including the middle). If one of the points collides with a wall, they move the player in the opposite direction; if one of the points collides with an enemy's hitbox points, the player dies.

In Level 2, the player can easily pass through enemies because every enemy is just small enough to where it fails checking if the player has collided with an enemy, thus making the player invincible.

This does not occur in the HTML5 version because of how different HTML5 handles collision than Flash's hitbox system.