dude78

Members
  • Content Count

    20
  • Joined

  • Last visited

About dude78

  • Rank
    Member

Contact Methods

  • Website URL
    altstudy.com.ua
  • Twitter
    _ashen_phoenix_

Recent Profile Visitors

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

  1. dude78

    change sprite bounds

    @Yehuda Katz, yep, dead . I meant different thing, I'll explain later. 'Cause I think, most people understand this question wrong... I'll edit post and call for you when a simple sprite for this question will be done, it must be today. I hope with new explanation and example the problem will be clear :).
  2. dude78

    change sprite bounds

    Guys? Any ideas?
  3. dude78

    [Phaser 2] Mini MrDriller

    @qdrj, I took an old device and ran it. You can see what's going on from the video. This device supports WebGL (as I remember) 'cause it flickers in WebGL mode only (in Canvas all is fine). As I use Phaser I can say what should be done for Phaser only. When you create your game variable set preserveDrawingBuffer: true. That's the only feedback I can give you for now. By the way, you can see that fps is slow. No worries, it was quite fine before. Just many tasks was running on this device at the moment of video recording. Hope this feedback is helpful. video.mp4
  4. dude78

    is group better ?

    @espace what way are you gonna use a group in?
  5. @nag0121, I can't figure your problem out. You have several sprtiesheets and you wanna play it as a single animation?
  6. @Lord Strider, as far as I understand Phaser.game is NOT null BEFORE calling create. But when it's get called, Phaser.game gets NULL. Is that right? if so, could you please show how do you create the game variable, add states to the State Manager and where (what file) do you do all this stuff.
  7. @Lord Strider, I would like to see the part of code at least.
  8. dude78

    Need help to fix a bug on mobile

    What is type of "player" object?
  9. dude78

    Help with Data in Game

    See the post:
  10. Yep, there is a way to pass parameters to other states. https://photonstorm.github.io/phaser-ce/Phaser.StateManager.html When you call start() method you can pass params to the other state, which you will get in the other's init() method. E.g.: create: function () { var tmp = this.rnd.between (-1, 1); this.state.start('StateB', true, false, tmp); } App.StateB.prototype = { init: function (number) { console.log(number); } }; But I do not know why a global var doesn't save any value. I created global objects before creating a game window and adding states. It works for me.
  11. @nag0121, did you solve the problem?
  12. dude78

    change sprite bounds

    Hello guys. I use: this.load.atlas('spriteName'); to load a sprite. To see its bounds and body (for interacting with other objects) we can use: this.debug.body('spriteName'); this.debug.spriteBounds('spriteName'); At the beginning these sizes are the same but we can change body size in such a way: (docs) this.spriteObject.body.setSize(width, height [, offsetX] [, offsetY]); The question: how to change sprite bounds? Is there any way? Thanks in advance.
  13. dude78

    load .pvr via atlas()

    @samme, well, I dunno is there any way to check what we loaded as of now, but I did so: I load .pvr image_1 and load .png image_2. Then, if I see image_2 after reloading page, that means that .png file was loaded. I found out that my i7 doesn't support .pvr files :)). or probably code above is incorrect. By the way, I can't load .pvr file only. I need to define truecolor. I thought I can load .pvr without truecolor. If loading .pvr without truecolor is possible, than code above is wrong for 100%. Anyway your idea is superb!
  14. dude78

    load .pvr via atlas()

    @samme, as I understand we load image first and then create an atlas using this image? I followed the link you gave, read documentation and... Now the code looks like: preload: function () { this.load.path = "assets/sprites/"; this.load.image('MySprite-image', { pvrtc: 'MySprite-pvr.pvr', truecolor: 'MySprite-png.png' }); this.load.json('MySprite-json'); }, create: function () { // addTextureAtlas(key, url, data, atlasData, format) this.cache.addTextureAtlas('MySprite', null, this.cache.getImage('MySprite-image'), this.cache.getJSON('MySprite-json'), 'json'); this.MySprite = this.add.sprite(50, 50, "MySprite"); } Is that right? Thanks.
  15. Hello. guys. Reading this tutorial I noticed that bitmatText can be included into setTexturePriority array: var enabled = this.game.renderer.setTexturePriority(['boat', 'skier', 'pole', 'rock', 'shark', 'sea', 'waves']); if (enabled.length < this.game.renderer.maxTextures) { // Enable for the BitmapFont this.game.cache.getBitmapFont('fat-and-tiny').base.textureIndex = enabled.length + 1; } Can I do the same using simple text? Text is created sth like var myTextStyle = { font: "32px Century Gothic", fill: "#fff", boundsAlignH: "center", boundsAlignV: "middle", align: "center" }; var myText = game.add.text(0, 0, "Just text example...", myTextStyle); Any help is appreciated! Thanks in advance.