PlayCanvas Editor Feedback

@max thank you ! :smile:
i told him your answer.

well, we hopes that it will be able to control all resources version someday.
sometimes my friend’s works become not to be publishable.
it’s hard to find the cause, he rollback previous version manually now.
so he works on his other project, then he works same step on team project.

Working in branched environment, where people can work collaboratively on different branches, and merge back to master - is the idea we do entertain, it will be implemented one day :slight_smile:

2 Likes

Hi! First of all this is my first post and I’m excited with PlayCanvas. I’d say the environment is very nicely flexible. :smile:

Just want to request for Esoteric Software’s Spine component feature (which I believe already asked half a year ago).
They have provided the generic runtime for JavaScript here.

I really need the FFD and the image swapping for 2D animation, and of course the 2D skeletal animation. The asset data size is also small as well so it’s great in every way.

Someone has posted a sample video (youtube.com/watch?v=V2ZehUVMbRs) of what can be achieved from the tool (it doesn’t show what can be done with the character on the right, but also please have a look on the scarf on how important that image swapping is), and I think this is a good feature to think over.

Also is there a way for script components being combined and minified into one JS file on publish/download? cause I believe, if I have tons of script components being separately loaded, it is prone to error; tons of request/response (gives room to fail), and not to mention the scripts are not minified. Failing 1 script is definitely not good, but I’d rather have 1 or 2 huge scripts to load once or fail at all, so it’s controllable. I want to combine the codes myself but I know it is impossible as PlayCanvas essentially load the scripts individually.

I understand if separating the codes is meant for debugging, but not on production files. It’s not only for not being easily read by anyone, but to make the files more compact; lesser size and lesser network request/response.
See here for screenshot reference.

Cheers!

Hi!

Yes, we were thinking of adding native support for Spine atlas and animation formats. It indeed will be a good step towards 2d animations. This will come some time in the future, although can’t give any dates.

As of native support, we would think seriously of utilising GPU acceleration for skinning of meshes, and supporting as many of spine features it provides.

Good question. We are currently challenging the script boilerplate, and system as a whole, there are many problems with it:

  1. Live code hot-swap
  2. It is not failure tolerant
  3. No concatenation possible
  4. Single script per single file, leads to many requests
  5. Boilerplate could be simpler and more vanilla to JS
  6. They are not assets, but special thingy in engine and tools
  7. Minification and obfuscation for published builds to protect codebase

So based on this not even full list of cons of current system, we are thinking about improving scripts system, so it would solve all those problems and more.
This is major roadmap point, that will land in engine and tools in upcoming months.

Cheers,
Max

GPU acceleration sounds amazing to me already. Looking forward to it. :smiley:
Meanwhile I can stay with standard 2D texture animation for awhile, which is easier and currently possible.

As for the script issue, I can understand if it’s an architectural issue (if I’m not wrong). So just want to share on what I’m planning to accommodate this, if this hopefully helps others too:

Provide own codebase and combine it to one big script (say game.min.js), put it to script priorities, have the Script Component to return the related class, and finally make the script components solely act as bridge for the designers by providing script attributes only (See example below).

I’m pretty sure this is good with External repo cause I myself not planning to keep copy pasting game.min.js for sure (since sadly direct URL import is no longer available), and I’d rather keep the Live scripting as quick prototyping only. When it’s frozen, I move everything to my game.min.js.

// Stats.js file implementation class that will be compiled into game.min.js which is then put to script priority.
// This file is in different codebase as if this is a library, since PlayCanvas should only take game.min.js.
Game.Stats = function(app)
{
    var Stats = function() {}
    ...
    return Stats;
}

...

// Stats.js script component file. It only acts as a bridge to Editor instead of code implementation.
// The script simply returns the class that is implemented in game.js from script priority.
pc.script.attribute("name", string, "Player");
pc.script.attribute("strength", number, 100);
pc.script.attribute("defense", number, 100);

pc.script.create('Stats', function (app) { return Game.Stats(app); });

Hope this helps!

Thank you for the replies and looking forward for the updates. :smile:

Approach with single file externally doesn’t seem like would solve almost any problems, except single minified file code.
It wont improve loading speed, as it is more related to latency and multiple requests to different script files.
Nor it will improve coding workflow.

Although if it is suitable for your case, then good that there is a ways to find suitable approaches :slight_smile:

I guess you’re right max. My situation is just I have some codes outside PlayCanvas, and it is pretty much like adding playcanvas-stable.min.js in the html header, you could say like a DLL file, but I haven’t see any choice but to pack them all up to script priorities (maybe I’m missing something).
Since I can do the same to the gameplay codes (I assume they’re the script components), so I’d rather pack them too, because External repo scripts are read-only anyway in live script editor.
Probably this is because I haven’t got along with PlayCanvas really well yet. :laughing:

There are some workflow challenges we still have to solve indeed.
If IDE gets to really-neat state, benefiting writing code in there by providing better integration and debugging features with playcanvas, replacing in files, exception links to code directly to line, just between files, search through reference and more.
And once we done new scripts workflow.
I hope then you and some other users wont have need to look for any other ways of doing things, as it will just be obviously neat and friendly.

1 Like

Hi guys, here’s another feedback so far with PlayCanvas. :smile:

Editor related

  • Is there a way to sync external repo right on the asset window? so I don’t need to refresh the whole editor.
  • Need single asset adder on script attribute, instead of multiple. Just consistency issue to avoid confusion, where the designer think that it is possible to add more assets when it actually has no effect.
  • Need timeline editor. Very good for cut scenes. This is similar to Flash global timeline, and that one is enough.
  • Bug: Unable to drag and drop multiple entities to another order/entity. I can multi-select them using CTRL, but only one that is moved. Not sure if the CTRL button do such function.
  • How to make script attribute to affect one another? What I mean is, if I put a value to an attribute, the other attribute will react to it. For example, I have an attribute to contain a JSON file that has multiple animation data. And the next attribute should be choosing an initial animation to display based by key/ID on that JSON file. It is not possible to pick an initial animation without first having a custom JSON asset. I’d love to pass the result to the next script attribute with enumeration type.

Web related

  • Really need Play/Launch button on my own project menu. I frequently test my project in mobile devices and do not wish to get through Editor first to press Launch.
  • Web documentation need an update. I can’t find any material opacityMapChannel when I needed it until I checked that it exists within the engine I got from PlayCanvas github.

Engine related

  • Is there a convenient method like material.setAllOffset(x, y) to set all of the map’s offset? like in Editor.

Cheers.

Two annoying things regarding the viewport camera:

  • When orbiting the camera slowly, and you get close to the left or right view, the camera starts panning instead. If you then move the mouse fast, the camera snaps out of it and starts orbiting again. I can’t see why this would be useful, since you barely have any control over where the camera ends up when it decides to start panning. Plus, you have a dedicated button for panning already, and it behaves way more predictively.
  • When dollying in, the camera can move beyond the pivot point (which is fine). However, when you try to orbit the camera, the pivot stays at its original position, meaning that you start orbiting a point that’s behind the camera. I don’t know if this is a feature, but almost all other 3d applications handle this by moving the pivot point with the camera, if the distance between them is less or equal to 0.

Thanks!

Hi @alectora, thanks for feedback!

Unfortunately not atm. There will be changes later on on that.

Yeah, I didn’t liked it too :slight_smile: Add max: 1 option to attribute.

We were talking about something like that. But there are so many different use cases and different applications for timeline concept, that it is very hard to get with consistent idea that would solve most of cases. And it is pretty narrow used feature as well.

Indeed, multi-selected drag’n’drop of entities not working. We will look into that.

This sounds like extending logic of an editor. Currently it is not possible. Editor Plugin API is something we are working on. And it will allow people to create their extensions to implement such things.

We are thinking to Add Devices feature, that would allow from desktop hit “Play on Device”, where you select your device, and it will open that game on device.
Currently you can just share url, or add /launch to end of editor url on mobile.

We constantly working on improving documentation, and if you find something like that, feel free to make a PR to our Open Source engine. Our documentation is auto-generated from jsdoc of an engine sources. Docs for it would be somewhere here.

No, but here you go, add this to separate js file and include in Script Priority. It will extend PhongMaterial class adding two methods:

var maps = [ 'diffuse', 'specular', 'emissive', 'normal', 'metalness', 'gloss', 'opacity', 'height', 'ao', 'light' ];

pc.PhongMaterial.prototype.setOffsets = function(x, y) {
    if (x instanceof pc.Vec2) {
        y = x.y;
        x = x.x;
    }
    for(var i = 0; i < maps.length; i++)
        this[maps[i] + 'MapOffset'].set(x, y);
};

pc.PhongMaterial.prototype.setTilings = function(x, y) {
    if (x instanceof pc.Vec2) {
        y = x.y;
        x = x.x;
    }
    
    for(var i = 0; i < maps.length; i++)
        this[maps[i] + 'MapTiling'].set(x, y);
};

Then in your code, just do:

material.setOffsets(0, .5);
material.update();

Or:

material.setOffsets(vec);
material.update();

Hi @Sidelity

That is a bug actually. I’ve noticed it as well, just never had time to fix it, as it is very tiny, affecting only when you orbit very slowly.

We can make sure pivot point is never behind camera, indeed.

Thanks for feedback!

1 Like

Is there a way to add tags and a label to the entity right from the level editor. There are methods in the API scene.findByTag and findByLabel, but we are able to add just a name to the entity. It’s necessary to have an ability to add tags and a label as well.

Not yet, I’m afraid. We intend to add the same tagging that exists for Assets in the Editor to entities. This will involve deprecating pc.Entity#findByLabel and adding a tags property (pc.Tags). It’s on our TODO list. :smiley:

Can you add a terrain toolkit for easy terrain editing?

Currently you can use many third-party tools for this, they do a great job for making great terrain.
It is very niche and not really requested feature by our users, and trying to compete with great tools out there - will be a bit waste of resources.

So feel free to use any third-party tools for terrain creation.

Hello, since u have added the built-in script for the camera, wouldn’t be nice to have something similar for particle system? as rain, snow etc.?

Camera Built-in scripts were there for ages.
We could add some presets for particles indeed.

It would be even better to be able to preview particles right from the editor.

Well to be able to see it from editor is not essential also if it would be helpful, but a preset would definitely be nice

1 Like

Three “good to have” features

  1. Please add an ability to use arbitrary binary files as assets. It’s OK to put a pre-defined file extension like “.bin”.
  2. If possible, please display visual graphs in the profiler for frame rate, render time, update time and physics time.
  3. Please make it possible to commit/push to github from the editor. I synced my Github repository once but it disabled editing code in the editor. I wondered for a while and decided to keep using PlayCanvas editor, since it’s very strong! Let me enjoy PlayCanvas editor’s cloud based productivity while using Github for safety!
1 Like

It would be fantastic if there was a small dial that allowed you to scroll between float values on the components, instead of having to input numbers.

1 Like