Jump to content


  • Content Count

  • Joined

  • Last visited

About Yora

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1409 profile views
  1. Hi, I'm wondering if there is a way for the pointerup callback to be called even if the pointer is released outside of the input area: var slotDragZone = this.scene.add.zone(102, 0, 480, 100).setInteractive(); slotDragZone.on('pointerup', this.slotDragButtonUp); Currently, slotDragButtonUp won't be called unless the pointer is released within the input area, and I have a lot of functions that rely on that occurring (migrated from Phaser 2). I've been digging around the Phaser 3 code to find a way to do it but haven't been able to figure out a viable solution that doesn't involve extens
  2. When it comes to a UI with multiple windows that can be dragged around, each with dynamic amounts of sprites/sub-containers, would something like a Scene for each individual window make any sense? Or would it be better to have the one UI scene and Containers for each window? In v2, I had a windowGroup that contained all the primary windows as Groups, and some of those windows contained dynamic numbers of Groups that were like slots with additional information per existing character. If containers can't contain other containers, I think I can adjust these slots to be v3 Groups, then call
  3. There it is. Migration has been smooth and easy for me so far, however I feel caught in limbo with how to handle what was once groups, since they no longer have a transform to influence their children (ex. dragging around UIs). I know containers are in the pipeline, but until then I wonder what I should do, maybe hack the Group class in some way temporarily. I already grabbed the getByName function from the List class and put it into Group since I was using that a lot. For the moment for me at least, Groups, Lists and Containers feel a little ambiguous, but I know they are separ
  4. Same here. I believe it's still planned however, maybe to be seen in the next newsletter, so personally I'm waiting for it before migrating. I fully respect and understand any delays with it though, the progress on Phaser 3 as a whole has been amazing.
  5. It may be an asynchronous action, so maybe something like this will work. //SERVER socket.on("connection",function(socket){ socket.emit("websocket",dateJSON); //dateJSON is a date brought from the datebase, for example the username console.log("The server send a message to client"); }); //CLIENT var UserName; var socket = io.connect("http://localhost:8000"); socket.on("websocket",function(date){ UserName = date[0].username; //Like that because I need the username from the JSON log(); }); function log () { console.log(UserName); };
  6. Before calling state.start you may need to do a little manual cleanup first, like removing your event listeners, setting your array lengths to 0 (ex. this.garbage.length = 0, assures the array is cleared out and any objects referenced by it can be cleaned up by the javascript GC (Garbage Collector)), and calling destroy on sprites.
  7. Yora

    GameState torture

    Do you see the Game2 state when you call this.state.states? Are you calling remove/destroy on any state objects somewhere? Does calling this.state.checkState("Game2") before starting that state return false? Have you tried loading the game2.js file at the bottom of the HTML file? Kindof obvious questions that will likely be false, but it could also be something obvious being missed that's causing the problem.
  8. Awesome stuff! Cut down from 50 something draws to 2, such a massive difference X_X. Though it seems like when bitmapTexts are visible it adds more draw calls even though I have their textures listed in my 'keys' array along with the rest of my textures (13 in total, on a modern PC) and am calling setTexturePriority(keys), but the call is applying for all my other texures as intended. I wanted to give the tilemap system a go since I'm making something that involves a lot of isometric tiles, but as I was spending time trying to manipulate the tilemap classes to work isometrically I decid
  9. You can use masks to not have the inventory area span the whole screen, for example: var subMenu; var mask; subMenu = this.game.make.image(x, y, 'sprites', 'ui/ui_bottom_right_menu_sub_back_3'); subMenu.name = 'subMenu'; subMenu.alpha = 0; mask = this.game.add.graphics(x, y); mask.beginFill(0xffffff); mask.drawRect(0, 0, 200, -300); subMenu.mask = mask; As for the rest with scroll bars and etc, I think it's too specific to be something included in this framework by default, but all the tools to make it are there. There's some math involved depending on the height of the scrolling co
  10. Awesome, and glad to hear you're taking the chance with pixi v4. I'll keep my fingers crossed for you too
  11. I support the idea of switching to pixi v4, and the main loop improvement. Performance is crucial, and if pixi v4 is a good improvement it will benefit many people, albeit a heavy decision to make.
  12. No issues here, and the performance is greater than ever. Awesome work!
  13. Aaah I'm not sure how I missed how this was the change, but the fix to my original resolution problem was actually in the cocoonjs launcher settings where I had to disable the "WebGL screencanvas" option, then my game filled the screen again. I'm not sure what this option is for, though. Using generateTexture on any display object and then using that texture on a sprite/image is still giving me the same problem though. It seems to work okay the first time I do it (although instead of transparency in the background of the texture it's solid black), then any subsequent textures formed by gen
  14. Yes, there is no problem having it work in Phaser.Canvas mode, it was only occuring in WebGL on Canvas+. However when I accidentally uploaded an older version of my game code, suddenly the scaling problem was gone and the entire screen is filled again, and I haven't even been able to replicate the problem after I replaced my current main.js with the old one, so I'm not sure what fixed it to share the information. The bitmap text used as a texture as shown below is still creating the distorted image as before, only with WebGL on Canvas+. I'll keep trying to fix. var _time = _game.make.bitm
  15. I've been having an issue with scaling after upgrading to Phaser 2.4.4 while using WebGL in Canvas+ (WebGL works fine in webview and webview+, Canvas works fine in Canvas+). window.onload = function () { var width = window.innerWidth * window.devicePixelRatio; var height = window.innerHeight * window.devicePixelRatio; var game = new Phaser.Game(width / (window.devicePixelRatio - 1), height / (window.devicePixelRatio - 1), Phaser.WEB_GL, ''); game.state.add('Boot', require('./states/Boot')); game.state.add('Preloader', require('./states/Preloader')); game.state.add('MainMenu',
  • Create New...