Working on older Projects

I did a search through the forums and it seems like it is not possible to use an older engine in Editor. Though I’m pretty sure many of the older engines are available on GitHub or some other repository. I’d like to confirm that my understanding is correct.

If my understanding is correct, how are people dealing with the need to update older projects? Just load, search out what is broken, and then fix what the new version breaks?

Thanks!

It’s possible to test against (in the launch tab) against an older version https://developer.playcanvas.com/en/user-manual/scripting/custom_engine/

It’s not possible to publish on playcanv.as with an older version though.

If you are self hosting, you can replace the engine file after downloading the zip.

All that said, we do try very hard with an extensive test suite to maintain backwards compatibility and it’s rare for us to have breaking changes.

3 Likes

Thanks @yaustar. Helpful as always.

It is nice to know that a strong effort is made for backward compatibility. But still, things do break. Heck, we just had the Ermis Effect outline plugin break in the middle of development. Fortunately, @Leonidas was on top of it with an alternative. And I suppose we could have used the manual change of engines and launching using an older engine as a workaround if he hadn’t.

1 Like

Yeah, that was one of the rare times that we refactored the layer and camera rendering so it was correct :sweat_smile: which unfortunately broke a couple of projects.

We are looking for better ways to communicate this out to people that are active in development (e.g a preview build).

2 Likes

So, it took a while for @yaustar 's post to fully sink in, but the options he gave actually work out to be a pretty satisfactory situation as long as you are self-hosting.

I just ran through a trial run on an older project. I made a minor change. Noted that the Editor updates were seen in the launched project even though it was using an old engine (1.24.0 in this case).

I then published it. I manually changed out the engine on my local folder by copying six .js files from the original published archive that were in the root directory. (We always save a copy of the project “as published.”) I’m not 100% sure that all six needed to be copied. the files were:

 __game-scripts.js
__loading__.js
 _modules__.js
__start__.js
ammo.dcab07b.js
playcanvas-stable.min.js

I uploaded the folder and the app works fine. In this case, the key compatibility test was the old object outline method which was not changed, but still works on the re-publish.

This will be a little clunky when launching the app while making changes, but that shouldn’t be horribly inconvenient for minor changes/updates. For extensive work, it will probably generally make sense to re-publish with the newest engine.

Sorry, what do you mean by this?

I meant that the effects of the changes I made in Editor would show up in near real time as usual when an alternate engine is not used. For example, if an object was disabled it would disappear. Image material updates showed up, etc. The launched app (launched using an older engine) would interact with changes being made to the app via editor.

Ah yes, that’s to be expected, even when using an old engine :slight_smile:

It would also be possible to use the PlayCanvas REST API to create a small tool/script to download the build, unzip and replace the engine version if this is something you could be doing frequently.