Giter Club home page Giter Club logo

phasereditor2d-v3's Introduction

Phaser Editor 2D - v3

Phaser Editor 2D is a web-based IDE to develop HTML5 games. The games are powered by the popular Phaser framework.

Phaser Editor v3 scheernshot

This is a full re-write of the editor, using web technologies.

Previous versions of the editor are based on the Eclipse IDE. Both are hosted here.

We are an independent developer. Phaser Editor is not part of the Phaser project. Contact them at phaser.io

Main features

  • The IDE runs in the browser. It has a small backend that can be run in the cloud or locally.

  • It is lightweight and is focused on visual tools.

  • However, it provides basic editors for coding JavaScript/TypeScript.

  • Friendly for collaborators: it is coded in TypeScript and provides an extensible framework. The server side is coded in Go.

  • It follows the Phaser standards and API. Extra plugins or runtimes are not required.

Documentation

Phaser Editor 2D v3 is fully documented.

Demos

Eventually, we share videos, screenshots, and thoughts about the editor's development progress.

Download

You can get the binaries in the website downloads.

Quick start

Check the starter templates.

Build and run

Follow these steps

Licensing

The code provided in this repository is under the MIT license.

The editor code is divided into two parts: the front-end (the HTML5-based IDE, or client) and the back-end (the HTTP server). This repository contains the full code of the client, that is the bigger part. The server code is closed.

Contact

If you find any issue or have an idea, please, open an issue in this repository. Or contact us at [email protected] or say hi in our Discord server.

Author

Phaser Editor is developed by Arian Fornaris.

phasereditor2d-v3's People

Contributors

michaelgundlach avatar phasereditor2d avatar zombiestruck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phasereditor2d-v3's Issues

Playable Build Option - Single in-lined index.html

Digging the ease of use of the Phaser Editor. Would be nice if there were a build option to build the game in a single html file. (Data URI base 64 approach) Many, including myself, use phaser to create playable ads. One of the biggest challenges is that many of the ad networks have limitations in regards to html5/javascript playables. Facebook for example requires a single index.html file with a 2MB limit. Which Phaser and it's community has made possible - would be sweet if this could be done via the Phaser Editor.

pressing backspace or delete on tools or inspector should snap back to a default value

pressing backspace or delete on origin tool should snap the origin to 0.5 0.5

pressing backspace or delete on translate tool should snap back to 1 1

pressing backspace or delete on rotate tool should snap back to 0

when you clear origin X Y in inspector it should return to 0.5 instead of NaN

when you clear angle inspector it should return to 0 instead of NaN

when you clear scale inspector it should return to 0 instead of NaN

etc

you can recreate the NaN bugs by selecting an item in the inspector , pressing delete until there is no text and then pressing enter

Peek 2020-06-26 23-03

Show tooltip on texture selection

I have a problem where I sometimes can't tell which is the correct texture that I want to use.
It would be great to have a tooltip show the full frame name when you hover your mouse over it.

image

Scene zoom tool

I think maybe working on a tool to improve the zoom of the scene, since I often get lost using only the cursor wheel

Can't load game.js in Chrome with macOS Catalina

Hi, I've just downloaded the installer on macOS Catalina and started Phaser Editor 2D with the command line. The editor works well at http://127.0.0.1:1959/editor/ and I'm able to save files locally, but when I hit the "run" button, I just get a black screen. When I open the network tab in the Chrome dev tools, I can see that the game.js can't be loaded.

image

Allow to maximize editor

(Requested by client)

My idea: It would be nice to get in the new update the ability to expand the window with the code in full screen.

Support for SVG files?

I've noticed that I can add SVG files to the pack.json, however I can't figure out how to reference or add these files to the actual scene. Is this even supported?

Sort Items On Texture Selection Menu

Currently said menu displays items without any sorting whatsoever. Adding alphabetical sorting or at least an option to change how items are displayed would be helpful as it'd greatly speed up finding a certain texture quickly.

Option to exclude a directory in the project so it doesn't get indexed.

Option to exclude a directory in the project so it doesn't get indexed.

I am working with many cosmetic assets that get loaded dynamically using code. The problem is that I cannot include all the assets in my project because I quickly hit the max file limit. The current fix is to only have the assets in the production server, but this becomes hard to manage because I cannot include it in our GitHub repository.

The solution to this problem would be including a config file or menu that allows you to list all the directories that should be ignored by the editor and an option to increase the max file limit. Thank you!

Support Tiled JSON maps

Hi!

I successfully worked with tilemaps that are defined with a CSV file. But it does not work as expected with tilemaps whose data is in JSON format. Where the map should appear in the canvas editor only an empty rectangle with the text "Tilemap JSON" comes up.

I tried it in a new project using super_mario.json and super_mario.png from the Phaser example "Load Tilemap Json": https://phaser.io/examples/v2/loader/load-tilemap-json.

Feature Request: 9 slice sprite

Phaser editor is the essential tool to create phaser UI.
But there is one critical missing feature to use this tool effectively.
Please support 9 slice sprite.

Texture pools

(from http://www.bluesaltgames.com developers email)

Texture pools - the way unity works with textures if brilliant – drag & drop into the assets folder and it’s all taken care for you. Whenever I create a new sprite I can just drag & drop any of the images in that pool to my convenience. This is a great thing and really streamlines the development process. Right now if I create a prefab sprite with animations from a spritesheet I have to add it to the texture.atlas, then reference that image in the sprite, and I’ll only be able to use images from that sprite.

Better refractoring in the editor

When you rename a .scene file, it should change its corresponding .js file and possibly also rename the Scene Key.
Make sure the scene is compiled so the .js file has an updated class name.

Request: Timeline Editor -- animating: Elements, values, transformations by KeyFrames

I would like to see a Timeline Editor inside PhaserEditor2D v2.xx. The great benefit would be:

  • animating values, by Keyframes
  • own individual easings, by Keyframes
  • animating elements, by Keyframes
  • animating transformations, by Keyframes
    etc.

(We allready have a Sprite-Animator-Editor. What i mean is a multi-purpose Timeline-Animation-Editor)

Really endless possibilities ! A great way to control your animations, beside the coding method. We know this allready from other Apps / GameEngines. It has its reasons why these Apps / GameEngines have it on board. So it would be great, if we got such a Tool inside PhaserEditor2d v2.xx. I am sure, the Devs have this on their track :-)

In-App Update

May I know there is any plan of the In-App Update function like the Editor V2?

pan tool

in the same way you select the Translate tool, add the option to select a Pan tool. Optionally including holding space and dragging to pan, and adding scroll bars

Add Support for Safari

image

I tried to open the editor via Safari but got Unhandled Promise Rejection Error like the above image. Safari finally only shows a blank page.

Make Display List in the Outline view rearrangeable

Currently, there are a number of ways to change the order of a scene's display list, but this way offers to be more intuitive to some users by dragging an item and changing its position, thus altering the order of the display list.

Copied scenes and prefabs are not assigned a new scene ID

Version

  • Phaser Editor 2D Version: v3.4.0
  • Operating System: Windows 10 x64
  • Web Browser and version: Google Chrome

Description

When copying a .scene file, the scene identifier used by the editor remains the same, which causes many issues and the editor will not know what to do with two identical scenes.

image

Possible solution

The solution to this problem would be to generate a new ID when a prefab is copied.

option to remove javascript field declarations from compiled javascript

The newest version adds https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Field_declarations , which don't work in safari yet https://stackoverflow.com/questions/60026651/safari-unexpected-token-expected-an-opening-before-a-methods-paramet . I've been deleting them manually kind of annoying. maybe it would be cool to have some sort template system where you can choose what gets outputted to the JavaScript / typescript file. another option would be to have a "hook", so a script that is run everytime a file is compiled in order to run babel to compile to es5 or webpack. having a compiled webpack'd bundle would be pretty sweet.

Wrong BitmapText default origin

[User reported by email]

When I set bitmap text origin to (0.5, 0.5) in the scene then save and complied scene code.

image

Generated JavaScript code didn't contain "setOrigin(0.5, 0.5)"
This made bitmap text origin incorrect.

image

But if I set bitmap text origin to (0.5001, 0.5) then save and complied scene code.

image

Generated JavaScript code contain "setOrigin(0.5001, 0.5)"

image

So I think editor use origin (0.5, 0.5) as default bitmap text origin.
but in Phaser default bitmap text origin is (0, 0).

Creating phaser shapes trough the editor.

When I'm creating games I create a lot of shapes for example: this.add.rectangle(options);
And I don't found this option of creating shapes in the editor so I've suggested this feature to you. Thanks

Additional Parameters in constructor for prefabs

I'm working with PhaserEditor 1.5.3.20181107 and would like to create a sprite prefab (and a group prefab) but want to be able to pass in extra parameters into my constructor. The generated code only has the default parameters. Essentially I'd like to be able to do what you can do in a state's init user-code but I'd like to be able to also do it in the constructors for all prefabs (if this is possible already please let me know how). I'm working in Typescript rather than javascript

Use Spaces For Indentation

Allowing the user to choose between tabs or (4 or as many specified) spaces for indentation in the generated code may help consistency among projects.

User defined variables in the editor window

(from http://www.bluesaltgames.com developers email)

User defined variables in the editor window – this one is critical. On unity I can create a variable that’s “public” in the code and it’ll show up on the editor for me to alter. This way I can create a prefab with a “life” variable, and create different monsters from that prefab by altering their individual values. This is one of the massively powerful features in Unity and I strongly recommend you to mimic it.

View Atlas

It would be interesting to be able to visualize the Atlases in the editor, since at the moment they cannot be visualized from the editor however in version 2 if you could

Blurry Text

image

I am using Macbook Pro 16", no idea why there is some Blurry Text displayed as above picture.

Error opening Text section in Inspector view

(reported by a client)

I’m having trouble using the scene editor in the new Phaser Editor 2D v3.2.0 to edit the styles applied to a standard text object. Though I can edit the content through the Text Content inspector, the Text inspector does not show up (see attached image). The inspector I’m referring to is shown here: https://help.phasereditor2d.com/v3/scene-editor/text-object.html. As a workaround, editing the associated .scene json file to add text style does work and is rendered appropriately in-editor and in-game.

This can be replicated by:

  • Run v3.2.0’s server on Windows 10 1909
  • Open webapp in Chromium 83.0.4103.97 (This also occurs in Firefox 77.0.1)
  • Create new project from the Basic Javascript template
  • Open Level.scene
  • From right click menu, add new text object

I noticed a few errors in my Javascript console which I pasted here: https://gist.github.com/drfuzzyness/1e2a9d597374b39f5aefbe6043ce5d87

Update: This seems to be caused by the --enable-advanced-js-editor command line flag. Removing this restores the intended functionality.

image

Sprite Prefab Not Passing Arguments To Super

Version

  • Phaser Editor 2D Version: v3.4.0
  • Operating System: Windows 10 x64
  • Web Browser and version: Microsoft Edge 84.0.522.52 (Official build) (64-bit)

Description

When creating a prefab that extends a Sprite object with no texture, instances of this prefab that do have textures and possibly a frame (from multiatlases), the prefab code generated will not pass that frame argument to the super call.

Prefab Sprite Properties

image

Prefab Generated Code

image

Prefab Instance Using Frame

image

Possible solution

Add a texture with frame to the prefab Sprite. This is not desired as the texture used may not be available when an instance is created.

Cannot upload file [Windows 10]

Steps to reproduce:

  1. launch PhaserEditor2D.exe -desktop
  2. create new project
  3. Rich-click on the assets folder and press the Upload Files option of the context menu.
  4. Click on the Browse button and select the image file in your computer.
  5. Press the Upload button.

what expected:
The image is uploaded to the assets folder and shown in the Files view.

what I got:
Alert window: error sending file

Server logs:

2020/05/23 20:13:06 Starting in Desktop mode
2020/05/23 20:13:06 Loading workspace at C:\PhaserEditor2D_V3\workPlace
2020/05/23 20:13:06 Listening at http://127.0.0.1:1959/editor
2020/05/23 20:13:06 Opening browser at http://127.0.0.1:1959/editor
2020/05/23 20:13:19 Upload to project folder: Game/assets
2020/05/23 20:13:19 Copying file C:\Users\name\AppData\Local\Temp\phasereditor-upload-561477607.tmp to C:\PhaserEditor2D_V3\workPlace/Game/assets/planet.png
2020/05/23 20:13:19 rename C:\Users\name\AppData\Local\Temp\phasereditor-upload-561477607.tmp C:\PhaserEditor2D_V3\workPlace/Game/assets/planet.png: The process cannot access the file because it is being used by another process.

How I tried to fixed:

  • turn off all antivirus
  • run cmd in administrator mode
  • change the workplace to c:\PhaserEditor2D_V3 to prevent any problems with path

PhaserEditor2d v3.0.1
GoogleChrome 83.0.4103.61

Option to mark a scene as a preload scene

It would be great if there was a checkbox to mark a scene as "Preload", which will move the generated sprite code over to the specified preload method instead of the create method. Currently, I have to manually write code to display sprites in my preload scene.

Status Bar

A status bar should be a bar at the bottom of the editor that tells you about the things your mouse is hovering over. It might also be useful to show info like the number of files in the editor or memory usage while your mouse is not over anything.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.