<!-- Keep the title short & concise so anyone non-technical can
understand it,
the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
This adds an experimental, new 3D mapper that uses shaders, more modern
openGL, and a far better code reorganization that makes it an easier
foundation to build upon.
The new 3D mapper is here side by side with the original and can be
toggled on for experimentation. There's a lot of work to be done, so I'd
rather merge it early instead of making a mega-PR.
#### Motivation for adding to Mudlet
So we have a new foundation to build upon and improve.
#### Other info (issues closed, discussion etc)
Old and new mapper can be toggled dynamically with:
```lua
-- this can be a keybinding
setConfig("experiment.3dmap.modernmapper", not getConfig("experiment.3dmap.modernmapper"))
```
Smooth movement is one experiment in the new mapper, and it can be
enabled with:
```lua
lua setConfig("experiment.rendering.smooth-camera", true)
```
As you notice an experiments system has been added so we can implement
things at once and experiment to choose the one that works best. This
system can be used in other places in Mudlet as well.
<details><summary>Details</summary>
<p>
## Experiments System
### Overview
Allows enabling/disabling experimental features via
`setConfig`/`getConfig` with validation against a predefined
whitelist.
### Usage
```lua
-- Enable experiment
setConfig("experiment.rendering.more-transparent", true)
-- Check if enabled
local enabled = getConfig("experiment.rendering.more-transparent") --
returns true/false
-- Get active experiment in group
local active = getConfig("experiment.rendering.active") -- returns
"more-transparent"
-- List all valid experiments
local experiments = getConfig("experiment.list") -- returns table of
valid keys
```
### Behavior
- Grouped experiments: Mutually exclusive (enabling one disables others in same group)
- Validation: Only predefined experiments allowed, invalid keys return errors
- Persistence: Experiment states saved/loaded with profiles
### Adding New Experiments
Edit Host::mValidExperiments in src/Host.cpp:
```cpp
const QSet<QString> Host::mValidExperiments = {
qsl("experiment.rendering.originalish"),
qsl("experiment.rendering.more-transparent"),
qsl("experiment.newfeature.option1"), // Add here
};
```
### Current Experiments
- experiment.rendering.originalish
- experiment.rendering.more-transparent
</p>
</details>
---------
Co-authored-by: Vadim Peretokin <vadi2@users.noreply.github.com>
* Enhance: enable builds in a full Windows MSYS2 environment (QMake only)
By defining `WITH_MAIN_BUILD_SYSTEM` to the value `NO` this PR makes enough
changes to the qmake project file to enable Mudlet to be compiled in a full
MSYS2 development environment (in the MSYS2 Qt Creator) - this will enable
easier development by Windows users (particularly those who also have some
familiarity with *nix systems) as I have documented at:
"Compiling on Windows 7+ (MSYS2_Alternative)" but it seems that the URL is
causing GitHub to forget about the PR as it seems to push and is recorded
in my local repository but never actually lands there!
It also makes some changes to the setting up of the LUA package paths for
the lua code formatter so that the paths are all entered with Unix style
directory separators but converted to whatever the Lua package handler is
set to use. In a Windows environment it is not unheard of to get both '\'
and '/' being used within the same path as different parts get generated
in stages - and using the backslash one can produce surprising error
messages if the back slash is not properly escaped when displaying those
messages in the main console or elsewhere (they dissappear entirely or
end up escaping following characters producing misleading information).
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Update src/mudlet.pro
BugFix: fix a typo in qmake project file.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Revise: reduce almost duplicate comments
Fix an addition to the `package.cpath` which would not have worked as it
did not specify the file extension which is OS dependent.
Also remove LuaJIT remenent, which we dropped support for a long time back.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Apply suggestions from code review
Revise: fix an error in a comment.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Revise: take out some pre-processor stuff as run-time code works without it
I was a bit sceptical at first but it *seems* to work.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Enhance: modifications to get CMake working on Windows
Revise a Mudlet specific CMake macro to not include the word "module" as
that is not appropriate for all usages now.
Fix an obscure CMake build error caused by the use of:
`LIBRARYNAME::LIBRARYNAME` in `target_link_libraries(...)` which is the
form for an interface usage of a library - this causes a failure of the
build with an error message of the form:
`src/CMakeFiles/mudlet.dir/build.make:1954: *** target pattern contains
no '%'. Stop.` that line is actually one about one of the libraries
concerned - and it is the first one which shows up in that file with a
LIBRARYNAME-NOTFOUND entry. The fix seems to be to use only a LIBRARYNAME
form.
Fix a problem in `(static QString) mudlet::getShortPathName(const QString&
name)` which is cause by a Windows specific function that takes.returns
template/typedef type arguments which only work if the symbols
`UNICODE` and `_UNICODE` to be defined and which aren't in an MSYS2/
Mingw-w64 environment.
Revise some usages of the APP_BUILD defined value so that they are
handled correctly (using `QStringLiteral`/`QByteArray` wrapppers).
Change the CMake find module for Pugixml so that it uses a variable name in
ALL_UPPER_CASE to remove a developer warning about using a mixed case one.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Edit: fix copy paste issue
I thought something needed to be more conditional than it was but didn't
get it undone in last commit.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Refactor: simplify the code to set up the Lua/C additional paths for LCF
Peer-review suggested I needed to shrink the code.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Revise: shrink some comments
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Revise: implement some changes requested by peer-review
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Revise: shorten multi-line comment in initIndenterGlobals()
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Revise: further change suggested in peer-review
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Fix recognition of static libraries in own Find modules
Co-authored-by: keneanung <keneanung@googlemail.com>