Search the Community

Showing results for tags 'nullengine'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 5 results

  1. NullEngine dispose throws error

    Hi, when I dispose null engine after unit test get error; // before unit test var engine = new NullEngine(); var scene = new Scene(engine); // after unit test is executed engine.dispose(); TypeError: Cannot read property 'deleteProgram' of undefined at NullEngine.Object.<anonymous>.Engine._deleteProgram (node_modules/babylonjs/dist/preview release/babylon.max.js:9898:26) at NullEngine.Object.<anonymous>.Engine.releaseEffects (node_modules/babylonjs/dist/preview release/babylon.max.js:11840:22) at NullEngine.Object.<anonymous>.Engine.dispose (node_modules/babylonjs/dist/preview release/babylon.max.js:11874:18) Using: 3.1.1 babylon
  2. Hi, Tried to unit test my util function that involves Vector3.Project and it returns Vector3 with infinity in it. Doing something wrong? var engine = new NullEngine(); var scene = new Scene(engine); var camera = new ArcRotateCamera("camera", 0, 0, 0, Vector3.Zero(), scene); scene.render(); var pos = Vector3.Project( new Vector(0.5, 0.5, 0.5), Matrix.Identity(), scene.getTransformMatrix(), scene.activeCamera.viewport.toGlobal( engine.getRenderWidth(), engine.getRenderHeight(), ); // pos is Vector3 { x: Infinity, y: NaN, z: -Infinity } Using: 3.1.1 babylon
  3. Hi, is it by design that NullEngine.getHardwareScalingLevel returns undefined? var engine = new NullEngine(); var scene = new Scene(engine); engine.getHardwareScalingLevel() //returns undefined Using: 3.1.1 babylon
  4. NullEngine in v3.1

    Hello! I've been diligently working on my game, and recently came upon the recently released BabylonJS v3.1 ... and I am super excited about NullEngine! My game is multiplayer client/server; the server component is Node.js running ActionHero v18 (and of course the client is running BabylonJS!). Taking a look at the documentation and accompanying example for NullEngine, it seems it does not run 100% out of the box. However... I've been able to get everything up and running under Node 8.9.3 with a combination of mock-browser, EventEmitter, xhr2 and sheer luck // assume this file is saved as mock-browser.js 'use strict'; const EventEmitter = require('events'); class ProgressEvent extends EventEmitter {} module.exports = { setupMockBrowser: () => { const MockBrowser = require('mock-browser').mocks.MockBrowser; const AbstractBrowser = require('mock-browser').delegates.AbstractBrowser; let window = MockBrowser.createWindow(); let opts = { window }; let browser = new AbstractBrowser( opts ); global.window = window; global.navigator = browser.getNavigator(); global.document = browser.getDocument(); global.XMLHttpRequest = require('xhr2').XMLHttpRequest; global.ProgressEvent = ProgressEvent; } }; To use this, it is as simple as: require('./mock-browser').setupMockBrowser(); I'm curious to know a few things: 1) Since the game supports multiple users interacting in different areas (e.g. multiple "rooms", multiple users per room, users can only interact with others in the same room) it makes sense to me to manage these "virtual player namespaces" separately, as one BabylonJS Scene per "room". Does this sound like a good way to divide up the game? Are there software limitations of managing multiple scenes simultaneously? 2) Since the game-server has many other responsibilities (database saves, websocket clients, periodic tasks via a task-runner) it seems wisest to manage the client-side-equivalent of the "render loop" in a periodic task, which would be responsible for updating objects' positions based on velocity, testing collision, and issuing events (via websockets) to game clients based on movement updates/positioning rather than the typical engine.renderLoop(). I don't need the updates to be real-time, but do need them to occur 'quickly enough' (e.g. every 100ms) that my game-server can keep up with the number of objects per-scene. Does managing my own engine.render() seem sane? (Now that I write this out I feel that updates and rendering are unrelated. I guess we'll see...) 3) For geometry collision, I'd like to have "proximity" and "actual" collision-testing; perhaps BoundingSphere for quickest/optimal proximity-testing, and BoundingBox derived from a mesh for actual collision. Good idea? Terrible? I'd love to hear the community's thoughts, and thanks for the amazing NullEngine update!
  5. Hey! I'm using NullEngine on a server to check for certain conditions in a physics-enabled scene (using deterministic lockstep). As a simple example, I'm trying to find the specific step ID where a specific ball's y position falls below 0. My question is this: how should I set up the engine/scene/etc. in order to run these server-side simulations at the highest possible fps? Keep in mind that I want to be able to derive a list of step IDs on the server that correspond with specific events (re: ball.position.y < 0), and then have that same exact scene play in a browser with the same exact events matching the same exact step IDs.