Search the Community

Showing results for tags 'name'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 6 results

  1. I am trying to create an adventure game. Very new to Phaser and Js. I've been through multiple tutorials and am now trying to make my way on my own. If you imagine a stage that can be returned to at any time, I need to know if the coins on that stage were collected before. I can write individual functions for each coin successfully: var State1 = { preload: function(){ game.load.image('coin','coin.png'); }, create: function(){ //note these vars are declared in Main state numCoins = 0; //the array that will tell me if the coin has already been collected. that check hasn't been written yet. coinsCollected = []; this.coinText =game.add.text(, 30, numCoins, {font: "26px Amatic SC"}); //single coins to collect on the stage. trying 2 different ways to show, as button and as sprite this.coin1=game.add.button(600, 300, 'coin', this.getCoin1, this); var coin2 = game.add.sprite(350, 250, 'coin'); coin2.inputEnabled=true;, this); var coin3 = game.add.sprite(400, 100, 'coin'); coin3.inputEnabled=true;, this); }, getCoin1: function(coin){ numCoins ++; this.coinText.text=numCoins; //which coins have been collected coinsCollected.push('coin1'); console.log(coinsCollected); coin.kill(); }, getCoin2: function(coin){ numCoins ++; this.coinText.text=numCoins; coinsCollected.push('coin2'); console.log(coinsCollected); coin.kill(); }, So that works fine, but obviously I don't want to write out a hundred "getCoin" functions. How do I pass the name of the coin to a single getCoin function so I can store it in an array? so getCoin: function(coin){ numcoins ++; this.coinText.text=numCoins; coinsCollected.push(coinNAME); }
  2. Hey. While working with PBR materials i have noticed that the name and id are not applied when cloning the material. Instead it uses it's parent name and id. For comparison here is the cloning snippet for the standard material and PBR materials, where the id and name are not reset prior to returning. StandardMaterial.prototype.clone = function (name) { var _this = this; var result = BABYLON.SerializationHelper.Clone(function () { return new StandardMaterial(name, _this.getScene()); }, this); = name; = name; return result; }; PBRMetallicRoughnessMaterial.prototype.clone = function (name) { var _this = this; return BABYLON.SerializationHelper.Clone(function () { return new PBRMetallicRoughnessMaterial(name, _this.getScene()); }, this); }; Correct me if I am missing something. Thanks
  3. Hello, I have a small experience in WebGL but I am totally new to Babylon.js, I hope I am not loosing your time with a basic question that has already been answered... Many functions of the framework ask for a name as first parameter : like for example "sphere1" in BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene); Sometimes, like in the babylon playground in example 17 (called Actions), all omni lights have the same name "omni" : var light1 = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene); var light2 = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene); var light3 = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), scene); It looks like these names are not used afterwards in our code, are they used internally ? When I use the same name for all my objects it looks like it doesn't change anything, but I haven't made extensive testing, do you know what it is really used for internally ? For example in the particule module, all particules have a different name ? Thank you very much for your answer, and once more I hope I am not asking a question that has already been answered many times...
  4. I find my self often using console.log() to log for messages while developing which does the job but in the end I should remove all those log statements. So I though it would be nice if I use my own debug text field in Phaser. Yes I made one and it works but how to log messages on screen when all the JS scripts are still not loaded i.e before the game code loads? So, the new canvas API has methods to draw text inside but I don't see the canvas html element being created by Phaser to have its own ID or name. Yes I could possibly do it with custom JS function but are there some tools to help me already? Or I just create separate html element like paragraph and write log messages inside of it and don't bother with the canvas?
  5. Can anybody tell me how to define name in Blender. When we export model for babylon.js. Name and id are same. I would like to define name in Blender. Where can be that defined in blender?
  6. I recently found out about the new top level domain name extension, .game, that will be available in May. We finally have something that we can use for domain names for our specific games (instead of just having them as an extension of our personal/company websites), but I wonder how many people will actually make use of this. I am currently working on something cool and would love to have The prices do look like they have established game companies in mind, being a bit out of reach for individuals/small teams. What do you think? Will you be getting a .game domain? Think they are not worth the hassle? EDIT: Wow, news today of .games going to be available too, and at a more acceptable price for many.