Drawaria Optimized Physics Engine (v4.0 - ULTRA FLUID - No Trails)

Motor de física súper-optimizado para Drawaria.online con objetos interactivos (pelotas y cuadrados), colisiones y modo arcoíris. ¡Ahora sin rastros visibles en el servidor!

作者
YouTubeDrawaria
今日安裝
0
安裝總數
0
評價
0 0 0
版本
4.0.0
建立日期
2025-08-21
更新日期
2025-08-21
尺寸
45.1 KB
授權條款
MIT
腳本執行於

🚀 Drawaria Optimized Physics Engine

🎯 What does this script do? / ¿Qué hace este script?

English: This script introduces an advanced physics engine to Drawaria, allowing for interactive objects like balls and squares that respond to gravity, forces, and collisions. It features a comprehensive UI panel with controls for activating the physics, adjusting parameters (gravity, power, friction, mass), drawing custom environments (platforms, obstacles), and initiating actions like kicking objects or enabling modes like "Rainbow Mode." The engine optimizes drawing commands for the server to achieve "ultra-fluid" visuals with "no visible trails," aiming for a smooth, platformer-like experience within Drawaria.

Español: Este script introduce un motor de física avanzado en Drawaria, permitiendo objetos interactivos como pelotas y cuadrados que responden a gravedad, fuerzas y colisiones. Presenta un panel de UI completo con controles para activar la física, ajustar parámetros (gravedad, potencia, fricción, masa), dibujar entornos personalizados (plataformas, obstáculos) e iniciar acciones como patear objetos o activar modos como "Modo Arcoíris". El motor optimiza los comandos de dibujo para el servidor para lograr efectos visuales "ultra-fluidos" sin "rastros visibles", buscando una experiencia fluida similar a un juego de plataformas dentro de Drawaria.

✨ Features / Características

Advanced Physics Simulation & Control
  • 🔧 Physics Engine - Simulates realistic physics for objects including gravity, momentum, friction, and collisions.
  • ⚡ Interactive Objects - Create and manipulate balls and squares with customizable properties.
  • 🎨 Collision Detection - Objects interact realistically with each other and the game canvas boundaries. Specific colors on canvas are detected as surfaces (solid, death, water, bounce).
  • 🚀 Optimized Drawing Commands - Sends batched and efficient commands to the Drawaria server for smooth visuals with minimal server load ("no trails").
  • 🖌️ Integrated Drawing Tools - Draw platforms, circles, and environments directly on the canvas to interact with the physics system.
  • 🤖 Automation Modes - Activate Demo or Chaos modes for automated avatar actions.
  • 🌈 Rainbow Mode - Dynamically changes object colors for a vibrant visual effect.
  • ⚙️ Customizable Parameters - Adjust gravity, kick power, jump force, friction, mass, and more via a UI panel.
  • 🎮 Intuitive UI - A draggable control panel with tabs for easy access to all features.

Español:

  • 🔧 Motor de Física - Simula física realista para objetos incluyendo gravedad, momento, fricción y colisiones.
  • ⚡ Objetos Interactivos - Crea y manipula pelotas y cuadrados con propiedades personalizables.
  • 🎨 Detección de Colisiones - Los objetos interactúan de forma realista entre sí y con los límites del lienzo del juego. Se detectan colores específicos en el lienzo como superficies (sólidas, de muerte, agua, rampas de salto).
  • 🚀 Comandos de Dibujo Optimizados - Envía comandos agrupados y eficientes al servidor de Drawaria para obtener efectos visuales fluidos con mínima carga de servidor ("sin rastros").
  • 🖌️ Herramientas de Dibujo Integradas - Dibuja plataformas, círculos y entornos directamente en el lienzo para interactuar con el sistema de física.
  • 🤖 Modos de Automatización - Activa los modos Demo o Caos para acciones automáticas del avatar.
  • 🌈 Modo Arcoíris - Cambia dinámicamente los colores de los objetos para un efecto visual vibrante.
  • ⚙️ Parámetros Personalizables - Ajusta gravedad, potencia de patada, fuerza de salto, fricción, masa y más a través de un panel de UI.
  • 🎮 UI Intuitiva - Un panel de control arrastrable con pestañas para un fácil acceso a todas las funciones.

📥 Installation / Instalación

🇺🇸 English Instructions 🇪🇸 Instrucciones en Español
  1. Install the Tampermonkey extension (or a similar userscript manager) in your browser.
  2. Create a new userscript and paste the provided code into the editor.
  3. Save the script.
  4. Navigate to the Drawaria website (https://drawaria.online/).
  5. The "Optimized Physics Engine" panel should appear in the top-right corner.
  6. Draw objects on the canvas, activate physics, and interact with the environment.
  1. Instala la extensión Tampermonkey (o un gestor de userscripts similar) en tu navegador.
  2. Crea un nuevo userscript y pega el código proporcionado en el editor.
  3. Guarda el script.
  4. Navega al sitio web de Drawaria (https://drawaria.online/).
  5. El panel "Optimized Physics Engine" debería aparecer en la esquina superior derecha.
  6. Dibuja objetos en el lienzo, activa la física e interactúa con el entorno.

🎮 How to Use / Cómo Usar

  • 🔵 Step 1: Access Drawaria. The physics control panel will appear in the top-right corner.
    Paso 1: Accede a Drawaria. El panel de control de física aparecerá en la esquina superior derecha.
  • 🟢 Step 2: Click "Launch Physics Engine" to activate the physics simulation.
    Paso 2: Haz clic en "Launch Physics Engine" para activar la simulación de física.
  • 🟣 Step 3: Use the controls (sliders, buttons) to adjust physics parameters, draw objects, and interact with the environment.
    Paso 3: Usa los controles (deslizadores, botones) para ajustar parámetros de física, dibujar objetos e interactuar con el entorno.
  • 🟠 Step 4: Click "Stop Physics Engine" to deactivate the simulation. Use "Clear All Objects" to reset the canvas.
    Paso 4: Haz clic en "Stop Physics Engine" para desactivar la simulación. Usa "Clear All Objects" para reiniciar el lienzo.

🛠️ Technical Details / Detalles Técnicos

Feature / Característica Details / Detalles
Physics Simulation Core Uses a custom engine with Vector2D math for physics calculations (gravity, velocity, forces, friction). Handles ball-ball and ball-square collisions.
Optimized Server Commands Sends drawing commands in batches via WebSocket to the Drawaria server, minimizing network traffic and ensuring smooth visuals. Uses negative thickness for filled shapes.
Pixel Collision Detection Reads canvas pixel data (`getImageData`) to identify collision surfaces based on predefined RGB colors and a tolerance value.
Interactive UI Dynamically creates a draggable control panel with tabs, sliders, buttons, and visual feedback elements.

⚠️ Important Warnings / Advertencias Importantes

  • 🚨 Using this script, especially automation features, might violate Drawaria's Terms of Service. Use responsibly and at your own risk.
  • 🚨 The physics and collision detection rely on specific pixel colors. Changes to Drawaria's default colors may break functionality.
  • 🚨 Performance can be affected by the number of physics objects and the complexity of drawn environments.
  • 🚨 The "no trails" effect is achieved by drawing over old positions; complex interactions might still show minor visual artifacts.

Español:

  • 🚨 El uso de este script, especialmente las funciones de automatización, podría violar los Términos de Servicio de Drawaria. Úsalo responsablemente y bajo tu propio riesgo.
  • 🚨 Asegúrate de que la estructura del sitio web de Drawaria y las mecánicas del juego permanezcan consistentes, ya que las actualizaciones podrían afectar la funcionalidad del script.
  • 🚨 La detección de colisiones se basa en colores de píxeles específicos. Cambios en los colores predeterminados de Drawaria podrían romper la funcionalidad.
  • 🚨 El rendimiento puede verse afectado por la cantidad de objetos físicos y la complejidad de los entornos dibujados.

🔧 Troubleshooting / Solución de Problemas

✅ The UI appears, physics can be activated, objects can be created and moved, and collisions are detected.
✅ La UI aparece, la física se puede activar, los objetos se pueden crear y mover, y las colisiones se detectan.
⚠️ If the menu is missing or controls don't work, ensure Tampermonkey is enabled and the script is correctly installed. Check the browser console for errors.
⚠️ Si el menú falta o los controles no funcionan, asegúrate de que Tampermonkey esté habilitado y el script esté instalado correctamente. Revisa la consola del navegador en busca de errores.
❌ If physics simulation seems off (e.g., objects falling too fast, no collision), check the physics constants and ensure the WebSocket is connected.
❌ Si la simulación de física parece incorrecta (ej. objetos cayendo muy rápido, sin colisión), verifica las constantes de física y asegúrate de que la conexión WebSocket esté activa.

📊 Compatibility / Compatibilidad

✅ Compatible Browsers / Navegadores Compatibles ✅ Required Extensions / Extensiones Requeridas
Chrome, Firefox, Edge, Opera
(Browsers supporting userscripts, WebSocket, Canvas API, and modern JS features)
Tampermonkey or similar userscript manager
(Required for script execution)

🔄 How to Disable / Cómo Desactivar

Method 1 - Script Manager:

Open your userscript manager (e.g., Tampermonkey), find "Drawaria Optimized Physics Engine", and disable or delete it.

Método 1 - Gestor de Scripts: Abre tu gestor de userscripts (ej. Tampermonkey), busca "Drawaria Optimized Physics Engine" y desactívalo o elimínalo.

Method 2 - Turn Off Physics:

Click the "Stop Physics Engine" button in the menu to deactivate the physics simulation. This does not disable the script itself.

Método 2 - Desactivar Física: Haz clic en el botón "Stop Physics Engine" en el menú para desactivar la simulación de física. Esto no deshabilita el script en sí.

💡 Pro Tips / Consejos Profesionales

  • Create Interactive Levels: Use the Drawing tools combined with physics objects to build custom levels with challenges and interactive elements.
  • Tune Physics Parameters: Experiment with gravity, restitution, friction, and forces to achieve specific gameplay feels (e.g., low gravity for floating, high friction for sticky surfaces).
  • Add New Object Types: Extend the `physicsObjects` and collision handling logic to support new shapes or behaviors (e.g., triangles, portals).
  • Customize Collision Colors: Modify the `surfaceColors` object to define new interaction types based on colors drawn on the canvas.
  • Network Synchronization: Explore enabling `controls.enableNetworkSync` (if implemented) to send physics states to other players (requires server-side integration).

Español:

  • Crea Niveles Interactivos: Usa las herramientas de Dibujo combinadas con objetos físicos para construir niveles personalizados con desafíos y elementos interactivos.
  • Ajusta Parámetros de Física: Experimenta con gravedad, restitución, fricción y fuerzas para lograr sensaciones de juego específicas (ej. baja gravedad para flotar, alta fricción para superficies pegajosas).
  • Añade Nuevos Tipos de Objetos: Extiende la lógica de `physicsObjects` y manejo de colisiones para soportar nuevas formas o comportamientos (ej. triángulos, portales).
  • Personaliza Colores de Colisión: Modifica el objeto `surfaceColors` para definir nuevos tipos de interacción basados en colores.
  • Sincronización de Red: Explora habilitar `controls.enableNetworkSync` (si se implementa) para enviar estados de física a otros jugadores (requiere integración del lado del servidor).

🎉 Ready to Use! / ¡Listo para Usar!

Transform Drawaria into a physics playground with interactive objects and custom environments!

¡Transforma Drawaria en un patio de recreo de física con objetos interactivos y entornos personalizados!

🎨 🚀 ✨ 💫 🌟

Author: YouTubeDrawaria + GPT-4 | Version: 4.0.0 | License: MIT
Support: Report issues in the comments below | Additional Info: Adds a physics engine, drawing tools, and automation features to Drawaria.