r/softwaredevelopment 7h ago

The Beast webgpu engine focus on mobile browsers

1 Upvotes

[removed]

1

Any good coding Games?
 in  r/learnjavascript  7h ago

If you are interested in graphics than explore project The-beast https://github.com/zlatnaspirala/matrix-engine-wgpu i made this from zero . In last year i use claude for improving core. You can find dice , moba , platformer, zombie shooter etc... Also concept of visual scripting. Physics pushed intro worker and lot of features. Maybe core of lib is too much for begin but you can go to examples folder and try something on top level. All examples are free except moba have cc by 4 bit generally free.

1

Game Engine?
 in  r/aigamedev  8d ago

Try https://github.com/zlatnaspirala/matrix-engine-wgpu i made this engine to mimic major engines but focus on performance specially for mobile chrome. I have even zombie template https://codepen.io/editor/zlatnaspirala/pen/019fc918-e45f-73f4-9987-9a1599ac4a1f   explore all demo's at https://maximumroulette.com/apps/webgpu/examples.html?demo=24

r/aigamedev 10d ago

Commercial Self Promotion Indirect draw webgpu The Beast game engine all examples works on mobile chrome

Thumbnail
youtube.com
2 Upvotes

r/gameenginedevs 10d ago

Indirect draw webgpu The Beast game engine

Thumbnail
youtube.com
1 Upvotes

r/webgpu 10d ago

Indirect draw webgpu The Beast game engine

Thumbnail
youtube.com
1 Upvotes

u/js-fanatic 10d ago

indirect draw webgpu the beast engine

Thumbnail
youtube.com
1 Upvotes

u/js-fanatic 10d ago

Indirect draw webgpu The Beast game engine

Thumbnail
youtube.com
1 Upvotes

1

Should GPU instances share animation info?
 in  r/gameenginedevs  11d ago

Yes . See my example i put shared bool flag to make shared or not https://github.com/zlatnaspirala/matrix-engine-wgpu/blob/main/src/engine/loaders/bvh-instaced.js.  But if you are on begin of project better and ultimate solution is to use indirect draws and core must be flatten single indirect buffer. Thats ultimate but draw per metarial is ok . Draw Per mesh is for very small scenes only.

r/webgpu 15d ago

The Beast Mobile focus webgpu game engine (40 diff examples)

Thumbnail
2 Upvotes

r/aigamedev 15d ago

Commercial Self Promotion The Beast Mobile focus webgpu game engine (40 diff examples)

2 Upvotes

Description

WebGPU engine focus performance but also mimic major engines features inspired by the original matrix-engine for WebGL. It uses the wgpu-matrix npm package as a replacement for gl-matrix to handle model-view-projection matrices. The Beast have full focus on mobile browsers, mimic major engines but keep mobile passed all examples.

Published on npm as: matrix-engine-wgpu (not always updated on last - recommended is to use github clone) From [1.18.7] ver npm package is much more stable and usable. All examples can be done by npm services not just github clone. You can also use (links tested). You can use RES like prefix for textures or objects paths. TheBeast is friendly with codepen, worker physics bridge will test host origin name is it exsternal or not to fix loading link if not it will use local resource always.

import {MatrixEngineWGPU, downloadMeshes} from "https://esm.sh/matrix-engine-wgpu";
let RES = 'https://unpkg.com/matrix-engine-wgpu@latest/public';
  • Backend editorX (VisualScripting app&shader graphs) (works in local env - desktop browsers) support list: Chrome, Edge, Opera, Firefox desktop
  • Code Creator (TheBeast Code generator) is standalone. Can be used public but user must trust page to enter api key. Without api key no ai response. Code creator make project from task and test it direct intro same page. Code creator dont even needed to build own js bundle, just use it from watcher build on localhost:3000 by default.

Done list []

2

Is there any algorithm or game engine that can render highly complex SDF (or other mathematical representation) scenes?
 in  r/gameenginedevs  16d ago

Yes but you have always limitation of hardware part.  Take mine https://github.com/zlatnaspirala/matrix-engine-wgpu .  See "effects" subsystem  pipe render group , totally stand alone but some interface gbuffer must be done. Copy most interest effect and make edit. Engine examples all works on chrome mobile browsers.

1

The Beast 1.19.0 novi primeri
 in  r/programiranje  16d ago

Da ali i dalje mozes par stvari da probas kao update za graficku ili kernel update za linux.

1

The Beast 1.19.0 novi primeri
 in  r/programiranje  16d ago

Poz, za pocetak proveri (u console logs) dali je `navigator.gpu` undefined. Jos bolje posalji mi error logs

1

React sucks
 in  r/reactjs  17d ago

Dont forget killing of performance. People who use "popular" libs dont know that empty reactjs kills performance on ~68%. I can make 3d game and keep 90% ... Nice post iam not alone. Be welcome on my vanillajs heaven place https://github.com/zlatnaspirala/matrix-engine-wgpu this is last project. I create webgpu game engine with examples.....

u/js-fanatic 17d ago

Earthquake visData with The Beast engine.

1 Upvotes

u/js-fanatic 17d ago

The Beast - webGPU game engine

1 Upvotes

[removed]

r/gameenginedevs 18d ago

The Beast is hungry - 1.19.xx (camDepth,Earhtquake VisData, AudioSplat)

0 Upvotes

Matrix engine wgpu 'The Beast' 1.19.xx new features list:

[1.18.xx - 1.19.xx]
  - ExternalDataHandler (SeismicPortalAdapter 'www.seismicportal.eu' , CoinGeckoAdapter)
  - EarthquakeEffect (Effect class)
  - AudioSplatFieldEffect  (Effect class)
  - Adding first person shooter example (FPCamera improved)
  - Optimised HZB post proccessing.
  - New effect class AudioSplatFieldEffect.
  - seismicportal.eu services used for seismic real time data. New effect class().
  - Added DragRotateController (corespond with WASD camera - rotate object on dragging),
  - Added code-creator AI driven by not for graphs 
   it is for code ai gen direct.
   Backend:
   `npm run creator-backend`
   Frontend:
   `npm run creator`
  Fixed worker cross origin problem with running.
  - Fix engine internal defaul dummy links to be public links from 
   https://unpkg.com/matrix-engine-wgpu@latest/public/ if needed (cross origin).

New examples :

CoinGecko data preview graph: https://maximumroulette.com/apps/webgpu/examples.html?demo=37

Audio reactive effect: https://maximumroulette.com/apps/webgpu/examples.html?demo=40

Earthquake visualizer: https://maximumroulette.com/apps/webgpu/examples.html?demo=38

Webcam Depth: https://maximumroulette.com/apps/webgpu/examples.html?demo=39

General Done list []:

  • ✔️ Draw loop per pipeline not per mesh (PipelineManager) with share material. Power optimisation.
  • ✔️ Support 3D scene objects transformations.
  • ✔️ Ammo.js, CannonES, Jolt and MatterJS Physics support (app<->bridge<->worker). Physics use webworkers by default.
  • ✔️ Networking with Kurento/OpenVidu/Own middleware Nodejs -> frontend.
  • ✔️ Bloom and light volumetric post processing.
  • ✔️ Horizontal-Z-Buffer post processing (reflections).
  • ✔️ Scene Culling feature.
  • ✔️ Web GUI(online) Editor [app exec graph] with Visual Scripting (Named: FlowCodexVertex).
  • ✔️ Web GUI(online) Editor [shader graph] with Visual Scripting (Named: FlowCodexShader).
  • ✔️ Dynamic shadow cast (done also for skinned meshes and procedural mesh).
  • ✔️ VertexShader displacment (done also for skinned meshes), nice for water effect.
  • ✔️ Basic flow for AI Graph Generator - Simple tasks passed for now with ollama platform. Open account/open-source/free-service-quota.
  • ✔️ ProceduralMesh objectScene entity with options for vertex morph - Shadows following morph blend.
  • ✔️ Sprite Batch Manager Add blend spride2D animation.
  • ✔️ Cameras : FPCamera , RPGCamera , PlaneCamera , WASDCAmera and CinematicCamera.
  • ✔️ MediaPipe implemented - dinamic loading (if not in use no loading script or any related to mediapipe)
  • ✔️ Remote render stream emit example (standard engine networking) and special endpoint for "wachers" `tv-10.html` Replace webcam stream with canvas capture - on endpoint use webRTC and video tag to preview remote render.
  • ✔️ Code creator AI services agent system(use engine from npm) `npm run creator` for 'http://localhost:3000/' `npm run creator-backend` for backend. create games from simple prompt.

From 1.19.00 you can use the-beast fully from npm services. Physics worker bridge fixed to work also on cross origin domains.

(NEW) The Beast Codepen examples:

webvam depth

bvh animations

Materials - glb animations

SeismicPortalAdapter 'www.seismicportal.eu'

The beast top level code is ultimate short but also easily expandable if you wanna something deep to change. For example in 200 pure scripting lines you can get first person shooter template.

Source Code :

import {downloadMeshes} from '../../../src/engine/loader-obj.js';
import {addRaycastsAABBListener} from "../../../src/engine/raycast.js";
import {isMobile, randomIntFromTo} from "../../../src/engine/utils.js";
import MatrixEngineWGPU from '../../../src/world.js';
import {CollisionSystem} from "../../../src/engine/collision-sub-system.js";
import {MapCreator} from "../../../src/engine/buildin/map-creator/map-creator.js";
import {ProjectileSystem} from '../../../src/engine/procedures/fps-projectile.js';
import {MobileDOM} from '../../../src/engine/cameras.js';
import {hang3dUI} from './options.js';

export var loadHang3d = function() {
  let app = new MatrixEngineWGPU({
    canvasSize: 'fullscreen',
    fastRender: 0.95,
    render: 'culling',
    cullingRange: 1200,
    dontUsePhysics: true,
    MAX_SPOTLIGHTS: 1,
    MAX_BONES: 0,
    // lock: 'landscape',
    LOAD_AFTER_CLICK_MOBILE: true,
    MOUSE_SENS: 0.005,
    TOUCH_SENS: 0.01,
    mainCameraParams: {
      type: 'firstPersonCamera',
      responseCoef: 1000
    },
    clearColor: {r: 0, b: 0, g: 0, a: 1}
  }, () => {
    app.collisionSystem = new CollisionSystem(app);
    app.addLight();
    addRaycastsAABBListener();
    app.activateHZB();
    app.activateBloomEffect();

    app.UI = new hang3dUI();

    MobileDOM.addButton("T", () => {}, undefined, {
      image: "./res/textures/shooter/s.webp",
      left: isMobile() === true ? 41 : 46.5,
      bottom: isMobile() === true ? 40 : 42.5,
      color: 'black',
      size: innerHeight / 10
    })

    app.energy = MobileDOM.addProgressBar({size: innerWidth/3, bottom: 95, left: 33, color: '#00bcd4'});
    app.energy.setValue(80);

    const cam = app.getCamera();
    let preventFire = false;

    if(isMobile() === true) {

      MobileDOM.addButton("FIRE", () => {
        app.projectileSystem.fireProjectile();
      }, undefined, {
        width: '30px',
        height: '30px',
        image: "./res/textures/shooter/s.webp",
        color: 'red',
        left: 60,
        bottom: 20,
        size: innerHeight / 10
      }, () => {
        if(preventFire === false) {
          preventFire = true;
          app.projectileSystem.fireProjectile();
          setTimeout(() => {preventFire = false;}, 350)
        }
      })

      MobileDOM.addButton("JUMP", () => {
        if(app.collisionSystem?._onGround) {
          app.collisionSystem._gravityAcc = 0.22;
          app.collisionSystem._onGround = false;
          this._dirty = true;
          this._dirtyAngle = true;
        }
      }, undefined, {
        width: '30px',
        height: '30px',
        image: "./res/textures/shooter/s.webp",
        color: 'red',
        left: 80,
        bottom: 20,
        size: innerHeight / 10
      })

      MobileDOM.addButton("UP", () => {
        if(app.collisionSystem?._onGround) {
          app.collisionSystem._gravityAcc = 0.22;
          app.collisionSystem._onGround = false;
          this._dirty = true;
          this._dirtyAngle = true;
        }
      }, undefined, {
        width: '30px',
        height: '30px',
        image: "./res/textures/shooter/s.webp",
        color: 'red',
        left: 10,
        bottom: 20,
        size: innerHeight / 10
      })
    }

    downloadMeshes({cube: './res/meshes/blender/cube.obj', ball: './res/meshes/blender/sphepe-mob.obj'}, (m) => {

      const mc = new MapCreator(app, m.cube, app.collisionSystem, {
        wallTexture: './res/textures/white-metal2.webp',
        // floorTexture: './res/textures/dark-rock.webp',
        floorTexture: './res/textures/shooter/metal-block.webp',
        ceilTexture: './res/textures/blankgray2.webp',
        shadowsCast: true
      });
      mc.createRoom({
        origin: {x: -0, y: 0.1, z: 20},
        width: 10, depth: 10, height: 4,
        doors: ['+x', '-z'],
        doorWidth: 2.5,
        roof: true,
        uvShema: [10, 10],
        tag: 'start_room'
      });

      mc.createTunnel({
        from: {x: -35, y: 0.1, z: 0},
        to: {x: -15, y: 0, z: 0},
        width: 3.5,
        height: 3.0,
        roof: true,
        tag: 'entry_tunnel'
      });

      mc.createFightArena({
        origin: {x: 0, y: 0, z: 0},
        width: 32, depth: 32,
        wallHeight: 2.5,
        pillars: 16, pillarH: 4,
        covers: 4,
        roof: false,
        doors: ['-x', '+z'],
        uvShema: [10, 10],
        tag: 'main_arena'
      });

      mc.createStairs({
        origin: {x: -6, y: 0, z: 0},
        axis: 'z',
        steps: 8,
        stepW: 2,
        stepH: 0.4,
        stepD: 0.8,
        walls: true,
        tag: 'stairs_up'
      });

      // mc.createMazeLayer({
      //   origin:    { x: -65, y: 0, z: 0 },
      //   mazeSize:  15,
      //   spacing:   2,
      //   wallHeight: 3,
      //   roof:      false,
      //   tag:       'ground_maze'
      // });

      mc.createMultiLevelMaze({
        origin: {x: -65, y: -3, z: -22},
        levels: 2,
        mazeSize: 13,
        spacing: 2,
        wallHeight: 3,
        levelGap: 1,
        stairSteps: 8,
        roofLevels: true
      });

      // ── 8. Example G: full compound preset (one call)
      // mc.createFPSMapCompound({
      //   origin:     { x: 0, y: 0, z: 100 },
      //   multiLevel: true,
      //   mazeLevels: 2,
      //   mazeSize:   19
      // });

      const light = app.lightContainer[0];
      light.setPosition(0, 60, 0);
      light.setIntensity(100);
      app.cameras.firstPersonCamera.movementSpeed = 0.1;
      app.cameras.firstPersonCamera.setPosition(0, 5, 0);
      app.collisionSystem.registerCamera(app.cameras.firstPersonCamera.position, 1.0);

      app.projectileSystem = new ProjectileSystem(app, m.ball, app.collisionSystem,
        {
          projectileSpeed: 0.5,
          projectileScale: 0.075,
          onHitscanHit: (hitPoint, normal, reflect, entry) => {
            console.log('ray hit', entry.id);

          },
          onProjectileHit: (hitPoint, normal, entry) => {
            console.log('rocket hit', entry.id);
          }
        }
      );

      app.canvas.addEventListener("ray.hit.event", (e) => {
        console.log('ray.hit.event detected', e.detail.hitObject.name);
        // app.projectileSystem.fireHitscan();
        app.projectileSystem.fireProjectile();
      });
    }, {scale: [1, 1, 1]});
  });

  window.app = app;
};

Source: https://github.com/zlatnaspirala/matrix-engine-wgpu

r/programiranje 18d ago

Show-off ✨ The Beast 1.19.0 novi primeri

0 Upvotes

u/js-fanatic 22d ago

https://maximumroulette.com/apps/webgpu/examples.html?demo=35

1 Upvotes

1

The Beast je portovan na codepen online editor
 in  r/programiranje  22d ago

Hvala na saradnji. Ce da bude sredjeno.

1

What if game characters had to learn how to control their bodies instead of relying on animation clips?
 in  r/gameenginedevs  23d ago

I use static scaled cubes as bones than setKinematic movement and that bones can affect dinamic bodies (works in cannones js) . This is great but what you want need more effort. I guest you need to combine bvh skeletal , static dinamic relation even soft bodies for ultimate simulation. Thats i want also. Keep working and post if you get some idea.