• Content Count

  • Joined

  • Last visited

About ritherz

  • Rank

Recent Profile Visitors

900 profile views
  1. This is like the first thing that comes up on google for how to change pitch. The last comment doesn't quite do it. After some playing around, I found that I actually had to play the sound before altering it immediately after: this.mySound.play(); this.mySound._sound.playbackRate.value = 1.2; This worked for me Like this
  2. You're right, I have now gotten it to a point of just being able to save the file (.scml), and my updates take effect. I had to change that one line here: https://github.com/SBCGames/Spriter-Player-for-Phaser/blob/master/Build/spriter.js#L1368 to: info.pivotY = 1- this.parseFloat(keyDataElm, "pivot_y", file.anchorY); You may have fixed it now, as I see you've made some changes since the version I tried on. I'm glad you added signals, no point in me doing a writeup, great job!
  3. Yipes! I actually dealt with this issue a few times today as I was porting more skels into my game hehe. Im fairly sure it was due to the name of the body parts in the sprite atlas. If you used shoebox like me, it names the individual sprites "bodypart.png" in the sprite atlas. Try removing the extensions (.png usually) within the atlas (json dict). Also remember to refresh your cache before coming back I will definately be doing a tutorial on it, im just wanting to get my code to the point where im comfortable telling others how to do it. Hopefully i'll have time tomorrow, but for sure sometime next week. Tom wrote some awesome code here, it required very few tweaks to work for me!
  4. I have finally managed to replace The Hero example stuff with my own sprite!! I had to rename the entity in the xml I generated, and actually create a sprite atlas for the images I am using (thanks ShoeBox). I totally see what you mean by the export coordinates/axis issues. But, I finally figured it out! You basically have to set pivot_y to 1 - pivot_y for all object tags. Then the animation works well, and is not distorted like my previous attempts were. <timeline id="2" name="Right Arm"> <key id="0" spin="0"> <object folder="0" file="2" x="120" y="10" pivot_x="0.982419" pivot_y="0.252345" angle="89.949121"/> I think I may write out a newbie guide on how to use this awesome tool! LOTS OF EDIT, as I was figuring this out.
  5. Thanks so much man! I seriously can't wait to try it. I bought a bunch of art assets with pre-built sprite animation sheets- but it also contains the separate parts. Im getting tired of the same shitty animations with my inability to "art". I want to be able to sell vanity equipment in my game, learning to do this is essential!
  6. This is sweet... I wish I could figure out how to use it. When I look at the tool you created, I feel lost since there's not many instructions on how to use it, and I've never used typescript.
  7. I've noticed my game is terribly slow on older devices, next to unplayable. It's a turn-based game, so skipping frames isn't much of an issue, however I hesitate upgrading to 2.4 due to the jittery animation problem. Do you have any further insight as to the timer changes?
  8. Hi guys! I'm testing my game on an iphone 4, and a low-end android I bought a year ago. So the FPS mentioned below is refering to these devices. I have a spritesheet (2 spritesheets, about 1500px X 1500px ) for 2 different characters, each frame is around 100x150px. When I don't animate the characters, I get decent FPS (30-40fps). When I animate them, it drops to 10 on iphone 4, and around 20-30 on the android. They are both loaded via json texture atlas, which, by experimentation, yielded slightly higher fps than XML texture atlas or putting them both in the same spritesheet: game.load.atlas('viking', 'viking.png', null, vikingdata, Phaser.Loader.TEXTURE_ATLAS_JSON_HASH);game.load.atlas('mage', 'mage.png', null, magedata, Phaser.Loader.TEXTURE_ATLAS_JSON_HASH);I'm adding the sprite/animations as follows within a prototype of a group : FighterObj.prototype = Object.create(Phaser.Group.prototype);FighterObj.prototype.constructor = FighterObj;var FighterObj = function(game, x, y, fighter) { Phaser.Group.call(this, game); this.fighter = fighter;... this.icon = game.add.sprite(x,y, 'viking'); this.icon.anchor.setTo(.5,.5); this.icon.animations.add('death', Phaser.Animation.generateFrameNames('Viking-Dead__',0,31,'.png',3), 60, true); this.icon.animations.add('idle', Phaser.Animation.generateFrameNames('Viking-Idle__',0,23,'.png',3), 60, true);...I've looked at some of the tips in various places (like http://www.html5gamedevs.com/topic/9931-mobile-performance-tips-tricks/page-2 ), I tried precaching functions, but they don't seem to help, so I've gone back to prototypes. I don't think I have any special stuff in an update function (certainly not the main loop), but I'm not too familiar with sprites, so maybe it's each frame it's doing more than I think it is? Is there any way to speed the FPS up in my case, or am I just testing on too-low-end of devices? On all desktop/laptop devices I have a fairly consistent 60fps.
  9. You're right, I want to load game state assets in the background while the player is in the menu state. If the player manages to start a game before all assets are loaded in the background it would load up the rest of the assets in another loading screen. Yeah, I'd have to play with it a lot myself to figure out if this would work, and I'll probably try some of your ideas if no one else responds- thank you. I was wondering if this was a solved problem maybe there's a simple set of game.loadspriteinbackground(), game.loadspriteifnotalreadyloaded() functions or something.
  10. If I have a menu screen game state (where presumably users would probably spend a few seconds navigating to what they want to do), can I load the assets for the actual game while having the menu screen already displayed and working? So it would look something like this: Preload menu state assets. Display menu state. While in the menu state (allowing navigation still), the browser fetches the assets for the next state ("playing the game" state). Player clicks "play". Load the rest of the game state assets that haven't been loaded in step (3) Change to game state. Maybe this isn't even possible since javascript is not multi-threaded heh, but I figure I should at least ask the pros! I'm trying to think of ways that my game can display the menu screen a bit quicker than it does now, so other ideas are welcome as well, but I think the asset downloads is probably the biggest chunk of time.
  11. I'm sorry if this has already been answered before, I didn't see a topic. I'm making a match 3 game similar to the one in the phaser2 examples. When a player matches 3 gems, I have them bounce off the board. So for a 6x6 tile board I move/bounce each of the collected gems to one of 5 places on the screen. However when I was running some diagnostics on this, I have 3 different tweens going at the same time (scale, x linear, and y Phaser.Easing.Sinusoidal ), and it takes up to a few tenths of a second to create all these tweens and then start them. So it's somewhat slow. I'm fairly sure that this is due to creating the tweens, since I don't have much else that's happening at the same time (nothing happening in update() functions, not even allowing user input). I'm wondering if I can somehow create the tweens for all 36 tiles ahead of time (probably more efficient), and just use them later on so that no calculations need to be done. If so- how? Right now my current implementation: GemObj.prototype.collect = function() { var targetX = TOTALS_LOCATIONS[this.frame][0]; var tweenX = game.add.tween(this); tweenX.to({x: targetX}, jumpDuration + collectDuration + pauseDuration, Phaser.Easing.Default); var tweenY = game.add.tween(this).to({}, pauseDuration, Phaser.Easing.Default) .to({y: this.y - jumpHeight}, jumpDuration, Phaser.Easing.Sinusoidal.Out) .to({y: TOTALS_LOCATIONS[this.frame][1]}, collectDuration, Phaser.Easing.Sinusoidal.Out); var tweenScale = game.add.tween(this.scale).to({}, pauseDuration + jumpDuration, Phaser.Easing.Default) .to({y: .3, x : .3}, collectDuration, Phaser.Easing.Default); tweenX.onComplete.add( this.recycleGem, this); tweenY.onComplete.add( this.recycleGem, this); tweenScale.onComplete.add( this.recycleGem, this); tweenX.start() tweenY.start(); tweenScale.start(); activeTweens.push(tweenX); activeTweens.push(tweenY); activeTweens.push(tweenScale);};
  12. Thank you. I'll test my game after creating all the sprites first, that might be key.