Jump to content


  • Content Count

  • Joined

  • Last visited

About Zampano

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Zampano

    Group Alpha

    Hey everyone. Is there a possibility to use something like a "master alpha" for a group of sprites instead of them all having their individual alphas changed? If that's not clear enough: I have a group of overlapping sprites that make up a bigger element. Now I want to fade this in/out as one single object using a tween. Instead, the sprites fade individually which results in them overallbeing less transparent in overlapping areas as well as initially covered sprites to shine through for the duration of the fade. Obviously, I could alternatively just make it all one sprite, but
  2. I'm not 100% sure what those would be but I don't think I'm using them 🙈
  3. Okay, thanks, but do I need to care about that in any way or can I just ignore the whole thing?
  4. Hey everyone, I just recently discovered that in IE, audio context is null. I gotta admit I do not fully understand what audio context even means or does, so I'm unsure if that's a problem for me as I rely on the playback position of the audio track for some of my code among other things. What can or should I do about it?
  5. Thanks for posting your solution, I'm having the same problem despite using phaser 2.10.4. However, I am using multiple states for my game and I'm not sure where to put the code. In every state?
  6. Hey, I'm trying to tint some of my bitmapText chars. I do this inside of my create function: this.intro_text = this.add.bitmapText(640, 280, 'linotte_basic_white_22', text, 20); this.intro_text.maxWidth = 360; this.intro_text.tint = 0xf80f6a; //Tried removing that as well this.intro_text.align = "center"; this.intro_text.alpha = 1; this.intro_text.anchor.setTo(0.5, 0); for(var i = 0; i < 18; i++) { this.intro_text.children[253+i].tint = 0x000000; } The text is now fully colored in 0xf80f6a. If I put the for loop on a timer of 1 ms, it works. That's quite an easy wor
  7. Okay, I didn't want to do the first in case there were any updates or fixes. The second one will do fine, thank you!
  8. Hey everyone, I want to attach some additional code to Phaser.Tween.start. I realize I could do Phaser.Tween.prototype.start_custom = function () { console.log("Custom Code"); Phaser.Tween.prototype.start.call(); } But couldn't I also do it without creating a separate function? I can't find anything really helpful on it and although I realize it's pretty basic, I have no idea on how to actually do it Any help is greatly appreciated.
  9. I see. But the monitor's refresh rate seems to put a cap on it, I don't have 144 logic updates on my 60hz monitor as far as I can tell. So can I just globally leave it at 144 or would it be better for performance to put a system in place that checks the max fps and adjusts desiredFps accordingly in common refresh rate steps?
  10. Oh. It actually works. But I don't exactly get why it does... and moreso, why is it even there in the first place then and not "set to infinite"? And I guess this also means that 30hz monitors wouldn't have that problem, doesn't it?
  11. Hey guys, I had related topics before, but let me give a short summary: I am working on a time-based game, roughly similar to guitar hero. For that, I use deltaTime and PhysicsElapsed like this: update: function() { deltaTime = (this.time.elapsedMS)/(1000/60) this.time.physicsElapsed = this.time.elapsedMS*0.001; } So if the framerate drops to 30, deltaTime = 2 and physicsElapsed will also be double the value it is normally (1/60 as in 1/desiredFPS). It always seemed to work perfectly fine. Sure, it leads to a loss of accuracy whith lower framerates or bigger lags, but that'
  12. Hey there, I'm trying to get a key to always call a certain function, regardless of which state my game is in. At the moment, my code is this: var escKey = null BasicGame.Boot = function (game) { //... }; BasicGame.Boot.prototype = { init: function () { escKey = game.input.keyboard.addKey(Phaser.Keyboard.ESC); escKey.onDown.add(function(){console.log("esc")}, game); } And so on. escKey stays defined in all states, but onDown doesn't trigger. If I move the two lines within init to a state, I can use ESC in that state, but not in any state after that. Is th
  13. I think that's a good idea. I had quite some trouble finding out that the "problem" is kind of intended, especially since isRunning was true.
  14. Thank you both! Tom's approach was more like it since I want to use the exact tween again and not delete it's properties. I ended up doing it like this: Phaser.Tween.prototype.removeFromUpdateQueue = function () { var i = this.manager._tweens.indexOf(this); if (i !== -1) { this.manager._tweens.splice(i, 1); } else { i = this.manager._add.indexOf(this); if (i !== -1) { this.manager._add.splice(i, 1); } } } Phaser.Tween.prototype.skip = function () { if(this.isRunning || this.isPaused) { this.isRunning = this.isPaused = false; this.onComplete.dispatch(this
  15. Hey guys, I've run into yet another case of "don't know how to do this best" and I'm looking for help Here's my Scenario: I've got a sprite with a certain tween. The tween is supposed to be skippable, which means it stops and all properties of the sprite will be set to the target values of the tween and the onComplete function will be fired. After that, it can be played again and so on. Here's the Tweens setup: this.portrait.inFocus = false; this.portrait.focusTween = this.add.tween(this.portrait).to({alpha: 1}, 1, Phaser.Easing.Linear.None, false, 0).to({alpha: 0}, 1000, Phaser
  • Create New...