• Content count

  • Joined

  • Last visited

About charlieRobinson

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. charlieRobinson

    questions about cacheAsBitmap

    odd. it seems both are blurred when size is doubled with or without cacheasbitmap. When I scaled my image with no cacheasbitmap, the sharp edges were retained. I wonder why that is?
  2. charlieRobinson

    questions about cacheAsBitmap

    strange. are you using same code as me to scale it? Mine blurs sprites every time I apply the code not. its just a really large map sprite. I thought it was being redrawn every frame and didnt need to be so it should be cachedAsBitmap
  3. charlieRobinson

    questions about cacheAsBitmap

    I am scaling a sprite 200%. If I do not use cacheAsBitmap, the sprite doubles in size and stays crisp. It's perfect. But if I use cacheAsBitmap, the sprite becomes blurry. How can i use cacheAsBitmap but not blur the image? Thank you map.scale.setTo(2,2); map.cacheAsBitmap = true; I searched the forum for an answer but could not find anything.
  4. charlieRobinson

    Get Mouse Position?

    Thanks, samme.; the world X and Y are the coordinates I am looking for. How do I get those coordinates into my function? Can I call activePointer anywhere in my code to get them? Thank you! EDIT:::: Looks like the solution may be: game.input.activePointer.x +,
  5. charlieRobinson

    How to define gamesize?

    yeah. use divs on your index.html to get that layout and assign your canvas the same id name as the div you made for it. <div id = 'yourDivName'> var game = new Phaser.Game(yourScreenWidth, yourScreenHeight, Phaser.CANVAS, 'yourDivName', null, true); </div>
  6. charlieRobinson

    Get Mouse Position?

    Hello. What is the solution if your game is scrolling and the mouse coordinates and angle is skewed because the camera is moving? Thank you!
  7. charlieRobinson

    how to clear the canvas?

    Is there no way to clear the screen in the update function with phaser?
  8. charlieRobinson

    Max Sprite Count Limitations

    !!! Man, that was it! Thank you!!! Im such a n00b!
  9. charlieRobinson

    Max Sprite Count Limitations

    Hey, coders! I have the server creating random drops to the client. It creates 5px x 5px squares on the client that the player can walk over and ' pick up'. These sprite drops triggered from server have no physics. they are just squares being stamped on the canvas. When the player walks over one the server removes it and updates the clients. Works fine. Problem is, once 100 or so are made, FPS drops to single digits and everyone slows to molasses. Is there a max sprite count? I do not believe I have any memory leaks and the sprites arent using any physics. Any ideas? Thank you Code to make the square sprites : var bmd = game.add.bitmapData(0,0); bmd.ctx.beginPath(); bmd.ctx.rect(0,0,5,5); bmd.ctx.fillStyle = '#000000'; bmd.ctx.fill(); bmd.ctx.closePath(); var droppedItem = game.add.sprite(xDrop,yDrop, bmd);
  10. charlieRobinson

    Phaser examples down?

    Noooo. I need to learn!!!
  11. charlieRobinson

    game.stage.disableVisibilityChange not working

    I had same issue of game not running while not in focus so I added that code: game.stage.disableVisibilityChange = true; and it fixed it! I had some different issues and had to revert back to an earlier save and, somehow, game.stage.disableVisibilityChange = true; no longer works! The code is exactly the same and nothing else changed that would have affected it?! HOW!? WHY!? I need my game to run to in the back ground :'(
  12. charlieRobinson

    Show/Hide Sprites & Texts

    ok... new problem... so I have the function bound key press working. Thank you! Problem now is that I can no longer use the 'E' key while chatting. the menu toggle is contingent on if (!isChatting) so if player is not chatting they cant toggle the menu so as to not interfere with using the 'E' key while chatting. But now the 'E' key seems bound only to the menu toggle and wont appear in the text field to chat. Do I need to toggle the key listener off and on when the player (isChatting) boolean is true? All of the other keys being detected in the update loop are working fine in chat, BTW. Thank you! EDIT::::: Looks like this is the code I am looking for: game.input.keyboard.removeKey(Phaser.Keyboard.E); The idea now is to add and remove 'E' key when player is filling out text boxes. Any better way to do this? Thank you!
  13. charlieRobinson

    Show/Hide Sprites & Texts

    Thank you. If I wanted to bind the 'E' key to that sprite listener, how we do I do that? I am currently using: E =; But I am not sure if that code will work with your example? Thank you! Also, the tutorials I am finding show binding the key to the variable and then detecting it in the update loop. I am not sure how to create a listener for a key that is outside the update loop. Thank you! EDIT:::: I think I am on to something with the example code below key1 = game.input.keyboard.addKey(Phaser.Keyboard.ONE); key1.onDown.add(addPhaserDude, this); function addPhaserDude () { game.add.sprite(,, 'phaser'); }
  14. charlieRobinson

    Show/Hide Sprites & Texts

    Hi, guys. another newbie here. I have a key listener in my update loop that listens for key to show and hide a menu. Problem is, the toggle isnt a hard toggle but a fully automatic toggle. The menu flashes if you hold the bound key down. How can I keep the listener in the update loop but make it a hard toggle without the full auto flash effect? Thank you!