More documentation/tutorials for engine-only users

Hello people of PlayCanvas!

My name is Nigh7Sh4de and I am an undergraduate student in Computer Science and have a growing fascination for creaitng video games. Since JavaScript is probably one of my all time favourite languages PlayCanvas, being an entirely JavaScript game development engine, is something truly amazing. The fact that I can just link to a single .js file and be able to start coding games in my editor is awesome. The only problem is that the vast majority of literature and help that is available for PlayCanvas is based on using the Designer. Through my (admidatedly) short time experimenting with PlayCanvas (just the engine) I have run into countless headache-inducing and frustrating little things that I have to (not so painfully) do in order to work around the fact I’m not using the designer. The biggest problem by far with this is that except for posting my question on every single time I want to do something I haven’t tried before there is absolutely no material for me to look at and study to try and figure it out on my own. Please please please create a documentation or in the tutorials add little asides for how to use just the engine as that would be extremely helpful.

Thanks for your time :smiley:

1 Like

Welcome to the community. I’m new myself and in the process of understanding PlayCanvas Design Editor, and Engine. With that said, may I make the following recommendations for your consideration:

PlayCanvas Developer Resources

From there you will find links for the source code on GitHub:

The has instructions (brief) how to setup for a local run. Assuming that you use the engine locally, you may find some useful coding tips in the API Reference:

Let me know if you need additional help.

Btw, if you scroll down to the ARTICLES section on the link below, you’ll find numerous tutorials that are worth the read:

I can get the engine working its adding stuff like touch controls for example (you have to add them to your application context, a fact that is not documented anywhere as far I can see) and other things like this.

For example a page like:

But with more information than the sole topic of loading 3D models.

Do you have something specific that you need help with? I probably can’t help with touch controls (at least not yet) but I may be able to help with loading models.

Actually touch controls I have already figured out as well as other things that required weird undocumented work arounds like skyboxes and script attributes.

My concern is that figuring this stuff out was difficult and anyone in the future who wants to use only the engine will have to go through the same process and may get discouraged.

We’d love to have more examples for engine only users. Sounds like touch/input controls is one that we should add.

Please post more requests, we’ll try to get some more done. Though of course, if you wanted to add an example and send it in as a pull request that would be amazing! :wink:

I have actually been working on creating basic examples of various engine features on a Github repo (primarily for the purpose of teaching myself them…) I would be more than happy to have those shared among other JS enthusiasts so that they may be able to start working with the engine more quickly rather than learning it :smiley:

PS most of the code there is quick chicken-scratch code that I just wanted to type out as fast as I could so I could get the concept and move on


Hey Dave and others,

For example this is my question waiting for answer. One answer was already provided but unfortunately, it didn’t solve the problem:

Providing better feedback, engine from inside look is very well commented. I felt very happy with these comments from the start. But soon enough I was missing the larger concept. I didn’t find any component preview. For example diagram, series of diagrams in presentation, or video would be really helpful.

“To be really specific I didn’t understand mesh and meshInstance concept at all. I wasnt able to recognize which from them is responsible for what. Names of these components are confusing. I couldnt find shader storage. Then I recognized it is part of material, but it took a while. Im still a bit lost with renderer part and its connection to scene. I didnt notice scene is not a graphNode, which I consider as super important. This messed with all my knowledge about scene from before. I didnt know each model has only one arraybuffer in very deep part. It was a long journey to understand graphic device, since graphic device is part of every second/third call, Im still not sure if placanvas can handle 2 graphic devices at once and share resources between or not.”

I could have ask every question on the forum, Will is, indeed, very active. But problem is one answer bring another question. One needs to go step by step. It is better to be able to find answers on your own, since questioning takes a lot of time. But finding answers must be reasonably fast then.

Major problems of your engine
Few components are tight coupled. So far as I know it is Scene, Forwardrenderer (render) and Mesh (system of meshes). These components are not extendable for me, extend one => extend more of them => extend 1/2 of engine. I’m lack of mediator (signals) pattern. (It is similar to observer.)
There is no visible graph, tutorial or walkthru thru components. If programmer jumps into documentation, picking components by name and with 6th sense is very bad idea right now. You get lost, for sure and you won’t find the way out.
The last thing I notice is a lot of things are just badly wrapped webgl, arraybuffer, typed arrays or others API. Imagine you are a guy who already knows all of them. Since these API are already compacted to minimum, it is not possible to compact them more. Then that guy must remember twice as much constants as before + remember connections between them. It is like implement multiplexer/demultiplexer in your head. Something must be done with this, I don’t know correct solution, personally I would remove it.

The biggest advantage of playcanvas is, use something it already knows for example display model, is super easy.
The biggest disadvantage of playcanvas is, teach it something it doesn’t know is nearly impossible or at least very long run.

Last words
This was a feedback about things that doesnt work for me. Ofc there are thousands of things that are awesome like community, way you speak to us, events, engine is small and compact, overall design and a lot more… So yes I still love you, you do great job and I hope my feedback will be helpful.

1 Like

FWIW, I’m just digging in now, since I’m planning on using Playcanvas for teaching. I’d like to have students use BOTH the engine (for architecture discussions and small assignments, aimed at understanding how engines work) and the Playcanvas editor (for bigger assignments and group projects).

What would be most useful to me (as someone who’s just spent a bit of time poking around) is much more of an overview doc discussing how all the classes fit together, what the programming model and assumptions are about how programs work, etc.

I’d also love to see a tutorial that shows “here’s a relatively complex Playcanvas editor project, here’s the exact same project in the engine”, as a way of explaining the mapping between the two – since most of the docs are (reasonably) for the Editor, having a strong understanding of how the two fully relate makes it (easier) to take Editor docs and know what it might correspond to in the Engine.

The Editor is basically a data Editor. There’s a little boilerplate but ultimately you can take the same code that is written in the Editor and use it in an Engine only project.

Some developers use the Editor to create those data files (materials, scenes etc) and download/export it to use in their engine only project.

You could take a build export of a project to see how it is all set up (it’s pretty readable) and there’s also all the engine only examples here:

Once the build export is exported, it is effectively an engine only project. You can change the assets, code etc without needing the editor

What is your engine called imma try it out