PlayCanvas Editor Feedback


#168

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


#169

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:


#170

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:


#171

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:


#172

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.


#173

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.


#174

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!


#175

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 @kartug

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!


#176

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.


#177

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:


#178

Can you add a terrain toolkit for easy terrain editing?


#179

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.


#180

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.?


#181

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.


#182

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


#183

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!

#184

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.


#185

Well, I just realized #3 is the highest priority. It will add much value to PlayCanvas Editor. #1 is the second highest and #2 is “good to have”.


#186

Committing to git/hg from with PlayCanvas has serious complications.

How do you manage merging? Choosing branches? My understanding is that you would basically have to give users full access to the git command line. The git tool has an enormous API surface area, I’m not sure how you would expose this to users without them constantly ending up with invalid repos on our server?


#187

I didn’t have particular UI/UX idea for the git integration. But my initial thought was using command line. I agree with you that git is a complicated concept and it will cause trouble. I hope we find a viable solution in future.

Just one idea is limit git usage and simplify UX. A git helper menu which provides subset of git features (such as clone, add, commit, push, pull, revert, etc… which assumes using the master branch all the time and there are no other users in the repo, etc…) plus command line for full capability. (such as branching and dealing with merge conflicts)