3ddy

Members
  • Content Count

    72
  • Joined

  • Last visited

Everything posted by 3ddy

  1. I don't remember correctly, but you have probably compiled something called "Developer App" or whatever it is called right now . Try normal "Compile" option.
  2. chat [*][*][*] @rich it would be awesome to have the chat rewritten, because it was randomly kicking ppl from time to time, also there were some troubles with users list in chat, but we miss that place, even with those bugs
  3. From Phaser docs: "Note that killing a Game Object is a way for you to quickly recycle it in an object pool, it doesn't destroy the object or free it up from memory." It shouldn't be deleted from group. You can easily debug it using some console.logs.
  4. I don't understand your problem exactly, but -1 is responsible for infinite loop, change it to 0 if you don't want "move non stop". If you don't want the tween to go back to starting position (yoyo effect), change last true to false; Check documentation for list of parameters : http://phaser.io/docs/2.4.4/Phaser.Tween.html#to
  5. As far as I remember you have setText function in this plugin.
  6. If you have object.events.onInputDown.add( someFunction, this ); Then you can just object.events.onInputDown.dispatch(); If you want, you can add parameters to dispatch
  7. You can make custom Phaser build -> https://phaser.io/tutorials/creating-custom-phaser-builds
  8. init -> preload -> create https://phaser.io/docs/2.6.2/Phaser.State.html#methods you can learn more here, I think there was some Phaser StateManager ebook or smth like that and there was some nice diagram showing what is called in order
  9. There is some protection on iPhones that allows to play sound only after some user input (touch event, button click etc.). Can't help you with some workaround, but there were plenty of similar topics here.
  10. Just use game.input.onDown and on callback check where was the 'touch', then move the player according to touch position
  11. Try game.input.onDown.add(this.changeStateFunction, this);
  12. Hello, I'm trying to call the keyboard on click (InputDown) event. Everything works fine in Android, but on iOS the keyboard doesn't show. I'm running the app through Cocoon Developer App using .zip file openKeyboard: function() { Cocoon.Dialog.showKeyboard({ type: Cocoon.Dialog.keyboardType.TEXT, }, { insertText: function(inserted) { console.log(inserted); }, deleteBackward: function() { console.log("deleteBackward"); }, done: function() { console.log("user clicked done key"); }, cancel: function() { console.log("user dismissed keyboard"); } }); } showKeyboard function is called because I've checked that using console logs, but actual keyboard is not appearing... Anyone encountered simillar problems? Or maybe you can recommend some other option to display keyboard in native app?
  13. tl;dr when I move parent, child position is updated too late, how to manually force to update child position when I move parent? Hello, in my game I have a group of sprite objects (Ships) this.shipsGroup = game.add.group(); Each Ship before adding to this.shipsGroup have two other groups as children : var actualShip = game.add.group(); var surrounding = game.add.group(); for (var m = 0; m < 3; m++) { var temp = game.add.sprite(-halfSize - 50 + l*50, tempy, 'red'); temp.anchor.setTo(0,1); tempy+=50; if(m == 1 && l > 0 && l < ship.unitSize+1) { actualShip.add(temp); } else { surrounding.add(temp); } } ship.addChild(actualShip); ship.addChild(surrounding); this.shipsGroup.add(ship); Note: every child object has position relative to parent (so child position (0,0) is on parent) Everything is fine up to this point. I'm moving my ships using something like that in every possible direction (I'm moving them on 50x50grid). This check is in update method of game. if(this.draggedShip.position.x - game.input.mousePointer.x >= 50 && some_boundary_condition) { this.draggedShip.position.x-=50; this.checkOverlap(); } So, after my ship has moved to next grid, I'm calling checkOverlap function to check on top of which grid fields actually is the ship. (I have seperate group of sprites for each grid field) checkOverlap: function() { for (var i = 0; i < this.draggedShip.children[0].length; i++) { for(var j = 0; j < this.fieldsGroup.children.length; j++) { if(this.draggedShip.children[0].children[i].overlap(this.fieldsGroup.children[j])) { this.fieldsGroup.children[j].alpha = 1; } } } }, What is wrong : it looks like sprite.overlap uses OLD children positions (before parent move). So when I move my ship 1 field to the left, the result of this checkOverlap function are fields where the ship was in previous step. How it should be: children positions should be updated before my checkOverlap call. How can I force to do it? I was trying to call update on childrens but it didn't work. Phaser 2.6.2
  14. Hey, maybe you should use https://phaser.io/docs/2.3.0/Phaser.Animation.html#stop with onComplete event?
  15. Why not add http://phaser.io/docs/2.2.2/Phaser.Events.html#onInputOver to character, instead those update loop you made? You are calling playCharacterDialogue every frame if pointer is over character
  16. To open the dedicated Console panel, either: Press Ctrl+Shift+J (Windows / Linux) or Cmd+Opt+J (Mac). If DevTools is already open, press the Console button.
  17. You should probably show some more game code. I understand that you don't get any console errors?
  18. You can use that delay as 'loading screen' maybe someone will come with better solution.
  19. Are you trying to use that font in the beginning of body section? If yes and it still don't work maybe your game is launching faster than browser loading font - try to make some delay before using font ingame
  20. Hello, try to preload the font before using it in-game (just write some dot not visible on the screen before creating Phaser game). I use the code below: <style type="text/css"> @font-face { font-family: 'SlimJim'; src: url('assets/slim-jim/SlimJim.ttf') format("truetype"); } body{ background: #000000; padding:0px; margin:0px; } .fontPreload { font-family: 'SlimJim'; position:absolute; left:-100px; } </style> and then in body <div class="fontPreload">.</div>
  21. try using CANVAS renderer during game initialization
  22. Maybe try to use http://phaser.io/docs/2.3.0/Phaser.Animation.html#onUpdate and create some counter. When counter reaches animation length then reset it and count again.
  23. He meant that you should change setALL to setAll in last line of posted code It should be group.setAll('scale.setTo', 2);
  24. You can create array with all graphic names and then just randomly choose one from this array
  25. How about releasing game on android/iOS? I've always encountered some problems with it