All Activity

This stream auto-updates     

  1. Past hour
  2. alessa

    HTML text input within Phaser canvas

    Hey, can you please provide me some info on how you load it into the project? I managed to load it, but then I try `this.add.plugin(PhaserInput.Plugin);` and it gives an error `Uncaught reference Error: Phaser is not defined`. I am using @samme Brunch template for phaser 2 though, so that might be the issue?
  3. @Pryme8 I only wrote this post so that I don't have to look at your picture anymore! My icon is much cooler... Yet I do agree with your last post. Call me, don't be a stranger... DB
  4. Hello, In your code: https://studio.rocketclowns.com/agnes/canvas/rocketLander/main.js?v=201806111547 You're updating the camera position with this code: camera.position.x += ((userX * 256) - camera.position.x) * 0.05; camera.position.y += ((userY * -128) - camera.position.y) * 0.05; But scene.pointerX is a undefined at the beginning when the mouse is out the canvas then the camera.position.x & y become NaN and thus the update Audio parameter function fails. The solution is either to test for undefined on pointerX and pointerY before computing your position or to register your "mousemove" event on the canvas element rather that on the window object. David
  5. Wingnut

    New GUI control: The Grid

    Hmm... I just had another demented idea. GUI ViewportControl. We don't need the RTT to feed an ImageControl... when we can fill rects/grid-cells with viewports! (viewportControls) OMG! A GUI viewportControl would be SO COOL! SO handy for mini-maps. But... mini-maps often need "where upon the map did user click"... so we would need to ensure that the pick-position upon the viewportControl... is public/exposed. For ImageControls (and maybe ButtonControls), it might already be so/true. I have a funny feeling... that viewports are just an application of RTTs (render target textures)... and might suffer from the same problems. BUT... this time... we are not asking the DOM-ish ImageControl to display something non-DOM... like an RTT. We are creating a whole NEW control. The viewportControl does not need to be ANY BIT DOM-ish... for it never deals-with URLs. hmm. Hurry, somebody build one! ----------------- Anyway, I'm going to use the grid control... to attempt to teach myself 4x4 matrices. I might be switching OFTEN between full-screen-based grids, and mesh-texture grids. Flat full-screen grids will be the "editable" grids/matrices. Mesh-based grids/matrics will be standing-by along the sides of the scene... ready to perform multiplications with other matrices. View matrices, projection matices... worldspace matrices, rotation, translation, scaling, we might be able to visually demonstrate ALL of it, and see it happen real-time. I was inspired by DK's real-time particleSystem editor. Why not a real-time matrix transformation editor, right? Power-learning, from your friends at BJS. A very very visual... beginner-level matrices tutorial. Matrices are a difficult-to-teach subject, and the new GUI GridControl opens some new doors to some new teaching attempts... including myself. See ya later in The Wingnut Chronicles... for more from The Great Matrices-For-Dummies Project. Help/starters/spear-headers welcome.
  6. prob

    Absolute position of sprite

    You could calculate it using the container position (sprite.parentContainer.x/y).
  7. Prexxla

    Rotate Object Once

    Thanks a lot man much love
  8. ftguy2018

    Sprite Atlas with texture & bug in the Spine Plugin

    Hello, any chance to have this Spine bug / Atlas reviewed ? Not being able to make atlas is not a so big issue thought I am always looking for best performances and memory footprint but spine plugin not working properly is holding our project. Please kindly advise.
  9. Today
  10. Outfire

    Doubt: How to find these images using pixijs?

    @Charles Pimentel They use a lot of pictures for 360° effect. And when you drag image, with moving mouse left or right, they change current image.
  11. @zzzen Why not utilize line2d to draw lines using an array of your mesh's vertices'? This will give you variables to customize as well, and it can be dynamic in many other ways. DB
  12. dbawel

    MRT not supported on IOS?

    @BMWPilote I drew from this Github code.: https://github.com/BabylonJS/Babylon.js/blob/master/dist/previous releases/babylon.2.4.d.ts Check lines 45, and 172. Works on IOS. DB
  13. Hiya zzzen. You might need to set the wireframe "overlay" mesh... .checkCollisions = false; Or, if physics-colliding, make sure it has no physics impostor. You might also want to set the wireframe mesh.parent = actual mesh.
  14. dbawel

    Save a scene

    @Mekaboo For me, I always have to load both the mesh and then it's bones separately. There's plenty of examples here on this fantastic forum. Oh, and you'll need to start the animations once the scene is loaded again. DB
  15. dbawel

    how to pick mesh without backface?

    @Ozymandias Check the direction of the normal when picking. Simple... DB Edit - I just found this code written by the talented @yuccai which should help you integrate:
  16. dbawel

    How to get circumference of mesh?

    @ozRocker You always have interesting challenges. However, if this were my challenge, I would use a small texture of a known length to wrap around any specific area of the mesh. Then since it's tiled and I know the PX length, I can handle the rest of the calculations based upon how many times the image is tiled. You can attach this to any event, and hide the texture when you don't need it. That's my thought of the day ('night'). DB
  17. MackeyK24

    Navigating while animating

    Yo @Spankied .. BTW... If your guy is facing the wrong way... Try -Math.atan2 Hope the updated code above works for ya
  18. Fredrik

    Absolute position of sprite

    How can I get the absolute position of a Sprite or Image in the world? I have a Sprite that is inside a container with scrollFactor of 0 and I want to move other sprites outside the container to that position. Basically this question but for Phaser 3 =) - http://www.html5gamedevs.com/topic/5306-absolute-position-of-sprite/
  19. traxtrack

    Scaling Tilemap

    I am trying to scale things properly but I have huge issues, I read other topics like meine but the solutions did not work out, I cant figure out where my issue is. Thanks in advance guys. 1. So this part of the code makes my bg image look good on any device, but I cant use this to set the image to autoscroll on th Y axis: scaleRatio = window.devicePixelRatio / 3; var road = game.add.image(game.world.centerX, game.world.centerY, 'road'); road.scale.setTo(scaleRatio, scaleRatio); road.anchor.set(0.5); 2. So after some research I am doing this: road = game.add.tileSprite(scaleRatio, scaleRatio, 800, 600, 'road'); road.width = game.world.width; road.height = game.world.height; The problem with this code is that the background image wont scale right on mobile devices. on devices with window.devicePixelRatio == 2 the image will be huge, it wont even resize at all. In case some is wondering this is my config setup: console.log('Game state loaded'); scaleRatio = window.devicePixelRatio / 3; // var carTurnSpeed = 150; var countcars = 0; var car; var obstacleGroup; var canMove = true; var goleftonce = 2; var gorightonce = 2; // OBSTACLES vars var obstacleSpeed = 800; var obstacleDelay = 700; var platforms; var score; // Get device sizes var w = window.innerWidth * window.devicePixelRatio; var h = window.innerHeight * window.devicePixelRatio; var game = new Phaser.Game(w, h, Phaser.CANVAS, '', { render: render, }); game.state.add('boot', bootState); game.state.add('load', loadState); game.state.add('menu', menuState); game.state.add('play', playState); game.state.add('gameover', gameoverState); game.state.start('boot');
  20. Nodragem

    Superpowers + Phaser 3?

    Hello, I know there is already an awesome editor for Phaser 2 and 3 (https://phasereditor2d.com) but I came across this collaborative editor: http://superpowers-html5.com/index.en.html The idea is to be a collaborative IDE to build games. It is meant to be engine agnostic although they developed a version working with three.js to offer a full game dev experience. What was amazing is that you could make 2d or 3d HTML5 games with it. Knowing that Phaser 3 may start to offer 3D rendering, it may start to need a 3D editor soon (3D is quite cumbersome without an editor). Furthermore one fun way to use Phaser is collaboratively (I had a lot of fun with it during GamJams). Thus, I was thinking parts of Superpowers could be reused/revived to be a Phaser 3 IDE or could just inspire new features in Phaser Editor.
  21. andrei.nicolae

    Sprite with alpha

    Hi guys, I have a tiny sprite placed in a png sized like the game, with alpha, so I only see my tiny sprite surrounded by blank space. It's done this way because I want to place it in (0, 0) and be displayed in it's original position. So, I'm trying to place this sprites and they all go in the same place, center of the screen, like they are trimmed sprites. Any solution for this? Thank you.
  22. BlackShadauw

    GLTF dont apply alpha/transparency

    Hi all, for me it dosent work properly, i need to cheat a little. After using your settings BghGary, i must to force with javascript the alpha mode to "0.X" and to force transparencyMode to "2" to have some transparent effect. Nothing happend with only the GlTF file.
  23. SvenFrankson

    How to get circumference of mesh?

    Your hit variable is never null, there's a boolean property hit.hit telling you wheter your ray touched something or not https://www.babylonjs-playground.com/#KNE0O#94
  24. MackeyK24

    Navigating while animating

    Yo @Spankied ... I dont think you need to use LookAt... Again that does rotation on all Axis... I think you you can just rotate (turn) with the rotation alpha from direction. Try something like this: let navpoint:BABYLON.Vector3 = GetCurrentNavPointFromPaths(); let navposition:BABYLON.Vector3 = navpoint.subtract(collisionMesh.position); let navdirection:BABYLON.Vector3 = navposition.normalize(); let navrotation:number = Math.atan2(navdirection.x, navdirection.z); collisionMesh.rotationQuaternion = BABYLON.Quaternion.RotationYawPitchRoll(navrotation, 0, 0); collisionMesh.moveWithCollisions(navdirection.scale(movementSpeed)); You can optimize of course using the "ToRef" versions of the API functions. UPDATE I tested this with nav points in front, behind and above the collisionMesh... Keeps the collisionMesh from Pitching and Rolling... And it does rotate toward then moves with collisions to the nav point. Seems to work for me
  25. pietf

    [Phaser] Mafia Pool Tricks

    Such useful feedback! Thanks a lot!
  26. Now there are two more game scenarios where you can choose the terrain you like!
  27. Gio

    Wade 4.0

    Hi @kolkat I couldn't tell you if it's better or worse than others, I've only ever used Wade. I can tell you it's pretty good, but I may be biased We've made some moderately successful games with it. Maybe try it and see if you like it? We also have some isometric tutorials if you look on our site. To answer your question, in the past we used to have a freemium model whereby you'd purchase some "premium plug-ins". But it was too much effort to maintain the e-commerce side of things compared to how much money we were making with that, so yeah now it's all completely free. I'm afraid all the info on that site you mentioned is terribly outdated.
  1. Load more activity