• Content Count

  • Joined

  • Last visited

  1. Thanks, this is just the type of general discussion I was trying to start. I wanted to see both if could be faked and/or if there's other ways of doing this with Phaser.
  2. Has anyone achieved water in their game with phaser? How could it be done? Is it possible for waves to form/it able to drain out and stuff, and what about collisions? Can you detect collisions with water/liquid in Phaser? I know it's like 3-4 questions in one! I searched a couple times for this in the forum and didn't see anything on this. Hopefully some good responses, I'd love to incorporate water into a game and do some things like Ecco the Dolphin or Sonic games did.
  3. I'm looking for a tool that does this in Linux, any luck? EDIT: I at least found a temporary use in PhysicsEditor, I installed using PlayOnLinux/Wine. So far seems to work fine, I was able to import basic convex and concave polygons from the files I exported, it exports JSON I was able to use in Phaser using the Corona + Lime Exporter, I have not tried the exporter in the Phaser resources yet but am real excited now I found a tool I can at least use in Linux. Still, I'd like to know any native Linux ones yet you've found?
  4. When I try this I get ouptut like this from Physics Body Editor, When I try to load using the example code I'm getting TypeError: data.shape is undefined in the console. When I load this into the canvas using example code from Load Polygon 1 I get the error in console: TypeError: data.shape is undefined Any idea what I'm doing wrong? {"shape2":[{"shape2":"Name","imagePath":"mytek-logo.png","origin":{"x":0,"y":0},"polygons":[[{"x":0.29433271288871765,"y":0.11334551870822906},{"x":0.325411319732666,"y":0.009140759706497192},{"x":0.33820840716362,"y":0.0018281340599060059},{"x":0.4113345444202423,"y":0.0018281340599060059},{"x":0.4149908721446991,"y":0.012797057628631592},{"x":0.33820840716362,"y":0.2669104039669037}],[{"x":0.33820840716362,"y":0.2669104039669037},{"x":0.325411319732666,"y":0.2742230296134949},{"x":0.2522851824760437,"y":0.2742230296134949},{"x":0.23948810994625092,"y":0.2577696442604065},{"x":0.21206581592559814,"y":0.162705659866333},{"x":0.28702011704444885,"y":0.11334551870822906},{"x":0.29433271288871765,"y":0.11334551870822906}],[{"x":0.21206581592559814,"y":0.162705659866333},{"x":0.13162705302238464,"y":0.10968920588493347},{"x":0.1608775109052658,"y":0.009140759706497192},{"x":0.1736745834350586,"y":0.0018281340599060059},{"x":0.2468007355928421,"y":0.0018281340599060059},{"x":0.2632541060447693,"y":0.029250457882881165},{"x":0.28702011704444885,"y":0.11334551870822906}],[{"x":0.20109689235687256,"y":0.177330881357193},{"x":0.1736745834350586,"y":0.2669104039669037},{"x":0.1590493619441986,"y":0.2742230296134949},{"x":0.12431444227695465,"y":0.11517366766929626},{"x":0.13162705302238464,"y":0.10968920588493347}],[{"x":0.13162705302238464,"y":0.10968920588493347},{"x":0.21206581592559814,"y":0.162705659866333},{"x":0.20109689235687256,"y":0.177330881357193}],[{"x":0.1590493619441986,"y":0.2742230296134949},{"x":0.0822669118642807,"y":0.2742230296134949},{"x":0.07678245007991791,"y":0.2614259421825409},{"x":0.0018281536176800728,"y":0.009140759706497192},{"x":0.014625228941440582,"y":0.0018281340599060059},{"x":0.0840950608253479,"y":0.0018281340599060059},{"x":0.09323583543300629,"y":0.009140759706497192},{"x":0.12431444227695465,"y":0.11517366766929626}]],"circles":[],"shapes":[{"type":"POLYGON","vertices":[{"x":0.0822669118642807,"y":0.2742230296134949},{"x":0.1590493619441986,"y":0.2742230296134949},{"x":0.1736745834350586,"y":0.2669104039669037},{"x":0.20109689235687256,"y":0.177330881357193},{"x":0.21206581592559814,"y":0.162705659866333},{"x":0.23948810994625092,"y":0.2577696442604065},{"x":0.2522851824760437,"y":0.2742230296134949},{"x":0.325411319732666,"y":0.2742230296134949},{"x":0.33820840716362,"y":0.2669104039669037},{"x":0.4149908721446991,"y":0.012797057628631592},{"x":0.4113345444202423,"y":0.0018281340599060059},{"x":0.33820840716362,"y":0.0018281340599060059},{"x":0.325411319732666,"y":0.009140759706497192},{"x":0.29433271288871765,"y":0.11334551870822906},{"x":0.28702011704444885,"y":0.11334551870822906},{"x":0.2632541060447693,"y":0.029250457882881165},{"x":0.2468007355928421,"y":0.0018281340599060059},{"x":0.1736745834350586,"y":0.0018281340599060059},{"x":0.1608775109052658,"y":0.009140759706497192},{"x":0.13162705302238464,"y":0.10968920588493347},{"x":0.12431444227695465,"y":0.11517366766929626},{"x":0.09323583543300629,"y":0.009140759706497192},{"x":0.0840950608253479,"y":0.0018281340599060059},{"x":0.014625228941440582,"y":0.0018281340599060059},{"x":0.0018281536176800728,"y":0.009140759706497192},{"x":0.07678245007991791,"y":0.2614259421825409}]}]}],"dynamicObjects":[]}EDIT: Ok, I think I'm getting somewhere now, I edited the output of physics body editor and just took one set of points from the polygons array like this, and that did it, now it's colliding and bouncing on one little point. So now how do I output from Physics Body Editor to json that's already like this so it can be used in Phaser? Is there a better way? { "shape2":[ { "shape": [0.29433271288871765,0.11334551870822906 , 0.325411319732666,0.009140759706497192 , 0.33820840716362,0.0018281340599060059 , 0.4113345444202423,0.0018281340599060059 , 0.4149908721446991,0.012797057628631592 , 0.33820840716362,0.2669104039669037 ] } ]}EDIT: Can anyone demonstrate a workflow for this? The files I export from Physics Body Editor load but when I am trying to load them like in the Load Polygon 1 and 2 in the P2 Physics examples, I am getting TypeError: data.shape is undefined. Is there something you need to do to use the files Physics Body Editor makes? I'm using physics body editor 2.9.2 EDIT: I figured out I can use PhysicsEditor through Wine and it exports files like the example. Is there an export option I need to use with Physics Body Editor I would like to use it but the files it exports don't seem to be right for Phaser? I'm marking this as solved for now, I'm fine with Wine, Physics Editor seems to be a little more advanced than Physics Body Editor anyways.
  5. Thanks so much, these answers are exciting, as I wanted to use PhysicsBodyEditor, my problem was I think my workflow, I created a simple shape and exported as JSON but could not get it to import. When I compared the text of the file to one of the sprites json files it looked a lot different. Are there any workflow example of PhysicsBodyEditor use with Phaser?
  6. Can anyone tell me or suggest how the polygons were created in the phaser examples? I wanted to make complex shapes like that for collision/p2 physics but am having some difficulty finding how they're made. http://examples.phaser.io/_site/view_full.html?d=p2%20physics&f=load+polygon+1.js&t=load%20polygon%201 http://examples.phaser.io/_site/view_full.html?d=p2%20physics&f=load+polygon+2.js&t=load%20polygon%202 I apologize if this is a real n00b question but I was actually having trouble finding out.
  7. Would you in general recommend R.U.B.E for Phaser if I want polygons like in the phaser examples? I included a link to one down below. I would like to be creating polygons, I tried Physics Body Editor (Box2d-editor) and could not even get a normal triangle I exported to load on the stage using Phaser. What kind of software can I use to create polygons like the ones in the p2 examples? Preferably for Ubuntu/Linux, but Mac, Windows softwares are ok too! Thanks. http://examples.phaser.io/_site/view_full.html?d=p2%20physics&f=load+polygon+1.js&t=load%20polygon%201