• Content count

  • Joined

  • Last visited

About fariazz

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

767 profile views
  1. Adding a custom property to elements in a group

    Had a look at Phaser.GameObjects.Group#createFromConfig but couldn't think of an easy way to add something like what scenes have: if (sceneConfig.hasOwnProperty('extend')) { for (var propertyKey in sceneConfig.extend) { newScene[propertyKey] = sceneConfig.extend[propertyKey]; } } But also I'm not fully convinced this should be added. I kind of thought that it would be nice to have but then easily added sprite custom properties using Call on the group object in my game: Phaser.Actions.Call(this.enemies.getChildren(), function(enemy) { enemy.speed = Math.random() * 2 + 1; }, this); Maybe it's best not to add so many things and see what common use patterns are emerging first.
  2. Phaser 3 is out and we are looking for motivated individuals to create engaging tutorials for this new framework, for our website GameDev Academy. To get an idea of what we are after, have a look at our Phaser 2 tutorials. You can either build a new mini-game, or take any of our Phaser 2 examples and try to port it in Phaser 3 - we are quite open when it comes to topics here and would love to hear what you would like to explore. This is a paid, freelancing position. We are flexible in terms of output, however we do want you to commit to at least 1 tutorial per month. APPLY HERE
  3. Adding a custom property to elements in a group

    Not sure, I guess it would do whatever `extend` does for Scene objects. Will have a look at how it's implemented for scenes and see what I can do
  4. I was wondering if there is a way to add a custom property to all the sprites when creating a group, something like an "extend" property on the config object, similar to that of Scenes: this.enemies = this.add.group({ key: 'dragon', repeat: 5, setXY: { x: 120, y: 100, stepX: 70, stepY: 20 }, //proposed idea extend: { gold: 2, silver: 1 } }); Is there a way currently to set a property to all the elements of a group? from the source code I only found Phaser.Action.Call which can be used for this.
  5. Adding methods to a Scene without extending it

    I kind of found my answer already in the scene examples in case it helps anyone. Instead of creating the scene as an object like above, the way presented in the example seems much better for ES5. More examples are available there as well: var gameScene = new Phaser.Scene('Game'); gameScene.myMethod = function() { console.log('yo'); }; // load asset files for our game gameScene.create = function() { console.log(this.myMethod); };
  6. Hi all, I'm trying to build a demo keeping it simple with ES5, and I'm trying to add a custom method to a scene, in a way similar to how it was done on Phaser 2. I realized this is not possible and was wondering if there is any recommended way to do this (without using ES6 to extend the Scene class, and without adding functions in the global scope either): var GameScene = { preload: ... create: ... update: function() { // custom logic if(...) { // if something happens, game over (doesn't work). this.gameOver is undefined this.time.delayedCall(500, this.gameOver, [], this); } }, // adding this custom method like in Phaser 2 - doesn't work on Phaser 3 gameOver: function() { console.log("game over"); } } var config = { type: Phaser.AUTO, width: 640, height: 360, scene: GameScene }; var game = new Phaser.Game(config);
  7. Hi everyone! Just wanted to share our very first online Phaser competition, which consists in creating a Phaser game of up to 500 kb (not including the Phaser library) using certain public domain assets. Prizes include a $200 cash reward and access to tons of online courses (total retail price of +1800 USD). Submissions end on the 30th of July so you have a bit over 3 weeks! All submissions will be featured in our blog and shared with thousands of developers. Learn more and see the rules HERE
  8. We are planning on making an advanced Phaser course that goes beyond the usual "how to make a XYZ type of game in Phaser". What topics should a course like that include? I know Lazer is in the making, but this course would be focused on Phaser 2.x.
  9. Hey everyone! Just wanted to share our new project on Kickstarter: CODEMURAI, a mobile app to learn programming while on the ego. The app will include modules on Phaser (or perhaps Lazer, depending on what's mainly being used in 6 months or so). If you are interested in learning more and supporting this is the link: https://www.kickstarter.com/projects/pablofarias/learn-to-make-games-apps-and-websites-on-your-phon If you have any questions let me know!
  10. Phaser and Ionic Framework to hybrid mobile apps

    Crosswalk adds around 20 mb actually (still heavy! but not 50)
  11. Can't export from Blender to Babylon.js

    Thanks guys for the amazingly fast support. Under the new version of the exporter 3.0.1 it works like a charm using Blender 2.75.
  12. Can't export from Blender to Babylon.js

    It seems to be an issue with the latest version. It worked fine when I used an older version of the python script. Opened an issue https://github.com/BabylonJS/Babylon.js/issues/655
  13. I'm trying to export any file from Blender using File - Export - Babylon.js and I get this error message. Any help would be very much appreciated! Exporter version: 3.0.0, Blender version: 2.70 (sub 0)========= Conversion from Blender to Babylon.js ========= Python World class constructor completed processing begun of mesh: Cylinder.004 processing begun of Standard material: Material.028 num positions : 66 num normals : 66 num uvs : 0 num uvs2 : 0 num colors : 0 num indices : 384 processing begun of mesh: Sphere.006 processing begun of Standard material: Material.033 num positions : 529 num normals : 529 num uvs : 0 num uvs2 : 0 num colors : 0 num indices : 3096 processing begun of mesh: Sphere.005 processing begun of Standard material: Material.027 num positions : 994 num normals : 994 num uvs : 0 num uvs2 : 0 num colors : 0 num indices : 5952 processing begun of mesh: Sphere.004 processing begun of baked material: Sphere.004========= An error was encountered ========= File "/home/fariazz/.config/blender/2.70/scripts/addons/io_export_babylon.py", line 287, in execute mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self) File "/home/fariazz/.config/blender/2.70/scripts/addons/io_export_babylon.py", line 695, in __init__ bakedMat = BakedMaterial(exporter, object, recipe) File "/home/fariazz/.config/blender/2.70/scripts/addons/io_export_babylon.py", line 1803, in __init__ bpy.ops.uv.smart_project(angle_limit = 66.0, island_margin = 0.0, user_area_weight = 1.0, use_aspect = True) File "/usr/share/blender/scripts/modules/bpy/ops.py", line 188, in __call__ ret = op_call(self.idname_py(), None, kw)ERROR: Converting py args to operator properties: : keyword "use_aspect" unrecognized========= end of processing =========elapsed time: 0 min, 0.1385 secsThis is version 2.72 of Blender (the one required for the Babylon export script) in Ubuntu. I've tried exporting a new Blender project with no edits, also tried this public domain one Japanese House | Blend Swap and many others, always getting the same "use_aspect" error message.
  14. Thanks for the help but I couldn't get it to work so opted to use Webstorm instead.
  15. Not sure I understand. Where do I find babylon.d.ts? Where do I put this code: /// <reference path="../Libs/babylon.d.ts" /> ?