Jump to content


  • Content Count

  • Joined

  • Last visited

  1. The result of the code below can be seen HERE function preload() { this.svbmd = game.add.bitmapData(400, 300, "slbmd"); this.svbmdAreas= []; var w = this.svbmd.width / 11; var h = this.svbmd.height / 6; for (var i = 0; i < 11; i++) { var areaCol = []; for (var j = 0; j < 6; j++) { areaCol.push(new Phaser.Rectangle(i * w, j * h, w, h)); } this.svbmdAreas.push(areaCol); } for (var k = 0; k < 11; k++) { var val = k / 10; for (var l = 0; l < 6; l++) { var sat = l / 5; var rect = this.svbmdAreas[k][l]; var col = Phaser.Col
  2. I'm trying to create a HSV color picker using BitmapData. The implementation can be found in this Phaser Sandbox, I followed this example, with the notable difference, that I'm not using an image to generate the BitmapData but I'm generating the data myself. Unfortunately I seem to be unable to retrieve the color data for a given pixel (I tried BitmapData.getPixel(), getPixelRGB, getPixel32()). Does anyone have an idea what I'm doing wrong?
  3. Hi, I've encountered a strage problem while building a little, mostly static mobile game using Intels XDK, Cordova and Phaser (2.4.6). It's targeted at Android and uses the Crosswalk web runtime. I basically followed Matt McFarlands menu tutorial, and created States to do stuff like booting up, loading all assets, showing a splash screen, showing a menu, the levels etc. I'm using one Phaser.Graphics object per State to draw on (my game only needs a few geometric items). Additionaly I'm using the SaveCPU plugin to avoid unnecessary render cycles. Unfortunately removing it doesn't seem
  4. I ran into a strange problem: when using phaser.min.js, onTap doesn't seem to fire. It works with phaser.js though. I'm using a very minimal example to test it: var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create: create }); function create() { game.input.onTap.add(function onTap(pointer) { console.log("tap")} , this); } I'm using the developer tools in Firefox and Chrome to see what's written to the console. When using paser.js I get all "tap" message, when using phaser.min.js I get nothing. Is this a bug or am I missing someting?
  5. Hi, I've read quite a few posts on the forum but didn't really find an answer, so if it has been answered elsewhere I'd be happy to get a link. I'm currently trying to make a game using Intel XDK and Phaser (I'm new to both, though). The game will be pretty simple and mostly static, basically a board game on a mobile screen. I'm using the CANVAS renderer, and I'm drawing directly to the canvas (no sprites, no images, just drawing primitives). There are no issues with different screen sizes or aspect ratios, as the game scene is calculated to fit into any ratio and size. Phaser will b
  • Create New...