Leaderboard


Popular Content

Showing content with the highest reputation on 02/26/17 in all areas

  1. 3 points
    Only two more days, looking forward to every entry! Hype!
  2. 2 points
    Thank you! Now I we know about that and we can fix it: https://github.com/pixijs/pixi.js/pull/3787
  3. 1 point
    You need to make the body a separate child sprite and move the arm behind that. Use a transparent image (same size as the body) for the main sprite.
  4. 1 point
    RaananW

    BabylonJS/Gear VR

    @juanmajr93 Yes, I am going to work on Babylon's WebVR support in the very near future. The bug you are describing might shed some light as to why the current implementation doesn't work - we don't fall back to WebVR 1.0, but Three.js does. VRFrameData is part of the WebVR specifications - https://w3c.github.io/webvr/#interface-vrframedata . We have made a strategic decision back when 1.0 changed to 1.1 to support only the latest version of WebVR. It seems like Samsung's GearVR web browser is still using WebVR 1.0. I found this - https://uploadvr.com/samsung-updates-webvr-support-gear-vr/. The change between 1.0 and 1.1 is, IMO, a change from pre-alpha version to a stabler alpha. It is not 1.1, it is more of a 2.0 for me. They use different classes and different concepts. I will, however, say this - if I find and easy way to fall back to WebVR 1.0, I will do my best to support it in Babylon.js. I just don't want to get too much into "hacks" and spaghetti code in order to support a version that will be gone from the (VR) world in a few months.
  5. 1 point
    ivan.popelyshev

    Disable sprite smoothing?

    It was approved by two others, was merged and after a second i hear the sound that someone answered in forum.
  6. 1 point
    Dad72

    Scene optm

    This : var EngineOptimizer = function() { var result = new BABYLON.SceneOptimizerOptions(60, 2000); var priority = 0; result.optimizations.push(new BABYLON.ShadowsOptimization(priority)); result.optimizations.push(new BABYLON.LensFlaresOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.PostProcessesOptimization(priority)); result.optimizations.push(new BABYLON.ParticlesOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.TextureOptimization(priority, 256));// Next priority priority++; result.optimizations.push(new BABYLON.RenderTargetsOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.HardwareScalingOptimization(priority, 4)); return result; }; BABYLON.SceneOptimizer.OptimizeAsync(scene, EngineOptimizer());
  7. 1 point
    Temechon

    moveWithCollision ellipsoid size

    Drawing the ellipsoid, with totally empiric values : http://www.babylonjs-playground.com/#1E3DCH#4
  8. 1 point
    Hi Hans. No working-around needed. Un-parent everything from camera. Perhaps try followCamera with .lockedTarget to track player. And... player is a physics object, yes? So, we don't use .rotation on physics objects, right? player.physicsImpostor.physicsBody.angularVelocity.y = 5; (value dependent-upon ground-player friction settings) You can also use a dual applyImpulse to rotate around a single axis, but that's more difficult. I had a nice demo playground for ya, but I lost it in a browser crash (didn't save often enough). FollowCamera has some nice "knobs and dials" to play-with... like acceleration and max speed, as well as rotational and positional offsets. Crank-up its acceleration, and it will "stay with" a moving player quite nicely. MAKE SURE you use .lockedTarget and not .target. AND make sure you set its .lockedTarget AFTER you create its target (player). Aww heck, I'll remake the PG I lost: http://www.babylonjs-playground.com/#2BCRRW#1 Now, using a follow camera, which doesn't allow mouse-around, which sucks. Not sure why that is. I am using angularVelocity.y for your 'R' key, now, and I installed a quick skybox to make things prettier. I removed the gray box... it was too boring. I also made the ground smaller, so I could see more pretty skybox. But now your player-move impulses are too powerful. Player falls easily. No keys move the camera, now. But followCamera is also following player MOVES, nicely. Anyway, .target and .lockedTarget had some changes, recently. There was a property name conflict found, I think. FreeCamera might use .lockedTarget and .target... differently than before. Some playground examples, forum posts, and documentation... MAY BE outdated/superseded (wrong). Under certain circumstances, you might try repeatedly setting .target inside a render loop (perhaps for freeCam or arcCam). Don't set .lockedTarget inside a render loop, though. That would probably waste CPU cycles. Parenting cameras to mesh DOES have uses... but... when physics impostor is the boss of the parent mesh, the parent mesh might NOT be handing-down its .position, .rotation, and .scaling (the big three)... to children. Parents NORMALLY hand-down "the big three" constantly, but not necessarily true when parent is controlled by physics impostor. Physics impostor wants to be FAST and might not have time to update big-3. *shrug* Not sure. Something to watch-for. Install some console.logs of player.position and player.rotation (just AFTER doing a physics move/rotate). Just possibly, they don't get updated... and so... CHILDREN of them don't get updated either. In other words, a camera parented to player might not rotate/move... when you rotate/move player impostor with impulse or velocity. Perhaps impostor activity is not handed-down thru parent-children. Test to see. Hope this helps. Be well.
  9. 1 point
    davrous

    BabylonJS/Gear VR

    We need to spend time stabilizing our WebVR support. Thanks for your feedback. With @RaananW, we're planning to work on VR support in the next weeks. Stay tuned. David
  10. 1 point
    fenomas

    Expensive computing solution.

    Same answer as before:
  11. 1 point
    Dad72

    ground from heightFieldImpostor

    By creating a field with CreateGround, and then serializing it, you get a mesh and not groundMesh. This is what I do for my terrainEditor. And to get the height of a dots on this mesh, I do this: var getHeightMeshAtCoordinates = function(mesh, x, z) { var maxHeight = 256; var ray = new BABYLON.Ray(new BABYLON.Vector3(x, maxHeight, z), new BABYLON.Vector3(0, -1, 0), 2*maxHeight); var res = mesh.intersects(ray, true); return res.pickedPoint.y; };
  12. 1 point
    PhasedEvolution

    HTML strategy game. Logic

    lol... I think mUnduli is right...
  13. 1 point
    Temechon

    Stop and remove all animations on mesh?

    Try this : scene.stopAnimation(mesh); mesh.animations = [];
  14. 1 point
    prvi_treti

    HTML strategy game. Logic

    If state change is also a DB update, what's difference beside allowing n clicks instead of Xn? The problem is already about propagation time. Assume a similar scenario, there is a marketplace people buying stuff. Three different players want to buy same item at the same time, what state there is to change even if you can? Still best bet seems to be using an in-memory solution, maybe queueing all queries might help as well but there'd be performance hit.
  15. 1 point
    Igor Georgiev

    Overlaps not working

    It is strange that it works during update. I don't think it is a good idea to set background color 60 times a sec. As for the game.physics.overlap, weird as well that it doesn't work for me as well, but I don't think it should be in the update method as well..... weird.
  16. 1 point
    squilibob

    Strange Behavior of a rectangle

    When you set the width of a rectangle like that it actually sets its scale to fit instead of reapplying the width. What you should do instead is clear and redraw the rectangle: create: function() { this.timeBarLength = 300; this.timeBar = this.add.graphics(0,0); }, update: function(){ if (this.timeBarLength) this.timeBarLength -= 1; this.timeBar .clear() .lineStyle(5, 0x0000FF, 90) .beginFill(0x00FF00) .drawRect(30, 60, this.timeBarLength, 30) .endFill() }
  17. 1 point
    nodeJS would be more than capable of handling what you need (so would most anything though), the number of frameworks/db choices is staggering though. Scoreboards are fairly easy, but, depending on how complex you want to go cracking user accts can be trickier, usually due to auth and the level of security you want to use. I've experience with Koa, Express and Hapi for nodeJS, all are well documented, well supported and very easy to use. DB's you have lots of choices, simple key-value stores are probably easiest for you with stuff like Redis and Couch being very fast in-memory stores (on-disk persistence, which you'd need, can be configured), I can also vouch for RethinkDB which is a relational document store, its likely more than you need but its easy enough to setup and very fast. I wouldn't recommend stuff like Mongo but, again, its very capable of handling what you need. Create or use a RESTful api and communicate via ajax/fetch. RethinkDB supports web sockets out of the box and has a very nice streaming api which might be nice i.e. to see scores on the scoreboard update in real time, but, that would depend how complex you want to go, its not too tricky but just making a fetch request for the current state of the scoreboard is easier. There may be services out there that can handle these sort of things for you (for a price, maybe try Firebase, I've never used it so can't really comment on whether it would fit for you).
  18. 1 point
    Temechon

    How to contribute to Babylon.js

    Hello everyone! I just finished an article about how to contribute to Babylon.js engine (the exact same process can be applied to the Documentation, or any repository). It can be found here: http://pixelcodr.com/tutos/contribute/contribute.html It talks about creating a fork, cloning it, setting up Visual Studio compiler, and create a pull request. If you have any questions about it, I'll happy to help
  19. 1 point
    trampiton

    2D artist for hire (15usd/hr)

    Thanks for the appreciation Steve, I'm raising the prices a bit these days but still keep it under 15 usd/hr so that indie studios and individuals could afford it. Here is a new one to add some interest to this post )
  20. 1 point
    You could access the graphicsData property of your graphic. The data it holds are all paths defined as: {lineWidth:this.lineWidth, lineColor:this.lineColor, lineAlpha:this.lineAlpha, fillColor:this.fillColor, fillAlpha:this.fillAlpha, fill:this.filling, points:[], type:PIXI.Graphics.POLY} However pixi will always redraw the whole graphic (all 1000 lines) whenever you call the render function unless you have cached your graphic as a bitmap. It's probably much easier to just discard the old graphics object and create a new one when you are changing something instead of fiddling around with the pathdata.
  21. 1 point
    mokargas

    New to Phaser - JPG and Animated Gif

    For those that follow, I found a passable tool to do this on Github. It's a Photoshop script https://github.com/mediochrea/SpritePlane
  22. 1 point
    rich

    New to Phaser - JPG and Animated Gif

    Yeah, there are tools out there to do that for you.
  23. 1 point
    mokargas

    New to Phaser - JPG and Animated Gif

    Thankyou Rich. I found out my JPG was corrupted. I guess to get the gif to work, it's just a matter of breaking it down into a spritesheet of individual frames.