blackhawx

Members
  • Content Count

    75
  • Joined

  • Last visited

About blackhawx

  • Rank
    Advanced Member

Profile Information

  • Interests
    Game Development

Recent Profile Visitors

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

  1. In the following example for labs... https://labs.phaser.io/edit.html?src=src/game objects\tilemap\collision\non-slope map and impact.js Was the csv file and all of its values manually created? or was there a tool that exported the file? Thanks!
  2. blackhawx

    How to delay within a preload

    My goal within this preloading sequence is to place a Phaser graphic onto stage that increases in height as the progress gets to 100%, and at the same time, set a mask so that a background image is revealed as the the graphic height increases. I feel i'm halfway there. I'll play with that timer event to see if that helps to keep my preload up long enough before I transition to the rest of the game. Many thanks
  3. I managed to get it working on my end, but with a slightly different structure. I'm using multiple scenes, not just one, as the demo above entails. But in either case, here is whats working for me... class preloadScene extends Phaser.Scene { constructor() { super({ key: 'preLoadScene', active: true, physics: { default: 'arcade', arcade: { debug: true } }, pack: { files: [ { type: 'image', key: 'image01', url: 'knife.png' } ] } }); } preload() { this.add.image(100, 0, 'image01').setOrigin(0); } } //my configuration is using the a loader property to set the default path to my image assets... const config = { ... loader: { baseURL: 'game/media' }, scene: [preloadScene, playGame] ... } ...and my knife displays as my pre-loading sequence takes place... For dev's still stuck, there could be an issue with how the relative path is defined in the gaming environment...
  4. blackhawx

    How to delay within a preload

    Within a scene preload function, if I have the following logic setup preload() { ... this.load.on('complete', function () { progress.destroy(); }); ... } ...Is there a way we can set a delay (3 seconds), before progress is actually destroyed? Setting `this.time.addEvent()` does not appear to work within a preload() instance.
  5. blackhawx

    Chaining multiple animations together

    Perhaps an alternative would be to chain multiple tween sequences together with the ability of changing up the target value? (untested). In the given example, the same target is given the entire time, but perhaps it is possible... http://labs.phaser.io/edit.html?src=src/tweens\timelines\simple timeline 1.js http://labs.phaser.io/edit.html?src=src/tweens\timelines\simple timeline 7.js http://labs.phaser.io/edit.html?src=src/tweens\timelines\create timeline.js http://labs.phaser.io/edit.html?src=src/tweens\callbacks.js | an oncomplete process for a tween You could put it all in a custom function, and call that function whenever needed. I apologize in advance if this is off from what you are achieving.
  6. blackhawx

    Recommended approach in setting collision properties

    Yes, that's exactly what I was looking for. It's because of setCollisionByProperty. that I'm driven to now work with Tiled. Thanks for the suggestion on that!
  7. blackhawx

    Recommended approach in setting collision properties

    I'm giving Tiled a shot sense it appears to be a strong map driven application. Thanks!
  8. blackhawx

    Update tween END value

    so to understand you correctly, you want to wait until an input event it triggered, (i.e. a user presses down on their mouse, then wait x number of seconds before tween begins) correct? If that was the case, this request is still easy to implement. If you look at this following example in labs: http://labs.phaser.io/edit.html?src=src/tweens\update to.js and after the paused:true, property, simply add delay:1000 and run the code. The tween won't run until the input is triggered and the delay is met.
  9. I'm looking at the following example in the labs to learn about tile collisions: http://labs.phaser.io/edit.html?src=src/game objects\tilemap\static\set colliding by property.js Based on the example, I would like to set collision properties within a JSON file, rather than depending on setting custom indexes in my game js file. Being new to this, I am attempting to use Texturepacker to create tilemaps. What would be a recommend approach in setting collision properties on tiles? (.i.e.) Do I have to edit the JSON file manually to manually put in a collision property? Is there a way with Texturepacker to set a boolen property called 'collision' for tiles? Is there another best practice that devs are taking? Many thanks!
  10. blackhawx

    Update tween END value

    You are missing the native way to handle delays with tweens in Phaser 3. The following is a simpler and native approach to take: var config = { type: Phaser.WEBGL, width: 800, height: 600, backgroundColor: '#2d2d2d', parent: 'phaser-example', scene: { preload: preload, create: create, update: update } }; var tween; var game = new Phaser.Game(config); function preload () { this.load.image('block', 'delay/media/block.png'); } function create () { var image = this.add.image(100, 300, 'block'); tween = this.tweens.add({ targets: image, x: 500, duration: 1000, delay: 1000 }); } function update() {}
  11. blackhawx

    Update tween END value

    @kurhlaa the tween class has delay capabilities you can tap into. I would give a look over the API to see how you can naturally leverage Phaser to do related tasks. https://photonstorm.github.io/phaser3-docs/Phaser.Tweens.html https://photonstorm.github.io/phaser3-docs/Phaser.Tweens.Timeline.html And don't forget searching on Phaser labs for examples (e.g. http://labs.phaser.io/view.html?src=src/tweens\delay.js)
  12. blackhawx

    How to re-use animations for different sprite sheets?

    Absolutely amazing - many thanks on that!
  13. blackhawx

    How to re-use animations for different sprite sheets?

    James, if it's not too much to ask and if it works, could you demonstrate how you would use setData in one of your ''anime' scenarios? I'm curious to how we can take advantage of it relating to the topic...
  14. blackhawx

    Generic platformer + ES6 / Webpack 4 boilerplate

    Your description in the process was all I needed to know. Makes perfect sense. Thanks for breaking that logic down!
  15. blackhawx

    Generic platformer + ES6 / Webpack 4 boilerplate

    Hello nkholski. I love what you are doing with collisions in the game. when Mario is small and he jumps up to hit a brick, what part of the code makes the tile bump up and come back down again? Thanks