Re-architecture
Opened this issue · 3 comments
On the UI side, create platform-specific interfaces that utilize native widgets. Namely:
- Windows: Windows API aka win32 API (maybe, don't want to leave Windows 7 users behind), Modern API (maybe we could get listed in the Windows store?)
- macOS: Cocoa (?)
- Linux: ???
Rationale: Every platform has its quirks and it may take less effort to use native widgets, where these quirks are implemented for free, than custom widgets where we have to do everything
The frontend will now consist of two "backends": A library backend (which will provide data in the optimal format for each platform) and an emulator backend (which will handle making instances of the backend process, see #314 for more details)
Frontends
Note: % of userbase provided by Steam hardware survey, using November 2016 numbers
Windows
UWP API (aka Modern/Metro/Windows Runtime/WinRT)
Covers 48.37% of the userbase
Only the latest Windows 10 is supported by this API
Documentation: https://developer.microsoft.com/en-us/windows/apps/develop
Samples
Grid/listview sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlListView/cs
Even better example: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlUIBasics/cs/AppUIBasics
Notes
- Sandboxing the emulator in a separate process means we're not eligible to submit the app to the app store...
- Extensive documentation on design available here
- An example of a large number of grid entries can be found in the Windows Store app. Scrolling very quickly has some hiccups and lag. Might have to look into this further
- https://msdn.microsoft.com/en-us/windows/uwp/debug-test-perf/optimize-gridview-and-listview
- TL;DW: Use inremental updating
- Use
Extended
SelectionMode
when using the mouse,Multiple
when using touch
- https://msdn.microsoft.com/en-us/windows/uwp/debug-test-perf/optimize-gridview-and-listview
- Input
- No DirectInput? Mapping DirectInput devices to XInput is common in the PC gaming community, so not a huge loss. According to KI's creative director, as of 8 months ago, DirectInput should be coming in a future Windows 10 update.
- Use of
Windows.Gaming.Input
strongly recommended over XInput, latency much lower apparently - We automatically get controller support for navigating the UI. Details here.
Windows API (aka WinAPI/Win32)
Covers 47.03% of the userbase
Currently no plans to create a frontend for Windows Vista/7/8/8.1. PRs welcome!
UI
- Widget browser/dev tool
- https://msdn.microsoft.com/en-us/library/windows/desktop/bb773165(v=vs.85).aspx
- Download link is broken, mirror needed
- https://msdn.microsoft.com/en-us/library/windows/desktop/bb773165(v=vs.85).aspx
- List view
- Theming
macOS
Covers 3.59% of the userbase
Linux
Covers 0.88% of the userbase
Backends
(reserved)
Alternate multi-platform frontends
https://nwjs.io/
- In the desktop world most of the UI/UX work goes towards web technologies. Using this gives us a huge body of libraries to utilize