making_games Posted August 25, 2015 Share Posted August 25, 2015 Hi, I am completely new to Phaser. My first step was to create a custom build of Phaser by following the information at: http://phaser.io/tutorials/creating-custom-phaser-builds My custom build was created by the following: grunt custom --exclude gamepad,intro,retrofont,ninja,creature,tilemaps,outro,rope,tilesprite,tilemaps --sourcemap true --uglify true However i get an exception in the custom phaser.js file at: Phaser.TileSprite.prototype = Object.create(PIXI.TilingSprite.prototype);Phaser.TileSprite.prototype.constructor = Phaser.TileSprite; If i take out the tilemaps stuff: grunt custom --exclude gamepad,intro,retrofont,ninja,creature,tilemaps,outro,rope --sourcemap true --uglify true I get an exception: Phaser.Rope.prototype = Object.create(PIXI.Rope.prototype);Phaser.Rope.prototype.constructor = Phaser.Rope; If i take the rope stuff out I get an exception at: PIXI.blendModesWebGL[PIXI.blendModes.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; (JavaScript runtime error: Unable to get property 'NORMAL' of undefined or null reference) What am I doing something wrong? I does say on the Phaser webpage that the build script will warn you if you cannot exclude a module because of a coupling with another required module. But I see no warnings. Running the full build of phaser works fine. Thanks for any help! Link to comment Share on other sites More sharing options...
making_games Posted August 26, 2015 Author Share Posted August 26, 2015 Anybody? From a quick look it seems as though the --exclude flag stops the excluded modules being put in the modules folder during the grunt task, but the gameobjects.js file when setting up the inheritance chain for certain objects tries to instantiate excluded PIXI objects: Phaser.Rope.prototype = Object.create(PIXI.Rope.prototype); In this case PIXI.Rope does not exist. Somebody else must have experienced this or do most people just use the full monty build? Cheers for any help. Link to comment Share on other sites More sharing options...
suntabu Posted September 24, 2015 Share Posted September 24, 2015 Hi,have you solved this problem?I've encountered the same question and tried many version phaser source code to custom build my file then failed with the error Link to comment Share on other sites More sharing options...
Recommended Posts