playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.33k stars 1.32k forks source link

Engine 2.0.0 (Root ticket) #6666

Open mvaligursky opened 1 month ago

mvaligursky commented 1 month ago

Overview

This is the main ticket to communicate the plan and major changes for Engine 2.0.0.

Over the years, the engine has introduced many new features and deprecated several obsolete ones, often maintaining them to avoid disrupting existing projects. This maintenance carries a significant cost and slows down the development of new features, as time and resources are diverted to supporting deprecated functionality.

The plan

The plan is to release Engine 2.0.0 (V2), where we will address and remove multiple deprecated features. While many of these changes are breaking, there's no need to worry. Teams that depend on these features can continue using Engine V1, which will remain available. Both Engine V1 and V2 will be supported by the Editor, and by default, your projects will stay on V1 unless you choose to switch to V2 after confirming compatibility. The Editor will maintain backwards compatibility with Engine V1 for as long as necessary.

What do these engine versions mean?

V2 changes

Major confirmed changes in V2:

Changes that were discussed but are NOT changing in V2:

Changes that are still being discussed:

New major features in development for V2 only:

marklundin commented 1 month ago

6666 ticket of the beast 🤘

yaustar commented 1 month ago

A bit surprised with the following:

  • model component - this is staying for a long time as it is used by many projects
  • animation component - this is staying as it's still popular and widely used, even though the new anim component is more powerful
  • json mesh format - keeping it, but will likely start deprecating it in the future

This is probably the best time to remove these with a clean break and like WebGL1, those users can continue with v1.

mvaligursky commented 1 month ago

This is probably the best time to remove these with a clean break and like WebGL1, those users can continue with v1.

There is so many projects using these, that removing them would force people with existing projects to stay on v1 for ever (or invest a lot of time moving to newer components), which is not ideal for the users (they want new tech), and also for us (we want most people to move to v2 and eventually when v1 is no longer needed, have a chance to remove it without much pain).

albertvanveen commented 1 month ago

I agree with @yaustar. This will be the perfect moment to remove old components.

Especially new users don't know the difference between old and new components and the confusion will continue. The risk of users starting new projects with old components also remains, perhaps because they are easier to use in some ways.

If users want to use the new features they need to take some effort to make their projects future proof.

Maksims commented 1 month ago

If there is a switch to a new system, removing model and animation components would be beneficial to engine indeed. Although there is a big difference when working with animation. Old system is way easier, and there are a few things that you can't do easily with a new system, e.g. changing animation speed per node or for a whole component. There should be at least a feature parity and preferably decent QoL improvements in Editor and code features for making users to switch.

Also, worth mentioning that now there are three scripting systems:

Creating a project in Editor, by default would still recommend engine v1 with scripts 2.0. But if users use engine v2, then it would be beneficial to default to ESM scripts.

Through history, playcanvas engine never broke or forced changes, and provided backwards compatibility while introduced new alternative/better systems. This will be a new shift in the way things are done, and will lead to some docs, api, github, codebases and other segragations. Hopefully through better QoL of new systems and nice gradual migrations devs can more to v2 sooner than later.

mvaligursky commented 1 month ago

Creating a project in Editor, by default would still recommend engine v1 with scripts 2.0. But if users use engine v2, then it would be beneficial to default to ESM scripts.

Yep exactly our plan, but we'll see how we go as we discuss it more.

mvaligursky commented 1 month ago

The risk of users starting new projects with old components also remains

Yep, we'll definitely look at hiding some of the older tech in the Editor for newly created projects, as have in the past, but details are unclear at this stage.

SashaRX commented 1 month ago

I find the model component to be extremely convenient for props models. It provides a more streamlined appearance and takes up less space in the editor, making it easier to manage and organize assets.

heretique commented 4 weeks ago

Nice, looking forward for v2 🚀 One other change I would like to suggest is the refactor of the Texture API. There's an issue discussing that #4290.

SashaRX commented 4 weeks ago

What are the plans for the materials system, will there be master/instance materials?

mvaligursky commented 4 weeks ago

Nice, looking forward for v2 🚀 One other change I would like to suggest is the refactor of the Texture API. There's an issue discussing that #4290.

I think / hope we can do that one without breaking the API (perhaps by adding the API). We really want to avoid breaking too many APIs as that would make it harder for people to move larger projects to V2. But definitely on a TODO list.

mvaligursky commented 4 weeks ago

What are the plans for the materials system, will there be master/instance materials?

There are no plans for this. We're still considering changing the API of the StandardMaterial, to simplify it a bit, a lots of changes under the hood in a way the shader then gets generated, but nothing regarding to what you suggest, even though I do see a value here. Please open a separate issue for it, it could be a good discussion.

cognitiveplus commented 1 week ago

This is probably the best time to remove these with a clean break and like WebGL1, those users can continue with v1.

Still using Model and Animation exclusively since Anim state machines are too overkill to set up for simple loop animations, and Render components don't work will old Animation components. I wish Anim would act / appear as an old Animation by default and then user could opt in to add extra states and complexity to it if needed.

cognitiveplus commented 1 week ago

Overall happy with the plan, can't wait for finalized HDR pipeline and render passes! And WebGPU compute shaders are going to open so many new possibilities. Would also vouch for better shadowing techniques (i.e. shadows become softer with distance from the occluder) and built-in standard postprocess passes (AO, DoF, TSAA, HDR + tonemapping, color grading, vignette, etc)

renegadels commented 1 week ago

There is so many projects using these, that removing them would force people with existing projects to stay on v1 for ever (or invest a lot of time moving to newer components), which is not ideal for the users (they want new tech), and also for us (we want most people to move to v2 and eventually when v1 is no longer needed, have a chance to remove it without much pain).

Just adding my thoughts on this, particularly on the model component - I definitely agree with the above, having access to these components would allow us to migrate otherwise compatible projects to V2 without issue, since otherwise migration would be a very large task and would more than likely need a large development spend, for example on projects such as ones with lots of models utilizing vehicle physics using model components.

Perhaps it would be possible to hide these for users unless they want to specifically access them, so that new users don't use these to create projects, but older projects can still access them in V2, at least initially?

The rest of the plan seems great and I wish the team the best for the continued development of V2, can't wait to try it out.