Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EPIC] Editor #112

Closed
softwareantics opened this issue Jan 29, 2022 · 0 comments · Fixed by #231
Closed

[EPIC] Editor #112

softwareantics opened this issue Jan 29, 2022 · 0 comments · Fixed by #231
Assignees

Comments

@softwareantics
Copy link
Owner

softwareantics commented Jan 29, 2022

Description

Although Final Engine is not ready for a fully featured editor it's been over 3 years in the making and I think it's about time I create something to show for it. I don't expect to design something perfect but I think something with the following features will be enough for now:

  • Project Management (create, save and open projects)
  • Scene Management (create, save and open scenes)
  • Projects should have an associated solution and C# project that is linked to the game. Editor errors relating to the built solution should appear in the editors console.
  • A scene editor that has the ability to edit entities via a properties tool window.
  • Editable scene properties such as changing the rendering API, clear color, etc.
  • Entity systems should have the ability to change their order of execution per game loop type (update, render, networking etc)
  • Editor should have the ability to have its layout of tool windows saved via the main menu.
    • There should be some sort of options window similar to VS that allows the user to let the window layout as it was before closing the application be the same layout when it's opened again.

The Why

Final Engine will require an editor in the somewhat near future.

The How

Technologies

I believe the editor should be created using WPF for the following reasons:

  • Widely used
  • Data Binding support
  • Supports .NET 7 and is being actively maintained
  • Easy to setup MVVM which allows for testable and maintainable UI logic.
  • Moving over to a cross-platform solution such as MAUI wouldn't be much work (in comparison to switchign from WinForms to WPF).

Further more, when it comes to rendering OpenGL within a WPF application we can use GLWpfControl as the events issue has been fixed since I last started prototyping.

Architecture

I believe MVVM would be the best route to go for the reasons mentioned above as well as the fact that XAML and MVVM will allow for easier integration when (and if) the UI is updated to .NET MAUI. Furthermore, MVVM allows for a (somewhat) strict design pattern which in turn will result in better code design and maintainability.

Organization

I believe three main projects should be setup in order to maintain good quality and organized code:

  • FinalEngine.Editor.Desktop
    • Contains the views and other WPF/XAML specific logic. This is the applications executable.
  • FinalEngine.Editor.ViewModels
    • Contains the ViewModels and handles any UI centric logic; also contains service interfaces that are required to be implemented in the desktop project.
  • FinalEngine.Editor.Common
    • Contains any interfaces and services that are required by the ViewModels project but can be used elsewhere. For example, an IApplicationContext that contains information pertaining to the application. This interface could be used by both the view models and desktop application.

Keep in mind, the desktop application should never be referenced by the view models or common project. ever.

The Associated C# Solution

See here and here for a start.

Requirements

Tool Windows

Project Explorer

The project explorer tool window will be responsible for showing all resources that are contained within the currently loaded project. These resources can include, but are not limited too:

  • Prefabs
  • Shaders
  • Textures
  • Audio Files
  • Scenes

The project explorer will have the ability to navigate through the projects folders, create, delete, rename, etc all available resources and folders within the currently loaded project. It should also watch for files that are added via the File Explorer, if a file is added to the projects folder via the File Explorer the project explorer should refresh it's contents.

Scene hierarchy

🚧🚧🚧

Entity Systems

🚧🚧🚧

Console

🚧🚧🚧

Properties

🚧🚧🚧

Document Views

Scene View

🚧🚧🚧

Plugin Architecture

I think it's super important that users can provide plugins that add extra functionality to the editor. These plugins can likely be provided via NuGet packages and should not require a restart of the main application. This way, once the core editor functionality has been implemented all that remains is creating and maintaining the plugins. Some examples of the plugins can be:

  • 2D tile map editing
  • Importing levels/maps from other tools (such as Tiled)
  • etc
@softwareantics softwareantics added this to the editor milestone Feb 8, 2022
@softwareantics softwareantics self-assigned this Feb 8, 2022
@softwareantics softwareantics closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2022
@softwareantics softwareantics pinned this issue Mar 14, 2023
@softwareantics softwareantics changed the title [FEATURE REQUEST] Editor [EPIC] Editor Mar 23, 2023
@softwareantics softwareantics modified the milestones: editor, Final Engine (First Release) Mar 23, 2023
@softwareantics softwareantics unpinned this issue Jun 27, 2023
@softwareantics softwareantics reopened this Aug 1, 2023
@softwareantics softwareantics linked a pull request Aug 11, 2023 that will close this issue
@softwareantics softwareantics closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant