ReflectionHLE (Reflection Keen)

Here is where to post about the latest Commander Keen fangame or modification you've finished, a new website you've made, or another Keen-related creation.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Re: Reflection Keen (ports of Keen Dreams and all 3D Catacombs)

Post by NY00123 »

It is time for another release.

The most significant change, which is relevant for some Catacombs titles, is probably a port of (recreated) DEMOCAT.EXE/HINTCAT.EXE executables. That's right, access to the slides of the Electronic Catalog and the Hint Books is now available. This is based on recreated code for DOS, which I uploaded to this repository: https://bitbucket.org/NY00123/gamesrc-ver-recreation/

Note that unlike the situation under DOS, you can't directly send anything in the Electronic Catalog to a printer, but that's probably expected.

If any of you had the issue of an unexpectedly low framerate on Android, hopefully it's resolved in this release. This was previously a side-effect of high audio latencies. Unfortunately, due to the way things are working in the last release, there may be some sound stutters. In case of a problem, see the README for a few details on the "sndinterthreadbufferratio" setting.

[A summary of technical details: The main thread is now responsible for the game's timing, as well as generating audio samples (which is somewhat tied to the timing). This thread merely passes the samples to an SDL audio callback thread, which was previously responsible for the rest.]

Further note that you might fail to find external files like egahead.kdr (originally present in kdreams.exe) being written anywhere. That's because they're not anymore: Once you start, for instance, a game of Keen Dreams v1.13, egahead.kdr is loaded right from kdreams.exe. In case you're wondering, yes, kdreams.exe is packed, so it gets temporarily unpacked transparently, in memory.

Again, the README has the change log, and the git repository has a more detailed log.

See the first post for downloads (or GitHub link). You should find the README over there.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Re: Reflection Keen (ports of Keen Dreams, 3D Catacombs and Wolfenstein 3D)

Post by NY00123 »

Hi all,

It's been a while, but I wanted to mention that I've added support for another game, which is Wolfenstein 3D.

This is a 6 years anniversary release. On September 26 2014, I released a new port of Keen Dreams, initially titled "Chocolate Keen Dreams".
Although Keen Dreams was released earlier in the same month, I actually started some work on it even earlier, after the Catacombs were open-sourced (in June 2014). Reason is that I already knew that a lot of the code was common.

Following Keen Dreams, I added Catacomb Abyss, then Catacomb 3-D, and finally the rest of the Catacomb Adventure Series.

Recently, I've been working on the source ports again. With the assistance of the gamesrc-ver-recreation/wolf3d tree, the last release introduces support for Wolfenstein 3D, Spear of Destiny (excluding the mission packs) and Super 3-D Noah's Ark (DOS version).

For Wolfenstein 3D, this currently covers Apogee shareware versions 1.0, 1.1, 1.2 and 1.4 (the one with cheats), as well as 6-episodes Activision v1.4.
For Spear of Destiny, this covers FormGen demo v1.0 and Activision v1.4.
For Super 3-D Noah's Ark, this covers the one Wisdom Tree DOS version that I'm aware of.

There are still some problems. In particular:
- You can't save games or load saved games in Wolf3D and the games based on it.
- These games have no support for the "modern" game controller scheme. I think that the other games should still have it, though.
- For technical reasons, you can't load the Spear of Destiny mission packs.
- More generally, you can't load TCs made to work with original EXEs from the 90s (as released by id and/or related publishers). I still haven't decided how to approach this.
- In order to detect game data, you also need the original DOS exe (albeit the 2015 edition of Keen Dreams is an exception).
- For Super 3-D Noah's Ark, this exe currently has to be named noah3dos.exe, as this is the way it arrives from Steam right now. Currently, there's no good way to support auto-detection of data with alternative file names.
- The rate of palette updates in Wolfenstein 3D is at least somewhat imprecise.
- VSync is disabled by default for now. There are other potential problems with timing in Wolfenstein 3D, which might partially be related to instances in which the game tries to render more often than the host display's refresh rate.
- Stereo panning remains unimplemented.
- For the Wolfenstein 3D based games, if you try to use a wall right after pushing it, the behaviors are essentially undefined.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Re: Reflection Keen (ports of Keen Dreams, 3D Catacombs and Wolfenstein 3D)

Post by NY00123 »

I can write that the port has still been updated (mostly for Wolf3D). Today's release introduces saved games support to Wolf3D. They should be written in the same binary formats as the matching DOS versions. On the other hand, due to the nature of the implementation, there may still be bugs.

I also fixed a bug which, unfortunately, may break (partial) compatibility with Keen Dreams and Catacombs saved games. Then again, such compatibility was probably already broken in the same manner with the matching DOS versions.

The preceding release introduced support for the Spear of Destiny Mission Packs, along with other additions and modifications.

Change log for the last release:

Code: Select all

Dec 25, 2020 (v0.32.0):

* KDreams, Catacombs (and Wolf3D): Make it possible
to bind actions to a game controller's D-pad.
* Wolf3D: Support game controllers, in a similar manner to
what's already been covered for Keen Dreams and the Catacombs.
Further add mappings for touch input.
* Wolf3D: Support stereo panning. This might not be fully accurate,
but hopefully, it's not that far.
* Wolf3D: Support saved games. They should be read and written using the same
formats as the original DOS versions. This may currently be buggy by nature.
* SD_TimeCountWaitFromSrc/SD_TimeCountWaitForDest timing fix, applying to
all games, but especially noticeable while playing back demos in Wolf3D.
* Add support for Spear of Destiny FormGen version 1.0, as well as the
variation of FormGen version 1.4 which is actually identified as "V1.4"
in-game. Currently, the one mistakenly identified as "V1.0" won't be detected.
The mission packs' data still needs to be the same as in the
Activision version, thus e.g., including the UAC logs.
* When game installations are shown in the launcher, don't print their
locations for now. This might become more useful later, in case it will
be possible to choose any of multiple game installations which otherwise
match the same version (e.g., due to somewhat differing game data).
It shouldn't matter as much for now.
* A change that may potentially break saved games made
with older versions of the KDreams and Catacombs ports:
The macros COMPAT_OBJ_CONVERT_OBJ_PTR_TO_DOS_PTR and
COMPAT_OBJ_CONVERT_DOS_PTR_TO_OBJ_PTR were fixed. The original sizes
of the object structs, as present in the DOS executables from the 90s,
are now used, instead of sizeof(objtype) from the source ports.
* Other misc. fixes and modifications. Thanks to Blzut3 for
assistance with a subset of the changes in this version.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Re: ReflectionHLE (Reflection Keen)

Post by NY00123 »

Version 0.40.0 has been released. Since Keen Dreams isn't the only supported game, the project is being renamed as of this version. It's now titled "ReflectionHLE".

A side-effect of this is that you'll have to manually migrate saved games and settings. Hopefully, it shouldn't be more than copying a directory or two. See the top of the change log for details.

This version has the experimental addition of keyboard and mouse button overrides. They might not always work as expected. For instance, overridden keys may become unusable for cheat codes.

There's also an APK for Android again. Audio resampling isn't included in it, and there might be other problems related to audio. Generally speaking, the Android builds should be considered less supported.

Code: Select all

Dec 31, 2021 (v0.40.0):

The project is renamed "ReflectionHLE" as of this version.
As a side-effect, users of earlier Reflection Keen versions will have to
manually migrate older settings and saved games. See paths given below.

Windows: %APPDATA%\reflection-keen => %APPDATA%\reflectionhle

macOS: ~/Library/Application Support/reflection-keen
=> ~/Library/Application Support/reflectionhle

Linux - two paths (assuming $XDG_CONFIG_HOME and $XDG_DATA_HOME aren't set):
~/.config/reflection-keen => ~/.config/reflectionhle
~/.local/share/reflection-keen => ~/.local/share/reflectionhle

* The project was renamed from "Reflection Keen" to "ReflectionHLE".
* A single executable can now be used for running the supported games.
It is identified as "ReflectionHLE".
* Due to using one exe, the application icon had its game identifiers removed.
* Additionally, the cfg file was split, with game-specific settings residing
in their own separate cfg files. Some cfg key and value names were further
renamed. Code was added for automatic migration of these from v0.33.1, but
this does not cover the directories which store the cfg files and saved games.
* The command-line options -skipintro and -showslides were removed. Instead,
you can show the intro or slides with sub-gamever selection via -gamever.
* Added the command-line option -listgamevers. It can be used for listing
supported game versions, instead of -?, which doesn't do so anymore.
* There's now experimental support for keyboard and mouse button overrides,
applying to in-game actions during gameplay.
* Note that these take a higher priority than in-game settings for the
same keys. They also have a higher priority than hardcoded behaviors of them.
For instance, it might be impossible to use a cheat code. You can still
use a cheat code via the on-screen debug keys, though.
* The on-screen keyboard with debug keys can now be displayed even
if there's no use of touch input or any game controller.
* Revert the impact of changes from v0.33.0 to the way controller buttons
get mapped under the modern controller scheme. Instead of mapping to the
default settings of a game, mapping is now done to the matching actions.
For instance, in Keen Dreams, you can map a button to Jump instead
of Ctrl (the default key for jumping in the original releases).
This is still done in a different manner from versions preceding 0.33.0,
as it's now less tied to the original games' keyboard settings.
* As a side-effect, there are changes to the impacts of the analog motion
toggles, even while using a D-pad. Additionally, the novert toggle should
also impact vertical motion from a game controller or touch input.
* Catacomb Abyss: Ensure it's possible to scroll through HELP.TXT using a game
controller or touch input, even if movement keys were changed in config.abs.
* General restructuring of the launcher's menus, following the support for
multiple games from a single exe and the addition of key/button overrides.
* Android builds are now possible again, albeit without audio resampling.
Generally speaking, these builds should be considered less supported.
* For technical reasons, sound output is done somewhat differently on Android.
There may still be problems with audio, including delays.
* Improvements to timing of sound playback during the intermission screen
in Wolfenstein 3D, Spear of Destiny and Super 3-D Noah's Ark. This
might be more noticeable while VSync is toggled on.
* Launcher control bindings for Wolfenstein 3D and Super 3-D Noah's Ark:
The weapons/feeders are now referred to by their numbers,
instead of game-specific descriptions.
* Emulation of mouse motion via game controllers was made
less frame rate dependent.
* Fix a typo impacting startup of Catacomb Apocalypse's hint book. The offset
of a textual screen as present in the original exe was wrong. The bug was
introduced during a refactor after the release of v0.30.1.
This screen is actually used just in the electronic catalog of the supported
shareware version of Catacomb Abyss, upon trying to print the catalog.
* Catacombs, Wolf3D: Fix building in case "char" is an unsigned type.
* Additional miscellaneous refactors, edits and fixes.
NY00123
Vorticon Elite
Posts: 508
Joined: Sun Sep 06, 2009 19:36

Re: ReflectionHLE (Reflection Keen)

Post by NY00123 »

Version 0.40.1 has been released. This update mostly consists of usability improvements. Also, for people less familiar with ReflectionHLE, a web page is now up: https://reflectionhle.com/

This release will hopefully resolve usability problems with keyboard overrides, and possibly also with other input devices. But there are great chances that there's a new bug not found by me, so bug reports will be welcome. You can use the GitHub repository's issue tracker, or report in the forums if you prefer so; Albeit I might not necessarily check all forums in which I posted about ReflectionHLE.

Code: Select all

If you are upgrading from a version preceding 0.40.0, please check
migration notes for v0.40.0. The project was renamed to "ReflectionHLE"
at the time, and as a side-effect, older settings and saved games
have to be manually migrated.

Oct 14, 2022 (v0.40.1):

* Add a toggle for showing/hiding the ENDOOM screen on exit,
currently identified in the launcher as "Wait for input on exit".
Regardless of the toggle, it'll still appear in case of a nonzero exit code.
Other screens specific to shareware versions of certain games might
further keep appearing, or introduce their own delays.
* Updated search paths for Wolfenstein 3D and Spear of Destiny game data.
* Keyboard overrides don't fully replace the original uses of the keys
as of this version. For instance, if the launcher is used to select
the key W for moving forward in Catacomb 3-D, it can still be used
as a part of debug keys for warping to another level.
On the other hand, the familiar functionality of the key otherwise used
for the same in-game action will be disabled. To clarify for the example
of moving forward, the key generally used for this purpose from
Catacomb 3-D's own control panel (the Up arrow by default)
will not actually be used for moving forward.
Note that mouse button overrides are still full overrides and there's
no change in behaviors as describe above.
* Miscellaneous internal changes related to user input, related in part to
keyboard overrides. One example is a bug fix, where pressing on a key
moving Keen left, followed by another key moving Keen right, and then
releasing one of the keys, would make Keen stop moving altogether.
Also, as of this version, the analog motion is explicitly reserved for analog
controller axes; novert impacts these, as well as ordinary mouse movement.
* Use more locks for the audio mixer. This particularly
helped resolving unexpected slowdowns in Android builds
with BE_ST_MANAGE_INT_CALLS_SEPARATELY_FROM_AUDIO=1,
during playback of digitized sounds in Wolf3D.
* BE_ST_MANAGE_INT_CALLS_SEPARATELY_FROM_AUDIO=1 is used for Android again.
* Other updates related to Android builds.
* Made a few changes removing dependencies on libgcc and C++ libraries
as long as we don't actually need any of them.
* Other miscellaneous edits.
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Re: ReflectionHLE (Reflection Keen)

Post by Nisaba »

thanks for the update. keep up the good work!
out now (link) : Image
Post Reply