LLp

Members
  • Content Count

    4
  • Joined

  • Last visited

About LLp

  • Rank
    Newbie

Contact Methods

  • Twitter
    @tubtale
  1. I'm trying to increase the performance of my game, i'm planning to use a monospace typography so I'm able to use both BitmapText and RetroFont, i've read BitmapText.generateTexture enables a better performance, is that performance better than using plain RetroFont alone ? Thank You.
  2. LLp

    Best way to display a paragraph of text

    I've found it in the examples : font.setText("HOLA FAMILIA\nMY SEPARATED TEXT", true, 0, 8, ",!?ABCDEFGHIJKLMNOPQRSTUVWXYZ.", 10); instead of font.text = "HOLA FAMILIA\nMY SEPARATED TEXT" where the alfabet string is the key distribution of the png
  3. LLp

    Best way to display a paragraph of text

    What about paragraphs displayed in retro fonts ? How can I insert line breaks each N characters ?
  4. I actually create an image with embedded text like this: GroupFactory.prototype.createImgFromImgAndText = function (type, text) { var dataImg = this.game.cache.getFrame(type), bmd; bmd = this.game.make.bitmapData(dataImg.width, dataImg.height); bmd.load(type); if (text === undefined) { return bmd; } bmd.ctx.fillStyle = "#000000"; bmd.ctx.font = '25px san-serif'; bmd.ctx.fillText(text, 10, 50); return bmd; }; How can I do this with a retro font ? This hasn't worked GroupFactory.prototype.createImgFromImgAndText = function (type, text) { var dataImg = this.game.cache.getFrame(type), bmd; bmd = this.game.make.bitmapData(dataImg.width, dataImg.height); bmd.load(type); if (text === undefined) { return bmd; } bmd.ctx.fillStyle = "#000000"; bmd.ctx.font = this.game.add.retroFont('myfont', 60, 60, ",!?abcdefghijklmnopqrstuvwxyz.", 5, 0, 0, 0, 0); bmd.ctx.fillText(text, 10, 50); return bmd; };