locohost

Members
  • Content Count

    23
  • Joined

  • Last visited

About locohost

  • Rank
    Member

Contact Methods

  • Twitter
    @notnormalgames

Recent Profile Visitors

652 profile views
  1. Ugh, Ok I found the Phaser 3 example needed. I'm dumb. Sorry for the unnecessary posts. Here is code needed... update() { if (this.cursors.up.isDown) { if (this.cursors.up.ctrlKey) { this.scroll(0); } } else if (this.cursors.down.isDown) { if (this.cursors.down.ctrlKey) { this.scroll(2); } } else if (this.cursors.left.isDown) { if (this.cursors.right.ctrlKey) { this.scroll(3); } } else if (this.cursors.right.isDown) { if (this.cursors.right.ctrlKey) { this.scroll(1); } } }
  2. This is also definitely not a keydown event. Fires only once while arrow is held down... this.gameScene.input.keyboard.on('keydown', (e) => { // console.dir(e); if (e.keyCode === 38) { this.scroll(0); } if (e.keyCode === 39) { this.scroll(1); } if (e.keyCode === 40) { this.scroll(2); } if (e.keyCode === 37) { this.scroll(3); } // if (e.ctrlKey) { console.log('Ctrl is down...'); } // if (e.ctrlKey) { // if (this.cursors.up.isDown) { this.scroll(0); } // } });
  3. Ok, if you move it into an update method, it seems to work but fires at 1 million miles per hour 😕
  4. Ok so "keydown_UP" is definitely not a up-arrow-held-down event. This code is in a create method. It only fires once... this.gameScene.input.keyboard.on('keydown_UP', (e) => { console.log('KeyUp is down...'); if (e.ctrlKey) { this.scroll(0); } }, this);
  5. Ok I see part of the problem. The Ctrl key down does keep firing repeatedly as I need, but as soon as you add the Arrow key down, it stops. So how do we code a check for Ctrl+Arrow down simultaneously and they fire continuously until one of key combo is released? Is there a Phaser 3 example that shows this?
  6. Sadly, I'm striking out on this. Using @rich's advice I can make single Ctrl+Arrow keys happen, but they always fire just once and you have to keep repeatedly clicking the arrow. So they're not really "down" events like syntax suggests. How can I hold down Ctrl+Arrow and the event keep firing while they're both down? Thanks for helping! 🙂
  7. I'm trying to figure out how to check for Ctrl key + an arrow key down at same time. I can check for arrows by themselves easy enough. I can add a listener for 'keydown_CTRL'. But I can't figure out how to check for both at same time. i.e.: if (Ctrl.isDown && rightArrow.isDown) { then do move right stuff... }. How do I do this? Thank you very much for helping :-) Mark
  8. Found this in another post: https://github.com/englercj/phaser-tiled Have you tried this? I think I'll fiddle with it a while this weekend.
  9. Hey valueerror :-) Sorry I've been away for a little while doing boring non-game-coding stuff :-/ I'm just now catching up and about to get back into my Phaser stuff. Did you ever file the issue on github? I'll go take a look a little later today. Have you figured out anything new since this last post?
  10. Did you ever resolve this? Use game.camera.follow(yourPlayerObject, Phaser.Camera.FOLLOW_TOPDOWN);
  11. Trying to make collisions work with Tiled map

  12. You are wise indeed my friend Yes that's exactly what my "wall-vert" tile looks like. I had 32x32 tiles basically working at one point but then I started getting some erratic collisions. Including bouncing off invisible walls in the middle of a room where no wall existed and also... "slip throughs" exactly like you mention above. Do you have any thoughts on these issues? Are they Phaser bugs then? I'm guessing there is one or more bugs in physics.p2.convertCollisionObjects(...).
  13. I was afraid of that. Every one of my tiles is a "wall section". A vertical, horizontal, angles, ends, etc. Player must collide on each of every wall's solid (non transparent) sides which are several pixels smaller/inside the full tile square. I can't paint large polygons on my tileset as you are. Damn :-/
  14. When you drew your polylines, did you draw them on the individual tiles (in Tiled using Collision Editor), and then place the tiles on the map? Or something else?