TomaszFurca

Members
  • Content count

    83
  • Joined

  • Last visited

About TomaszFurca

  • Rank
    Advanced Member

Recent Profile Visitors

648 profile views
  1. Wow! I am looking for fog like that! Thanks a lot man! Check your fog in my game! -> https://streamable.com/x8nkv
  2. Dispose on NullEngine

    Thanks
  3. Dispose on NullEngine

    Hi, I using nullEngine to calculate some data on server site. When user logout from server i try to dispose his mesh from scene, but on dispose method call i got error: /var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:9511 this._gl.deleteBuffer(buffer); ^ TypeError: Cannot read property 'deleteBuffer' of undefined at NullEngine.Engine._releaseBuffer (/var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:9511:25) at Buffer.dispose (/var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:20511:30) at VertexBuffer.dispose (/var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:20661:30) at Geometry.dispose (/var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:29978:43) at Geometry.releaseForMesh (/var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:29811:22) at Mesh.dispose (/var/www/babylon/bower_components/babylonjs/dist/preview release/babylon.max.js:23116:32) at /var/www/babylon/server/dist/server.js:108:37 at Array.forEach (native) at Socket.<anonymous> (/var/www/babylon/server/dist/server.js:96:30) at Socket.Emitter.emit (/var/www/babylon/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20) at Socket.onevent (/var/www/babylon/node_modules/socket.io-client/lib/socket.js:270:10) at Socket.onpacket (/var/www/babylon/node_modules/socket.io-client/lib/socket.js:228:12) at Manager.<anonymous> (/var/www/babylon/node_modules/component-bind/index.js:21:15) at Manager.Emitter.emit (/var/www/babylon/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20) at Manager.ondecoded (/var/www/babylon/node_modules/socket.io-client/lib/manager.js:345:8) at Decoder.<anonymous> (/var/www/babylon/node_modules/component-bind/index.js:21:15) Tom
  4. Verify user actions - security

    Today i prepare first version of monster control by server. Let's see effect: https://streamable.com/urixt left screen game, right screen server scene :). Actually i work on problem with sync positions on client and server, also i found some problem with dispose mesh on NullEngine. I will write that on bugs forum.
  5. Draw calls of submeshes

    Thanks for replay. Today i check exporter option to bake textures. It works, but as you wrote earlier, alpha not work correctly - https://playground.babylonjs.com/#199KHL#4 preview of my scene. Behind totem, on right side of dog you can see bugged nature elements. So I decided to do that manualy. Tom
  6. Hi, I writing my RPG game, now is time to do something about security. I have problem with scenario attack player and monsters movements. I using socket IO. When player moving monster attack area intersection is checking on client side, so i think is not secure, because user can block this event. Then monster newer go to player location and don't attack him. Next problem is attack of player, when player attack collision is check on client side - it can be verify on server, which monsters you can attack on actual player position and how many times you can attack in some time. So i have some questions. What you think about create monster server - socket io client, which connect with socket io server of game, which get player and monsters positions. On monster server I run BABYLON engine with simple boxes, which reconstruct real scene - then monster will attack and moving using serer side. What do you think about this? What with attacks? It should be verify on monster server or simple calculations of positions (players and monsters)? Maybe do you have other idea to do that. Maybe do you know some disadvantages of my idea? Thanks for help Tom
  7. Draw calls of submeshes

    Hi, three days ago imported scene from bledner from my designer. It is new map - town. In PG i put only some meshes for show my problem. https://playground.babylonjs.com/#199KHL#2 Let's check for draw calls, you can see 9 draw calls for mesh Ivy.002 - I think this is related to submeshes. is it any way to optimize that to reduce draw calls? Actually we have 200-250 draw calls on 120 meshes (without instances). I think this number is to big. Tom
  8. Best way to create tooltip

    Hi, yesterday i was start develop gui tooltips. Tooltips are show using events onPointerEnterObservable and onPointerOutObservable. Now I try to set container above base control (for example button). Creating tooltips as parent of button I can't make my tooltip bigger than parent -> https://playground.babylonjs.com/#0HT3SZ#3 I think good way is creating tooltips as parent of main stack panel, but i have problem with absolute position of tooltip. It is shown below button, I can create tooltip before button and then it show above button, but then position of button has been changed. https://playground.babylonjs.com/#0HT3SZ#4 https://playground.babylonjs.com/#0HT3SZ#5 Tom
  9. I prefer to do that like this: <?php $jsval = json_encode('PHP Value'); ?> var jsval = '<?php echo $jsval;?>'; I think about ' ' between php code in js, because in case of null value of php variable js will terminate due to syntax error;
  10. SPS and skeleton animation

    I create my field of grain using instances, but perfomance would be better using SPS, but I cannot do that using SPS. let grain = self.game.factories['nature_grain'].createInstance('Grain', true); grain.scaling = new BABYLON.Vector3(1.3,1.3,1.3); grain.position = new BABYLON.Vector3(22.32,0,-103.46); grain.skeleton.beginAnimation('ArmatureAction', true); for (let i = 0; i < 1000; i++) { let offsetX = (Math.random() - 0.5) * 60; let offsetZ = (Math.random() - 0.5) * 10; let instance = grain.createInstance("instance" + i); instance.parent = grain; instance.skeleton = grain.skeleton; instance.position.x = offsetX; instance.position.z = offsetZ; } Effect like this: https://streamable.com/wxygk
  11. SPS and skeleton animation

    So, using SPS i cannot run skeleton animation, because all meshes are one big mesh. Today i try to make my animation using another method. I will write new post in this topic. Thanks for help.
  12. SPS and skeleton animation

    Hi, I try to run animation of skeleton on my SPS, but i don't work. Simple code: let SPS = new BABYLON.SolidParticleSystem("SPS", scene); SPS.addShape(meshP, 50); let mesh = SPS.buildMesh(); mesh.material = meshP.material; mesh.skeleton = meshP.skeleton.clone("clonedSkeleton2"); SPS.afterUpdateParticles = function(start, stop, update) { mesh.skeleton.beginAnimation('Skill01', true); } SPS.initParticles(); SPS.setParticles(); Thanks for help Tom
  13. Scene dispose freeze BJS

    Next problem - when i want dispose scene in intersectionEnter event in action manager i got error. Check it on PG: https://www.babylonjs-playground.com/#WWCK0#44
  14. Scene dispose freeze BJS

    On PG i cannot replace this problem, so i start to debug source code of BJS and found problem there: Scene.prototype.disposeSounds = function () { this.mainSoundTrack.dispose(); /// This line of code freeze my TAB ... }; In my project I register some empty BABYLON.Sound (without file) and then scene cannot be disposed. After remove empty BABYLON.Sound it works!
  15. Scene dispose freeze BJS

    Open my game http://babylon.furcatomasz.pl/. And go your player to fireplace (there is pinned event to change scene) and then window with game will be frozen. I don't know how can i debug it.