matias_ini

Members
  • Content count

    9
  • Joined

  • Last visited

About matias_ini

  • Rank
    Newbie
  • Birthday 02/22/1975

Contact Methods

  • Website URL
    http://www.ingames.tv/
  • Twitter
    @ingamestv
  • Skype
    matiasini

Profile Information

  • Gender
    Male
  • Location
    Argentina
  • Interests
    Game Development

Recent Profile Visitors

186 profile views
  1. matias_ini

    Phaser code obfuscation

    I I totally agree that what you tell me would be the BEST solution, in that way I would obfuscate everything together and it would be a great solution. But I have tried it before and I got the same errors as with externs. Samme, could you try running the code: java -jar compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js ./GamePlay.js --js ./phaser.js --js_output_file=out.js and see if you also have errors? Please???? GamePlay.js only has this code: var GamePlayManager = { init: function() { console.log("init"); }, preload: function() { console.log("preload"); }, create: function() { console.log("create"); }, update: function() { console.log("update"); } } var game = new Phaser.Game(1136, 640, Phaser.CANVAS); game.state.add("gameplay", GamePlayManager); game.state.start("gameplay");
  2. matias_ini

    Phaser code obfuscation

    I tried both with phaser.js and phaser.min.js but both give me errors. java -jar compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js ./GamePlay.js --js_output_file=out.js --externs ./phaser.js I get a lot of warnings and this errors: ./phaser.js:2604: ERROR - variable Phaser is undeclared this.anchor = new Phaser.Point(0, 0); ^^^^^^ ./phaser.js:2710: ERROR - variable lastLineWidth is undeclared lineWidths.push(lastLineWidth); ^^^^^^^^^^^^^ ./phaser.js:9817: ERROR - variable tempPoint is undeclared this.worldTransform.applyInverse(point, tempPoint); ^^^^^^^^^ ./phaser.js:10204: ERROR - variable GraphicsData is undeclared return new GraphicsData( ^^^^^^^^^^^^ ./phaser.js:12427: ERROR - variable exports is undeclared if (typeof exports !== 'undefined') { ^^^^^^^ ./phaser.js:12428: ERROR - variable module is undeclared if (typeof module !== 'undefined' && module.exports) { ^^^^^^ ./phaser.js:12432: ERROR - variable define is undeclared } else if (typeof define !== 'undefined' && define.amd) { ^^^^^^ ./phaser.js:13711: ERROR - variable PIXI is undeclared PIXI.Circle = Phaser.Circle; ^^^^ ./phaser.js:19989: ERROR - variable CocoonJS is undeclared CocoonJS.App.onSuspended.addEventListener(function () { ^^^^^^^^ ./phaser.js:43527: ERROR - variable localStorage is undeclared device.localStorage = !!localStorage.getItem; ^^^^^^^^^^^^ ./phaser.js:43729: ERROR - variable process is undeclared if (typeof process !== "undefined" && typeof require !== "undefined") ^^^^^^^ ./phaser.js:43729: ERROR - variable require is undeclared if (typeof process !== "undefined" && typeof require !== "undefined") ^^^^^^^ ./phaser.js:64791: ERROR - variable global is undeclared !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.p2=e():"undefined"!=typeof global?global.p2=e():"undefined"!=typeof self&&(self.p2=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ ^^^^^^ ./phaser.js:77529: ERROR - variable p2 is undeclared p2.Body.prototype.parent = null;
  3. matias_ini

    Phaser code obfuscation

    Hi v0van1981 I am trying to minimize a Phaser project using Google Closure Compiler with ADVANCED_OPTIMIZATIONS compilation_level. I tried using phaser.min.js file as externs but I get 14 ERRORS when running the .jar. Have you been able to make it work? Please help
  4. matias_ini

    Google Closure Compiler

    Hi, I am trying to minimize a Phaser project using Google Closure Compiler. I have no problems using SIMPLE_OPTIMIZATIONS as it does not change the name of the functions and properties but if I try to use ADVANCED_OPTIMIZATIONS the code does not work. I know that to solve it you have to use a file with the externs, but how exactly do I assemble this file so as not to have conflicts with all the functions and properties of Phaser? Of this simple code: var GamePlayManager = { init: function() { console.log("init"); }, preload: function() { console.log("preload"); }, create: function() { console.log("create"); }, update: function() { console.log("update"); } } var game = new Phaser.Game(1136, 640, Phaser.CANVAS); game.state.add("gameplay", GamePlayManager); game.state.start("gameplay"); I get this: var a=new Phaser.b(1136,640,Phaser.a);a.state.add("gameplay",{c:function(){console.log("init")},preload:function(){console.log("preload")},create:function(){console.log("create")},update:function(){console.log("update")}});a.state.start("gameplay"); When creating the Phaser project you see Phaser.b instead of Phaser.Game. There are many functions and properties in Phaser so it would be impossible to put all in the extern file by hand unless it is already created by someone?
  5. matias_ini

    Phaser and Facebook Instant Games scaling

    You can do it very easy in this way: game = new Phaser.Game ('100%', '100%', Phaser.CANVAS); Then you can get the real width and height reading game.width and game.height
  6. matias_ini

    Facebook Instant Games scaling for mobile

    You can do it very easy in this way: game = new Phaser.Game ('100%', '100%', Phaser.CANVAS); Then you can get the real width and height reading game.width and game.height
  7. Hi, I wanted to share my first Instant Game for Facebook Messenger that is developed in Phaser 2. You can play Cut The Tree here: https://www.facebook.com/instantgames/cut_the_tree
  8. matias_ini

    Game list of phaser games

    Hi, I wanted to share my first Instant Game for Facebook Messenger that is developed in Phaser 2. You can play Cut The Tree here: https://www.facebook.com/instantgames/cut_the_tree
  9. matias_ini

    How to know if a device is muted

    Hi, Does anyone know how to know if a device is muted? If it can not be done in Phaser how can I do it using javascript? Cheers, Matias Ini