public void render(Screen screen, int xScroll, int yScroll) {
        screen.renderSprite(tileset.getBackground(), 0, 0, 0, false); // Render background first

        // Then the tiles
        screen.setOffset(xScroll, yScroll);
        int x0 = xScroll >> 4;
        int x1 = (xScroll + game.getScaledWidth() + 16) >> 4;
        int y0 = yScroll >> 4;
        int y1 = (yScroll + game.getScaledHeight() + 16) >> 4;
        for (int y = y0; y < y1; y++) {
            for (int x = x0; x < x1; x++) {
                Tile tile = getTile(x, y);
                tile.render(screen, x, y);
                if (game.showHitboxes && tile.isSolid())
                    screen.drawQuad(0xff0000, x << 4, y << 4, tileset.getTileSize(), tileset.getTileSize());
            }
        }

        for (int i = 0; i < entities.size(); i++) {
            entities.get(i).render(screen);
        }
    }