stride icon indicating copy to clipboard operation
stride copied to clipboard

Cross-platform editor rewrite - prototype

Open Kryptos-FR opened this issue 1 year ago • 7 comments

PR Details

This PR contains the initial work on a new cross-platform editor using Avalonia for the UI framework.

Description

In order to keep the changes separate from the existing editor libraries, a new folder sources/xplat-editor has been created. In this folder, there are a bunch of new projects, some which have the same naming of existing ones. The idea is that at some point, it should be possible to replace the old projects with the new ones, adapt the existing WPF code and have two versions of the editor (one implemented with WPF, the other with Avalonia) that we can compare to ensure we have all the features ported from the old one to the new one.

Related issues

  • #8
  • #360
  • #570
  • #1120

Feature highlights

Attributes and types registration

See documentation page

Services

See documentation page

Architectural changes

You will notice that the number of projects have greatly increased. But no panic, some are just duplicates while we work on the new editor. There are few new projects that will stay though. Those are directly related to Avalonia, and they have Avalonia in their name (e.g. Stride.Core.Assets.Editor.Avalonia. The reason is simple: such projects have a direct dependency with Avalonia and implements the UI/UX part of the editor, while those without that name are UI-agnostic and only have a dependency on the MVVM pattern. In other words, the latter could be reused with other MVVM-supporting UI libraries such as WPF, MAUI or any other that could come in the future (including, why not, our own Stride-implemented UI).

On top of that, some classes (esp. view models) that were previously implemented in Stride.Core.Assets.Editor are now relocated in more editor-agnostic libraries (such as Stride.Core.Assets.Presentation or Stride.Assets.Presentation. Again, the idea is that such libraries could be reused for more simple type of apps (such as viewers for instance) that don't require the full-fledged editing capabilities but just need a MVVM version of the Core or the Stride assets.

Motivation and Context

Why not?

Just kidding. There have been numerous wishes over the years to have an editor working on other platforms than Windows. There is also a need to have a fully-fledged plugin system, and in order to achieve that similar changes to the one allowing cross-platform experience are needed. Hence, this project aims to achieve both.

Types of changes

  • [x] Docs change / refactoring / dependency upgrade
    • There is a README per project, which surely counts as a doc change.
    • There will be a need to write or rewrite a lot of docs, once we have reached a stable point.
  • [x] Bug fix (non-breaking change which fixes an issue)
    • While reworking how the different editor libraries interact with each others, some bugs are likely fixed (but hard to know which ones).
  • [x] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)
    • Likely some breaking changes in the way the editor libraries are working. However, the runtime libraries should be untouched for the most part.

Checklist

  • [x] My change requires a change to the documentation.
  • [ ] I have added tests to cover my changes.
    • Nope 😁.
  • [ ] All new and existing tests passed.
    • No idea. Not the point of this PR.
  • [x] I have built and run the editor to try this change out.
    • The new one that is 😉.

Kryptos-FR avatar Nov 13 '23 13:11 Kryptos-FR

Ping me when this is merged. I am really looking for a C# linux friendly game engine

Shadowblitz16 avatar May 02 '24 00:05 Shadowblitz16

Ping me when this is merged. I am really looking for a C# linux friendly game engine

u can just subscribe this pr

Yushu2606 avatar May 02 '24 00:05 Yushu2606

Ping me when this is merged. I am really looking for a C# linux friendly game engine

u can just subscribe this pr

I think I am automaticly subscribed to a bunch of pr's and idk how to fix it.

Shadowblitz16 avatar May 02 '24 06:05 Shadowblitz16

@Shadowblitz16 @Yuisyuu We're glad you guys are interested but please keep the conversation on topic :)

Eideren avatar May 02 '24 15:05 Eideren

@Kryptos-FR Any updates on how this is going so far?

MetalMaxMX avatar Jul 18 '24 02:07 MetalMaxMX

@MetalMaxMX I'll finally be able to resume working on it. My workplace accepted a reduced schedule where I will have full days (unpaid) to work on something else. I plan to use some of that time to continue the port.

Kryptos-FR avatar Jul 18 '24 19:07 Kryptos-FR

@MetalMaxMX I'll finally be able to resume working on it. My workplace accepted a reduce schedule where I will have full days (unpaid) to work on something else. I tend to use some of that time to continue the port.

Awesome! Good luck and fingers crossed for an eventual Cross-platform editor :)

MetalMaxMX avatar Jul 19 '24 00:07 MetalMaxMX