Bloxd.io 1000 FPS Optimizer

Optimizes Bloxd.io for higher FPS (up to 1000 FPS)

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Bloxd.io 1000 FPS Optimizer
// @namespace    https://bloxd.io
// @version      1.0
// @description  Optimizes Bloxd.io for higher FPS (up to 1000 FPS)
// @author       KING BLOXD
// @match        https://bloxd.io/
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // Wait for the game to load
    window.addEventListener('load', function() {
        // Check if the game canvas exists
        const checkCanvas = setInterval(function() {
            const canvas = document.querySelector('canvas');
            if (canvas) {
                clearInterval(checkCanvas);
                optimizeGame(canvas);
            }
        }, 100);
    });

    function optimizeGame(canvas) {
        try {
            // Get the WebGL context
            const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');

            if (gl) {
                // Override requestAnimationFrame for higher FPS
                let lastTime = 0;
                const originalRAF = window.requestAnimationFrame;
                window.requestAnimationFrame = function(callback) {
                    const now = performance.now();
                    const timeToCall = Math.max(0, 1 - (now - lastTime));
                    const id = window.setTimeout(function() {
                        callback(now + timeToCall);
                    }, timeToCall);
                    lastTime = now + timeToCall;
                    return id;
                };

                // Increase the maximum FPS
                const targetFPS = 1000;
                const frameTime = 1000 / targetFPS;

                // Optimize WebGL settings
                gl.disable(gl.DEPTH_TEST);
                gl.disable(gl.STENCIL_TEST);
                gl.disable(gl.DITHER);
                gl.disable(gl.POLYGON_OFFSET_FILL);
                gl.disable(gl.SAMPLE_COVERAGE);
                gl.disable(gl.SCISSOR_TEST);
                gl.disable(gl.CULL_FACE);

                // Lower rendering quality for performance
                gl.canvas.width = Math.min(gl.canvas.width, 1920);
                gl.canvas.height = Math.min(gl.canvas.height, 1080);

                console.log('Bloxd.io FPS optimization applied! Target FPS: ' + targetFPS);
            } else {
                console.log('Could not get WebGL context for optimization');
            }
        } catch (e) {
            console.error('Error optimizing Bloxd.io:', e);
        }
    }

    // Additional optimizations
    document.addEventListener('DOMContentLoaded', function() {
        // Reduce quality settings if they exist
        try {
            if (window.gameSettings) {
                window.gameSettings.graphicsQuality = 'low';
                window.gameSettings.renderDistance = 4;
                window.gameSettings.particles = false;
            }
        } catch (e) {}

        // Disable potentially heavy effects
        const style = document.createElement('style');
        style.innerHTML = `
            canvas {
                image-rendering: optimizeSpeed;
                image-rendering: -moz-crisp-edges;
                image-rendering: -webkit-optimize-contrast;
                image-rendering: optimize-contrast;
                image-rendering: pixelated;
                -ms-interpolation-mode: nearest-neighbor;
            }
            * {
                animation: none !important;
                transition: none !important;
            }
        `;
        document.head.appendChild(style);
    });
})();