To improve readability, current versions can be found in this thread

LC (short for LegacyClonk) is a fan project based on Clonk Rage.

LegacyClonk continues to receive updates and ensures compatibility with existing Clonk Rage content.

The goal is to fix as many bugs and inelegances as possible and to add nice-to-have features while not to impact the gameplay we’re all used to.

Ideas and features can be proposed here.

Installation

In order to install LegacyClonk, the original Clonk Rage or an older version of LegacyClonk must be installed already.

The update changes most of its files, which leads to the original Clonk.exe not longer being functional after the update. Those wanting to keep both versions should install Clonk Rage a second time.

You can update to the newest LC version from every LC version as well as from Clonk Rage itself. However, if you update from LC [330], you have to change the language from LE to normal english. The Language.c4g, which got installed for LC [330], may then be deleted.

If you update from Clonk Rage, you’ll either have to set all settings again or copy them manually.

In order to update to LC, download the desired version (see links below) and follow the below listed installation instructions.

If any version of LC is installed, you can use the integrated update method via the „Info“ menu. Note that it currently uses HTTP only. Those who want to feel really confident need to download and install the update manually.

Manual installation

Caution: Following version [332], it might be necessary that the update process has to be run twice in order to run without errors due to changes to c4group.

Windows

Operating System Requirements:

Windows 7 or newer

Microsoft Visual C++ Redistributable for Visual Studio 2019 x86 (also for 64 bit installations, as LC is a 32bit application)

Warning: Some anti virus programs might report a false positive concerning Clonk.exe or warn due to it being unknown. The source code is available here.

Open the downloaded update file with a double click. Administrator rights might be required depending on the installation directory.

lc_windows_updater_xxx.bat (see downloads below) might be of help with installation problems. Save the bat file and the matching (same version number) update file (c4u) into the Clonk directory and execute the bat file. If Clonk has to be run with administrator rights, so does the bat file.

Thanks to @Funni, who made the improved version of the bat file starting with version [332].

In order to apply Clonk Rage’s configuration to LegacyClonk, the registry path HKEY_CURRENT_USER\Software\RedWolf Design\Clonk Rage shall be copied to HKEY_CURRENT_USER\Software\LegacyClonk Team\LegacyClonk .

Linux

Operating System Requirements:

The prebuilt engine gets compiled on Ubuntu 18.04 (bionic). The following packages (or similar ones on other distributions):

zlib1g libgl1-mesa libjpeg libpng16-16 libssl libglu1-mesa libglew libsdl1.2 libsdl-mixer1.2 libfreetype6 freeglut3 libxpm

In order to install the downloaded update, open a terminal and switch to Clonk’s directory:

$ cd clonk-directory

Then you have to install the update with Clonk:

$ ./clonk update-file.c4u

If a 64bit installation is present, be aware of the differences listed below. Following update from LC to a newer version can be installed without paying attention to those.

In order to install the update, you have to use ./clonk64 instead of ./clonk .

instead of . In LC, the update for 32 and 64bit are separated. Therefore, there’s no more differentiation between clonk and clonk64 as well as c4group and c4group64 . For that reason, existing links and similar stuff has to be updates in oder to point to clonk / c4group .

In order to apply Clonk Rage’s configuration to LegacyClonk, you have to copy ~/.clonk/rage/config to ~/.legacyclonk/config .

Mac

Due to missing expertise, there’s no working update package for Mac, although compiling Clonk for Mac per se is functioning.

If you’re interested in one, please contact DerTod in the IRC or post a corresponding reply here.

Downloads

Developer Documentation

The developer documentation can be found here on Clonkspot, as usual. It gets updated with LC’s changes.

Most important changes

A complete list of all changes can be found in the git-log.

[336]

Game Content Update

The update aso updates the original game content to 4.9.10.8, adding the 4K version of the deep sea loader.

Hoewever, all packages get updated and now contain a COPYING file, containing a list of the files’ authors. This step is necessary for our own future installer and in order to provide an archive with the complete game content.

Scaling improvements

Many problems with scaling got fixed and improved:

Cursors get drawn in their native resolution. For this, new cursor graphics have been added.

Text gets drawn in its native resolution (however, it might not be 100% sharp in all cases)

Line weight gets scaled too, e.g, lines from linekits or tooltip borders.

The SolidMask view has been fixed.

Stripes between repeating graphics got fixed.

Incorrectly drawn pixels from another graphics got elimindated.

Ctrl + F sets the focus onto the search bar in the scenario selection list

Escape with a focused search bar sets the focus into the scenario list

2 new Layouts for the UpperBoard

The UpperBoard now has two additional variants:

small variant:



miniature variant next to the log:



Automatic league login

There now exists a simple form of the automatic league login.

[335]

This is only a bugfix release (with two exceptions), as some of the several changes of [334] shipped with some more or less critical errors.

Two bugs happening while using IPv6, a crash in GetPath() (which replaces GetPathLength() using System.c4g and also returns the pathfinder waypoints), a small error in the #strict 3 implementation which sometimes caused false errors in old scripts, unwanted lag in the credits screen and, unfortunately, another bug in line breaking have been fixed.

Also, network packet logging got deactivated in order to minimize loading times of the error message box at connection aborts.

As a small extra, the IRC chat can now be used while waiting in the „Waiting for start“ dialog.

[334]

Optimized transmission of game data (c4d, c4s, …)

Transmitting game data in the lobby already got sluggish at only slightly raised pings and didn’t take advantage of the available upload rate.

Now, more data gets sent more aggressively, compensating this problem. As a side effect, pings can be very high while loading under certain circumstances.

###Text of the ready checkbox changes ifself to „still loading“ while being deactivated

The descrption of the ready checkbox changes itself to „still loading“ in order to better communicate the reason why it is deactivated.

IPv6 support (and puncher)

LC now got OpenClonk’s complete IPv6 support and its netpuncher backported.

Long story short: With LC, you can now host and join over IPv6, provided that both parties have it provided from their ISP.

With IPv6, generally, there’s no more port forwarding; however, according to experience, router with enabled IPv6 are running an active firewall, thereby requiring to forward the necessary ports in order to host over IPv6.

People with DSLite (who haven’t been able to host over IPv4 until now) need to be aware that only players which already have IPv6 can join them.

However, hosts with true Dual Stack can be joined from both IPv4 and IPv6 clients, provided that port forwarding and the IPv6 firewall are configured properly.

LC now also uses the same netpuncher as OpenClonk, allowing some hosts to host over IPv4 too, which hasn’t been possible as port forwarding isn’t available to them (for example with DSLite).

However, tests have shown that the netpuncher doesn’t cure every disease. If in doubt, DSLite clients should setup the proper port forwarding at the router in order to increase the chances of success.

New Logo

Thanks to @AniProGuy, LC now has its own logo in both full size and icon size.





Windows: Gamma is now reset when minimizing

Internal scripts removal

Actually, it’s only an implementation detail, but with severe consequences.

Up until now, with a small change in Clonk’s source code, it was possible to script using so-called „internal scripts“, as both client and host, in both league and non-league games, ignoring a potentially disabled debug mode, and, last but not least, invisibly.

These „internals scripts“ were now removed and all legitimate use cases in the engine got replaced by corresponding specific packets. This way now cannot be used to script invisibily.

Formatted text now behaves properly with line breaks

With the activation of white chat and timestamps, it got clearly visible that automatic line breaks caused the loss of text formatting (colour, italic) in the following lines.

Unfortunately, an attempt to fix this in [333] failed, but it should work now.

High resolution loaders

Thanks to @Funni’s initiative, matthes himself sent us some loaders he newly rendered in 4K.

Unfortunately, due to outdated plugins, there were some rendering errors, which @Funni fixed manually, although it isn’t perfect.

We’re still searching for graphics designers who could help us with this problem with their knowledge.

The gold mine loader (the main menu’s background) and the watercave one are new currently.

C4Script additions

This version contains several new features for C4Script which are ready to be used by you! The documentation has yet to be updated though.

Please note that there might be unknown bugs when using those features.

#strict 3

A renewed #strict 2, which fixes some what we call quirks in C4Script and allows for new features.

#strict 3 will probably receive more changes in the future, however, we’ll do our best to stay compatible with this first version of #strict 3 so that scripts don’t have to he adapted again.

New scripts should definitely use #strict 3.

#####nil

Possibly known from OpenClonk, there’s now an expicit value for „nothing“.

The big advantage is that you can now distinguish between 0, false, NONE and nil.

As 0, false and NONE now correspond to their respective types, they aren’t convertible to string, object, array or (also new) map. In order to pass arguments of these types, you always need to pass nil instead of 0 (as well as false and NONE).

As nil is also not equal to 0, false and NONE, the value has to be compared to nil in order to determine its existence. Meaning, if (foo == nil) instead of if (foo == 0) and other ways. Same for != .

A weaker alternative consists of if (foo) or if (!foo) , which corresponds to the older meaning, as nil, 0, false and NONE are all false when converted to bool.

Maps

The details are explained further below. #strict 3 must be activated in order to use syntax for maps.

Access modifiers

With #strict 3, access modifiers (public, protected, private) now finally get their meaning back.

Up until now, function calls with -> ignored the access modifiers. Atleast I hasn’t set modifiers anymore because of this.

Now, these access modifiers are checked with -> too if both the script containing the call as well as the script containing the function are #strict 3, ensuring that interactions with older scripts keep working.

The default modifier, as usual, is public if nothing is specified.

Maps (also known as hashes or associative arrays)

Similar to OpenClonk’s proplist, but not exactly the same, are maps, a long wished data structure for C4Script. With maps, any type can be used as both key and value in order to save values.

A description of maps can be found in [this feature’s commit message].(https://github.com/legacyclonk/LegacyClonk/commit/d84fcf29fd837cc46dbb57bba5674855fb72bb19) until the documentation gets updated.

Directly modifying operators cannot crash anymore

A short time ago, when implementing the ..= operator, I noticed that you can crash the engine with += and many other operators which change their argument directly with ease.

Example:

/script Global(0) = "Hello" /script Global(0) += 1

This bug has been fixed with [334] by additional checks (and exact error messages) at any #strict level.

SetLength finally fixed

A crash in SetLength should have been fixed with [333], but has only been moved to a corner case. It should work properly now.

Array append operator []

A new element can be appended to an array by leaving the [] braces empty.

Example: arr[] = 13337 is equivalent to arr[GetLength(arr)] = 1337 , which was used before.

Array access of strings

Using [] array access, the individual chars of a string can be extracted directly as a string. However, as of now, only read access is possible, an attempt to modify such a value results in an error.

Also, negative indices can be used in order to access elements from the back.

Example: "Hello"[0] -> "H" , "Hello"[-1] -> "o" .

Too small or too big indices result in nil / 0 .

New operators <<=, >>=, **=

The missing <<=, >>= and **= operators as a counterpart to <<, >>, ** have been added.

Concatenation operators .. and ..=

The .. operators allows for more possibiilites, ..= is the combined set operator.

If one of the operands is a string, … concatenates the two strings. If necessary, the second operand gets converting to a string if it’s an int or an ID; otherwise, an error is raised.

If both operands are array, the arrays are concatenated.

If both operands are maps, they get concatenated; the description and an example are contained in the description of maps.

Examples:

"Hello" .. " " .. "World" -> "Hello World"

10 .. " %" -> "10 %"

[0, 42] .. [1337, 1] -> [0, 42, 1337, 1]

[333]

Fixes for Windows

/alert is working again

the problem of only having a white/gray screen after restoring the Clonk window experienced by some users has been fixed

Window’s „Ding“ sound is eliminated for some Alt-shortcuts

the crash happening when quitting Clonk is fixed, although Windows showed the crash dialog only for the first time

from now on, i.e. with an already installed version of [333] or above, c4group.exe will be updated whenever the update is applied using Clonk.exe (double clicking the update-file or using the bat-file also uses Clonk.exe internally)

/script can now be used in any scenario in single player mode

Until now, /script in single player games was only allowed for scenarios that were made by the player themselves although when using the network mode it could be used with any scenario.

This limitation has been removed.

/nodebug as client

/nodebug can be used as a client again, e.g. to hinder hosts with cheating.

LoadScenarioSection can now reload the current section

LoadScenarioSection can now reload the current section by specifying the name of the currently active section.

Previously, this only triggered a warning that the section is already current.

(Rare) crash in script function SetLength fixed

Thanks to @Bratkartoffl for revealing

[332]

Better fullscreen and windowed mode

The mouse can now be used without problems with activated scaling. Also, notifications - e.g. Windows 10’s toasts - or firewall dialog windows can be viewed and operated correctly. /console works properly too.

New script callback InitializeDef

protected func InitializeDef(string section) : Gets called in every definition before the scenario Initialize call and at a section change, but before objects get created. As an example, it can be used to set static variables.

section contains the new section - if 0 , the main section gets loaded.

Color coding

The scenario list doesn’t show unparsed color markup any more, which however gets now displayed correctly in the loader’s title.

Search function

There’s now a search function for the scenario list.

[331]

New fullscreen and windowed mode

In fullscreen mode, the currently set resolution always gets used. Also, minimizing and restoring should now work better and faster.

In order to ensure that the image doesn’t get too small on higher resolution, there’s now a scaling option instead.

Windowed mode can be selected in the options as well. The window’s size can also be changed, however the content only resizes itself during a running game or on a dialog change.

White chat and timestamps

Both white chat and timestamps can now be enabled for lobby and timestamps.

The white chat for running games can still be enabled via the game menu, for white chat in the lobby and timestamps there’s an option in the menu.

Checkbox for gamma

In the troubleshooting options in the „Graphics“ tab, there’s the possibility to disable gamma.



Resource progress display for the lobby

The lobby now displays how much the other clients have already loaded of the game content.

This display only works if a direct connection to the client exists (indicated by a shown ping). Otherwise, no resource progress will be displayed.



[330]

Fix some desyncs between Linux/Mac and Windows

Backport OC’s ready checkbox for the lobby (also displays whether a client supports this feature or not).

An option to color ingame messages white

Comic Universe uses the official engine which doesn’t support this functionality.Tod’s Laptop is not ready yet and Tod’s Laptop2 ist already ready.The readines display is only a support for the host; he can still start if not all clients are ready.

A restart buttons for hosts in the „Abort round?“ dialog (which gets displayed on [Escape])

The option for the white chat can be found in the ingame player menu unter Options -> Display -> White chat (doesn’t have its own icon yet).

A restart buttons for hosts in the game over dialog, and another button for SetNextMission, if used. Continuing to play is now always possible.

New credits screen (dynamically generated instead of a static background image)

Preparation for automatic updates

Only OpenGL

As the first tutorial gets played, all four buttons are visible.If SetNextMission isn’t used, only 3 buttons get shown.

LC now only supports OpenGL (no more DirectX) because we don’t have someone who can maintain DirectX. It might be readded in future updates if OpenGL creates too many problems.

Have fun playing!

Concerning problems, uncertainities or questions, contact me (DerTod) or Fulgen in the IRC in #legacyclonk or here in this forum (an answer might take longer though).

Please note that we might not have time or be offline in the IRC (in the latter case we are set to away), we usally answer in the later afternoon or later. In any case, wait longer than just a few minutes.

Please report bugs in the bugtracker and other things in the forum (you may notify us in the IRC so that we can notice it faster), so that bug information and other things are visible for all parties.

Now, I’d like to thank @AniProGuy, @Alx and @Peder, who were a great help for testing the Windows version and found some bugs.

I also want to thank @Luchs , who supports us with Clonkspot.

Naturally, I also want to thank matthes and the former developer team for the creation of Clonk and additionally matthes for making the entire code open source.

At the end, I want to thank the OpenClonk team, as they did a lot of work which help us at cleaning up code and also created some features / commits which we backported.

This update is made available to you by the LegacyClonk team, consisting of @Jan, @Fulgen, @Kanibal and @Der_Tod at the moment.

FAQ

Does OpenGL introduce any disadvantages?

Under Windows and Mac, there’s no difference, as OpenGL gets always used there.

Under Windows, the OpenGL implementation got notably ameliorated with [332], however, it might still behave differently than you’re used to.

Also, OpenGL enables a cool undocumented feature which is also present in the original engine and can be enabled in the registry under ( HKEY_CURRENT_USER\Software\LegacyClonk Team\LegacyClonk\Graphics ) under the name „ColorAnimation“. The option „Shader“ has to be activated as well. With this feature, liquids get animated. Try it out!

It lags a bit constantly with 30 FPS on average

This seems to appear with some GPU drivers if VSync is activated in their settings. The solution is to deactivate VSync either globally or only for Clonk. We think it synchronizes twice with activated VSync, as Clonk does this separately, causing 30 FPS at a 60 Hz monitor.

Crash on startup

If @Jan’s resource progress display is used, which works by replacing fmod.dll, LC crashes on startup with the following message:

LegacyClonk [330]-[337] (alte Versionen) Die Anwendung konnte nicht korrekt gestartet werden (0xc0000142). Klicken Sie auf “OK”, um die Anwendung zu schließen.

The modified fmod.dll only works for the official CR engine. For that reason, you need to use the original fmod.dll for LC. Note that you don’t need this modification anymore, as the feature was implemented in [331].

Known bugs

[330] - [333]

On linux it may be not possible to change player portrait images.

Only [332]

Some users experience only a white or gray screen after restoring the Clonk window.

[331] - [332]

/alert doesn’t work on Windows.

Only [331]