shawnbless

Members
  • Content count

    13
  • Joined

  • Last visited

About shawnbless

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  1. Strange rendering/performance problems

    Windows 7, Chrome 31. Phaser.AUTO version works wonderfully, no artifacts. Phaser.CANVAS - No levels shown, just gold and men. (strange CANVAS always works for me) Super Nice Game BTW! Shawn
  2. Plugin for pathfinding on maps (using easystar.js)

    I too have used it in my game and agree, it is really good. Thank you casarock!
  3. This example is not working for me. Uncaught NotSupportedError: The implementation did not support the requested type of object or operation. Is this a problem for anyone else?
  4. Large Spritesheet is Loading in Samsung Smart TV

    What is this common misconception that your game can load extremely large image files? Yes, you can on the desktop, most likely get away with it. But on mobile devices, of which your TV technically is, you will be lucky to be able load anything 4096x4096. If I were you I would break my spritesheet into multiples, keeping a more reasonable size of say 1024x1024. Mobile graphics chipsets have much less memory to work with than desktop. I don't know for a fact that this is your problem, but it is what I would try first if I was you. Good Luck! Shawn Bless Rocket Star
  5. Plugin for pathfinding on maps (using easystar.js)

    casarock! Really nice job man! I too was looking to use this and you have made it easy! Thanks!
  6. Chained Tweens OnComplete

    Already answered here: http://www.html5gamedevs.com/topic/1651-tween-oncompletecallback/?hl=%2Btween+%2Boncomplete#entry11258 but try this: tween._lastChild.onComplete.add(sayHello, this);
  7. Phaser + CocoonJS vs. WebGL scaling finally solved

    My bad dude. I had zipped the basic folder, instead of its contents. Tried your zip file from your dropbox directly and it worked fine. Great job man. Sorry about being an idiot. LOL Shawn
  8. Phaser + CocoonJS vs. WebGL scaling finally solved

    GregP, Thank you for sharing! I zipped this up, put it on my phone, and tried launching it with the CacoonJS Launcher. I recieved a black screen only??? I'm using a Samsung Galaxy S 4 to test on. This is similiar results to what I am seeing with my own app. I was hoping you had solved it! Any ideas? Thanks, Shawn Bless Rocket Star
  9. Hello Phaser

    Hey Rich, when are you targeting 1.1.3 for release?
  10. @Mike: Depends on what demo you are looking at. If you are looking at the test that I setup online, without the ship it is just the stars rendering. With the ship, and debug render point on, you can still see the original problem because the stars still render in the lower right quadrant and in the debug render, twice, causing the slowdown. If you look at the fixed code, yes it appears slower with the ship and my assumption is the context save, new transform and context restore on every update is taking a pretty big hit. @Rich: Man, I would love to use a RenderTexture, but I'll be damned if I'm not smart enough to figure out how to draw pixels x & y on them. I actually want to use one for a rasterbar and change the pixel colors every update, but how do I change to the next pixel? I would love to see an example of how to use them. I looked at some Pixie examples and all it seems to do is repeatedly copy into another texture. I will be looking at using drawImage, sprites, or some other means. The stars are kind of vital to my logo. Thanks for all your help Rich!
  11. Thanks Rich! Doing what you said worked. Maybe this should be in the examples? Modified render function: render: function () { this.game.context.save(); this.game.context.setTransform(1, 0, 0, 1, 0, 0); // draw stars for (var i=0; i<starscount; i++) { if (starArrayX[i] > -1 && starArrayY[i] > -1 && starArrayX[i] < (starPosX + starsWidth) && starArrayY[i] < (starPosY + starsHeight)) { //Draw a star starPoint[i].setTo(starArrayX[i], starArrayY[i]); this.game.context.fillStyle = 'rgb(197,193,170)'; this.game.context.fillRect(starPoint[i].x, starPoint[i].y, starSpeed[i], starSpeed[i]); } } this.game.context.restore(); },
  12. Rich, I don't think I'm doing anything out of the ordinary. I initialize the star array on create:, also set the rocketship sprite in the on create:, in update I calculate new positions for the stars, and in render draw them, following the rotate point phaser example. Below you will find the code. I'll examine debug the renderPoint code and see if I can duplicate the transform. Thanks. I'm not sure I understand why adding a sprite would change the transform? TestGame.MainMenu = function (game) { // Our main menu this.game = game;};TestGame.MainMenu.prototype = { create: function () { this.game.stage.backgroundColor = '#000000'; this.game.world.setBounds(0,0, 1280, 720); //Setup Stars for( var i=0; i<starscount;i++) { starArrayX[i] = this.game.rnd.integerInRange(starPosX, starPosX + starsWidth); starArrayY[i] = this.game.rnd.integerInRange(starPosY, starPosY + starsHeight); starPoint[i] = new Phaser.Point(starArrayX[i], starArrayY[i]); starSpeed[i] = 1; } rocketStarShip = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'rocketstarship'); rocketStarShip.anchor.setTo(0.5,0.5); rocketStarShip.scale.setTo(1.0, 1.0); rocketStarShip.animations.add('fly'); rocketStarShip.animations.play('fly', 3, true); titlemusic.play(); titlemusic.volume = 0.8; this.game.input.onDown.add(this.startGame, this); t = this.game.time.now + 80; }, update: function() { for (var i=0; i<starscount; i++) { starSpeed[i] = 1 + (i % 3); starArrayX[i] = starPoint[i].x + starSpeed[i]; if (starArrayX[i] >= starsWidth) { starArrayX[i] = 0; } } }, render: function() { for (var i=0; i<starscount; i++) { if (starArrayX[i] > -1 && starArrayY[i] > -1 && starArrayX[i] < (starPosX + starsWidth) && starArrayY[i] < (starPosY + starsHeight)) { //Draw a star starPoint[i].setTo(starArrayX[i], starArrayY[i]); this.game.context.fillStyle = 'rgb(197,193,170)'; this.game.context.fillRect(starPoint[i].x, starPoint[i].y, starSpeed[i], starSpeed[i]); //this.game.debug.renderPoint(starPoint[i], 'rgb(197,193,170)'); } } this.game.debug.renderCameraInfo(this.game.camera, 32,32); this.game.debug.renderSpriteInfo(rocketStarShip, 32, 100); }, startGame: function () { titlemusic.stop(); this.game.state.start('game'); },}
  13. I'm having a problem rendering phaser points after adding an animated sprite. I have created a screen full of stars and they are initially rendering as I would expect: Now if I add an animated sprite to the center of the world: rocketStarShip = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'rocketstarship'); rocketStarShip.anchor.setTo(0.5,0.5); rocketStarShip.scale.setTo(1.0, 1.0); rocketStarShip.animations.add('fly'); rocketStarShip.animations.play('fly', 3, true); My stars render into the lower right quadrant of the canvas: But if I turn on debug for Points: this.game.debug.renderPoint(starPoint, 'rgb(197,193,170)'); I can see that my Points are still rendering into the full screen: I'm not sure if I have a bug, or if I have a fundamental problem in understanding Phaser coordinates. I've put up a test demo at :http://rocketstar.comxa.com/Test/ Click the screen to rotate thru example states. Thanks for taking a look. I'm having a ton of fun with Phaser. Shawn Blessing Rocket Star