AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 290 forks source link

Console Window Option in the View Menu #725

Open ghost opened 5 years ago

ghost commented 5 years ago

Summary

Currently, the text console pops up for relevant events, such as beginning a debug session. It would be a nice-to-have to be able to nest the terminal into the main window of the application.

Analysis

Attachments

ilexp commented 5 years ago

Added a few tags to the issue.

I think I'm getting the gist of it, but just to be clear: You are talking about adding a core-supported / builtin, optional console area to the engine that displays log messages in a similar way the Windows cmd prompt does when running the launcher in debug mode. Correct?

The View menu's mechanic (clicking a feature in the menu will nest it or remove it from the main window) is designed in such a way that the feature could be implemented with minimally invasive code.

This is editor code though, which uses WinForms UI and is an entirely different thing from anything we can easily render or do UI wise on the core side. It's still doable though, and shouldn't be that hard when using regular Canvas rendering.

A few more open questions, some with potential answers, but I would be interested in everyone's opinion:

  1. Should this be implemented in launcher or core? Probably the core, so it's available under all environments and even when people write custom launchers, or embed Duality inside other applications.
  2. Should this be implemented as a Component, or builtin system? Not sure - slightly in favor of the builtin system for being independent of scene contents or even multi-scene setups. Either way, it should be implemented in a way that the same implementation could be provided by a user plugin.
  3. Should this be core or plugin functionality? Slightly leaning towards plugin functionality, but a plugin that is installed by default. Allows users to replace it with their own or remove it entirely if they want.
  4. Should the console allow entering ingame script commands or similar? Maybe? This is out of scope of this issue though, so the answer would be no for now, and future work deferred to a separate issue.
  5. How important is this? Given the existence of the editor sandbox, this does sound a bit nice2have, but would be interested to hear other perspectives.