PhaserEditor2D / PhaserEditor

A friendly IDE to develop HTML5 games based on the Phaser framework.
https://phasereditor2d.com
Eclipse Public License 1.0
330 stars 45 forks source link

implementing box2d plugin #140

Open bhnh opened 4 years ago

bhnh commented 4 years ago

I have purchased both Phaser Editor and the Phaser Box2d plugin. When I try to run the Box2d examples, I'm told I need the plugin. How do I implement the plugin so I can view the Box2d examples?

PhaserEditor2D commented 4 years ago

Hello @bhnh

What version of Phaser are you using?

bhnh commented 4 years ago

Phaser Editor 1.5.4.20190529 Supports Phaser v2.6.2 (built-in)  OS: Windows 10, v.10.0, x86_64 / win32 

PhaserEditor2D commented 4 years ago

Hi!

We cannot bundle the Box2D plugin inside Phaser Editor, it is a product from Phaser.io. But you can create a Phaser Editor project based on the Box2D example and add the Box2D runtime yourself.

For example:

  1. Create a Box2D example project:

image

  1. Copy the Box2D plugin runtime in the project's lib folder. In my case, I am using the runtime provided in the Phaser 2 examples:

image

  1. Load the Box2D plugin runtime in the index.html file of your project:

image

  1. Run the game.

Again, I used here the Box2D runtime provided by the Phaser examples, but you should follow the instructions provided by the Box2D plugin documentation.

PhaserEditor2D commented 4 years ago

I attach here the final project: Bullet Bodies.zip

PhaserEditor2D commented 4 years ago

Is this working?