aylictal

Members
  • Content count

    29
  • Joined

  • Last visited

About aylictal

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. aylictal

    Fixed Scale?

    bump
  2. aylictal

    Help Moving Player Using Socket.IO and Phaser

    I'd be interested in hearing more responses to this thread on an efficient way to do this. Another really good article addressing this is this: http://buildnewgames.com/real-time-multiplayer/
  3. aylictal

    Help Moving Player Using Socket.IO and Phaser

    click events you know where the destination is, therefore you can easily send the destination of where you're moving to the server, then the server just broadcasts to everyone else as a dumb middleman, and all the clients then render that character moving to that spot. movement with keys however, you don't really know where the person is traveling to. thats what makes it really hard.
  4. aylictal

    Tilemap Displays Grid Lines (Render Artifacts)

    @bryantmakesprog on terminal: npm install --global tile-extruder tile-extruder --help returns me this on my windows machine in a bash shell:
  5. aylictal

    Fixed Scale?

    Have searched all over can't find anything in phaser 3 if i manipulate main camera scale to keep scale of certain sprites, such as gui elements.
  6. aylictal

    Fixed Scale?

    Hello! Does this function, or anything equivalent, exist in phaser 3? https://phaser.io/examples/v2/sprites/fixed-scale Thanks!
  7. aylictal

    Weird tile bug when the camera is moving

    Literally just ran into this same problem. There are several considerations here. Are you scaling your tiles? If you are scaling by a non integer value, this sorta crap can happen. This solution fixed all of my problems with this regard:
  8. aylictal

    zooming with tilemaps

    Got it to work cheers! thanks again!
  9. aylictal

    zooming with tilemaps

    Ahh thank you! Will give it a try this weekend it is much appreciated thank you.
  10. aylictal

    zooming with tilemaps

    Thank you for the resource, but am having issues with understanding how to achieve the above. Just so I understand, I have to edit each and every tile in the tileset image itself? Say my tiles are 16x16, do I make the image for each tile 17x17? Or do I not need to worry about any of this and just run the npm package on my original tilemap image? (my images of tiles are all located on the same file, and aren't really given any extra margins currently).
  11. aylictal

    zooming with tilemaps

    Hello again! I am experiencing something similar to this: When a project is first made, the zoom is defaulted I believe to be value of 1. If I plan on having zooms be a part of the game I'm making (with tiles), is the best course of action to get rid of this sort of rendering problem by setting the zoom default to be something of a different value such as 10 or some other arbitrary amount? If I plan on doing this, I have to adjust everything, such as player speeds and other physics related things I already have programmed into my game. Was wondering if anyone else had a solution to this problem. I have tried roundpixels and it's not fixing the problem once the zoom factor is scaled to something sub 1 level with my current scheme.
  12. aylictal

    Best way to handle event

    The structure looks fine. It is a listener you are assigning for when the input event handler gets and event of "gameobjectup" to execute a callback anonymous function you have set up. You could destructure your callback into a named function instead if you'd like to destructure the event itself from the callback. Here is an example of working code for your specific example that makes a named function that can be referenced later, see destroyBox function below: const destroyBox = gameObject => gameObject.emit('clicked', gameObject); this.input.on('gameobjectdown', (pointer, gameObject)=> destroyBox(gameObject)); I understand javascript (especially ES6 stuff) quite extensively. Where I have difficulties is interacting with the new phaser 3 api as the documentation is pretty sparse (the examples are great dont get me wrong, but there is no real handy API reference I've found yet).
  13. aylictal

    rendering objects from tile map

    I see you are accessing the gid, which I have access too as well! This is what I thought the linker was, or the binder to the tileset. I'll tinker around with your example and see if I can get anything to load using it. Much appreciated dude thanks!
  14. Hello- I've tried my best to follow the phaser 3 guides, but none are trying to do what I need my game to do, so I looked at this guide: https://phaser.io/examples/v2/groups/depth-sort but am having trouble loading objects into my game from an object layer, which this example was loading from a sprite sheet. If I console.log(this.map.objects) I am successfully getting this back in return: [ObjectLayer] Which is definitely good. It means my object layer successfully got imported. If I JSON.stringify(this.map.objects[0], null, '\t') I get the following: "{ "name": "Object Layer 1", "opacity": 1, "properties": [ { "name": "tree", "type": "string", "value": "tree" } ], "propertyTypes": {}, "type": "objectgroup", "visible": true, "objects": [ { "id": 26, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 367.454545454545, "y": 192, "width": 16, "height": 16, "gid": 1260, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 29, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 368, "y": 208, "width": 16, "height": 16, "gid": 1310, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 30, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 368, "y": 224, "width": 16, "height": 16, "gid": 1360, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 31, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 368, "y": 240, "width": 16, "height": 16, "gid": 1410, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 34, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 400, "y": 256, "width": 16, "height": 16, "gid": 1410, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 35, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 400, "y": 240, "width": 16, "height": 16, "gid": 1360, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 36, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 400, "y": 224, "width": 16, "height": 16, "gid": 1310, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false }, { "id": 37, "name": "tree", "type": "", "rotation": 0, "visible": true, "x": 400, "y": 208, "width": 16, "height": 16, "gid": 1260, "flippedHorizontal": false, "flippedVertical": false, "flippedAntiDiagonal": false } ] }" How can I actually render this to the screen? I have tried the following: class stage extends Phaser.Scene { preload(){ this.load.tilemapTiledJSON('map', 'assets/map.json'); this.load.image('backgroundtiles', 'assets/backgroundtiles.png'); } create(){ this.map = this.make.tilemap({key: 'map'}); this.tileset = this.map.addTilesetImage('backgroundtiles'); this.layer = this.map.createStaticLayer('Tile Layer 1', this.tileset, 0, 0).setScale(this.scale); this.createtrees(); createtrees(){ this.trees = this.add.group(); this.map.objects[0].objects.forEach(e=>{ this.trees.create(e.x, e.y) }); } } This renders the black squares with the green cross through them because it doesn't know what graphic to load. Is this something in Tiled I need to provide to phaser? Also of some other note, the graphics themselves even though they were rendered with a bad image, were also loaded with incorrect positions. What is going on?