Search the Community
Showing results for tags 'bitmapfont'.
-
Hello, apologize if my question is a little generic. I'm trying to move from createJS to PixiJS. In createJS, I usually create bitmap texts starting from .png images, where each image corresponds to a single char. Using texturePacker, I create a spriteSheet .png file and json data, in which each frame is a char. Then I can use the spritesheet object to create directly a bitmap text, like the example below: var data = { "images": [ "digit.png" ], "frames": [ [1, 1, 52, 58, 0, 0, -5], [1, 61, 38, 62, 0, 0, -3], [1, 125, 48, 68, 0, 0, 0], [1, 195, 44, 62, 0, 0, -3], [1, 259, 54, 64, 0, 0, -2], [1, 325, 52, 68, 0, 0, 0], [1, 395, 48, 57, 0, 0, -5], [1, 454, 50, 60, 0, 0, -4], [1, 516, 44, 58, 0, 0, -5], [1, 576, 48, 57, 0, 0, -6], [1, 635, 24, 32, 0, 0, -34] ], "animations": { "a": { "frames": [0] }, "b": { "frames": [1] }, "c": { "frames": [2] }, "d": { "frames": [3] }, "e": { "frames": [4] }, "f": { "frames": [5] }, "g": { "frames": [6] }, "1": { "frames": [7] }, "2": { "frames": [8] }, "!": { "frames": [9] }, "?": { "frames": [10] } } } var spriteSheet = new createjs.SpriteSheet(data); var bitmapText = new createjs.BitmapText("Hello World!", spriteSheet); This is the whole process (very easy). I was wondering if I can achieve something similar in Pixi.js where it seems that a .fnt file is required.
-
- bitmapfont
- bitmaptext
-
(and 5 more)
Tagged with:
-
I have bitmap fonts in my tilesheet (e.g. "1", "x", "2", ...etc), is there any way to parse that and use that in my game? Or do I have to use a separate file that just has those bitmap fonts? Thank you for your help in advance.
-
Hello, when i try to use PIXI.bitmapFont.from() with Unicode Suplementary characters (those > U+10000 - those requiring 4 bytes instead of two) those characters are displayed as missing. How to fix that ? Thank you for help!
-
Hey all, Right now, Ludei Cocoonjs doesn't load and parse XML files... Which means that we can't load bitmap font data. I am wondering if anyone else has figured out a workaround to this issue?
-
Hello! Recently we released the last major version of Phaser Editor, with a lot of new stuff, like Tilemaps and Bitmap Text, but what is more exciting is the new licensing model: Freemium! So now the editor is accessible to everybody for an unlimited period of time. The free edition contains all the features, just the number of certain assets are limited (scenes: 15, tilemaps: 5, texture maps: 3), however, we think that lot of projects fit inside that bounds. We are convinced that the best for all is a model where everybody can use the editor and provide a valuable feedback, that is essential to build a better product. Take a look at the complete release notes EDITED: Recommended this introductory video from GameFromScatch: Kind Regards Arian P.S. By the way, the development of Phaser Editor v2 just started, this version is all about to support Phaser v3.
-
Hi, i need help, i get this when i refresh my game 1/2: and ofc (game.js 50) console: and in game.js line 50: this.rep_un_txt = this.game.add.bitmapText(this.raw_gauche_center, 0, 'pixel', this.rep_un, 100); i load 2 bitmap font in my load.js: gameState.loadState = function(game) { }; gameState.loadState.prototype ={ preload: function(){ //assets this.game.load.image('barRep','./assets/bar_rep.png'); this.game.load.image('selecteur','./assets/selecteur.png') //fonts this.game.load.bitmapFont('pixel', './font/pixelBITM.png', './font/pixelBITM.fnt'); this.game.load.bitmapFont('pixel_o', './font/pixelBITM_o.png', './font/pixelBITM_o.fnt'); this.game.load.onLoadComplete.add(this.start, this); }, start: function(){ // i use this for fix error (cheap) this.fixtext = this.add.text(-10, -10, {font: "1px pixel", fill: "#ffffff"}); this.state.start('Game'); } }; I can't found a fix or see what i m doing wrong :/ Early Thanks
-
Hello everyone! I am a newbie H5 game maker who studying the Phaser! I have lots of problem that want to ask you the current problem is , the bitmapFont function : this.load.bitmapFont("fontname","bitmapfont.png","bitmapfont.xml");//how can I get the bitmapfont.xml ? I already have a font name for the first param and the bitmap png for the second param, but the third param that is a xml file I don't have it, how can I make a xml file? help me!
-
Hi, I am writing a simple game, which works fine, and when testing it (on a local wamp webserver) I very often reload the page in Firefox (44.0.2) to see the effect of the changes I make. That worked like a charm until I started to load a bitmapFont. Now, almost every time I reload (but not always), my sprites don't load. But if I "reload" by just typing enter in address bar, then everything loads fine. It's very strange. If I remove the bitmapFont loading, then everything gets back to normal. Other than that, everything works fine, the fonts display properly (if I don't refresh the page, that is). I don't get any errors whatsoever. It's pretty annoying tough. Any ideas how to fix this? Here is how I load my assets, just in case: (the order in which I load them doesn't seem to change anything to the issue). function preload(){ game.load.bitmapFont('desyrel', 'assets/fonts/desyrel.png', 'assets/fonts/desyrel.xml'); game.load.spritesheet('blocks','assets/blocks.png',blockSize,blockSize,nbBlockTypes+1); }