Search the Community

Showing results for tags 'config'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • 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 5 results

  1. Does anyone know how to pass data into the game scene in Phaser 3 as you could do in Phaser 2 when started a state? game.state.start('Game', true, true, { data: 'this is some initial config' }); Phaser 3 Scene was Phaser 2 State, which you could provide parameters, the 2-3rd was as i remember caching, the 4th could be and data, which became available in the State's init() {} method as init({data}). In Phaser 3 a Scene has a second, data param, but it is not clear how it is used, the init method is not getting it, and the documentation is not ready for that as far as i know.
  2. hundo.chester

    player bounds change

    Hello, i have this script which is based on the tutorial: i want the player to navigate through the world, but it's constrained to a 800x600 box, (as this is the world WxH), the "game" world is a GIF 4096x3500. maybe this is not the correct way, could you please lead me into the correct way? this is the code: thanks
  3. David Higuita

    Settings (game.cofig)

    Hello, What are all the config keys for game.config, so I need to know How can I move engine folder to a general directory to be re-used for all games and in every game develop the modules tha I need. I mean I, I would like get this structure: . ├── ├── assets │ ├── Audios │ └── Images ├── common │ └── pandajs │ └── engine └── src └── demo ├── game │ ├── background.js │ ├── board.js │ ├── box.js │ ├── frog.js │ ├── index.js │ ├── interactiveimage.js │ ├── mainText.js │ ├── step1.js │ ├── step2.js │ ├── step3.js │ └── utils.js ├── index.html └── settings.js
  4. Can somebody who is already using the TernJS plugin for vim help me configure the .tern-project file for a phaser project. I have generatated the files using yeoman phaser-official generator so my folder structure looks like this: src/ | assets/ | bower_components/ | | phaser-official/ | css/ | js/ | | boot.js | | game.js | | main.js | | main.js.bkup | | menu.js | | preloader.js | index.html Do I have to use RequireJS to configure Tern? If yes, is there any generator that does it automaticaly? I've never used RequireJS before so I don't know how to set my project up with it.
  5. jloa

    p2 physics config issue

    Before creating an issue on github, decided to put it here (as suggested here Class: Phaser.Physics.P2 Method: constructor Issue: physics config's user-defined options (mpx, mpxi, pxm, pxmi) get deleted in Phaser.Physics.P2 constructor. Proof: Why: game class instance passes the physics config to Phaser.Physics instance, then the config gets passed to Phaser.Physics.P2. Within this chain no other props are created, as a result 'broadphase' prop is never present in the physics config and always created by the p2 class. So, when a new p2 instace is created, the config with your custom mpx, mpxi, pxm, pxmi props gets replaced with a new config of { gravity, broadphase } only. As a result p2 uses default mpx, mpxi, pxm, pxmi methods (so they don't get overriden) How-to-fix: switch from config replacement to property adding. Current code: Phaser.Physics.P2 = function (game, config) {/** * @property {Phaser.Game} game - Local reference to game. */ = game;// @note// what if i already defined 'gravity' and 'broadphase' is not defined (btw it's never defined until this point)// my gravity prop will be also overridenif (typeof config === 'undefined' || !config.hasOwnProperty('gravity') || !config.hasOwnProperty('broadphase')){ config = { gravity: [0, 0], broadphase: new p2.SAPBroadphase() };}The fix: Phaser.Physics.P2 = function (game, config) {/** * @property {Phaser.Game} game - Local reference to game. */ = game;// config exists? if not - create oneif (typeof config === 'undefined'){ config = {};}// we got gravity? if not - define [0,0]if (!config.hasOwnProperty('gravity')){ config.gravity = [0, 0];}// we got broadphase? if not - create a new instanceif (!config.hasOwnProperty('broadphase')){ config.broadphase = new p2.SAPBroadphase();}// ... now mpx, mpxi, pxm, pxmi props will override the default methods properly// Pixel to meter function overridesif (config.hasOwnProperty('mpx') && config.hasOwnProperty('pxm') && config.hasOwnProperty('mpxi') && config.hasOwnProperty('pxmi')){ this.mpx = config.mpx; this.mpxi = config.mpxi; this.pxm = config.pxm; this.pxmi = config.pxmi;}