Duke4.net Forums: Fix for lunatic bitrot. - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fix for lunatic bitrot.

User is offline   modulo7 


I tried to build eduke32 revision 7490 with lunatic enabled on Debian arm64.

To build I used


The first thing I found was that I needed to copy bcsave.lua from /usr/share/luajit-2.1.0-beta3/jit/ to the jit directory in the source tree overwriting the version shipped with eduke32, I did not include this change in the patch.

After doing this a substantial number of first build failures, and then runtime failures were encountered due to mismatches between the main eduke32 code and the lunatic code (both C and lua). I ground through these until I could successfully load the game and complete E1L1. There was still a warning though (IIRC something about being unable to access "ang")

The patch is attached to this post.
Attached File  lunatic.diff.zip (8.51K)
Number of downloads: 53

User is online   Hendricks266 

  • Weaponized Autism


Thanks for going through the effort of making this patch. Here are some comments:

1. Please go through the diff using git gui, unstaging and reverting stray changes like the addition of newlines to source/duke3d/src/game.h for no reason, and spurious whitespace changes such as following code.
-        int32_t JoystickAnalogueDead[MAXJOYAXES];
+       int32_t JoystickAnalogueDead[MAXJOYAXES];

You can select individual lines, right-click, and "Unstage Line For Commit", then use the Revert functionality on the file in the Unstaged Changes box in the top left.

2. extern "C" tags should always be located at the declaration in a header, not at the definition site in the .cpp. There is also no need to indent around extern "C" braces, and for a single declaration braces are not needed at all.

Otherwise, since this patch is mostly to Lunatic-only files it should be acceptable to merge with these cleanups made.

You should be aware that the Lunatic roadmap, if there is one at all, is different than the direction Helixhorned was going. His intent seemed to be to eventually rewrite the entire Duke 3D game code into Lua, which is completely unacceptable to the rest of the developers for both performance and stylistic reasons. The Lunatic work as it stands has a non-negligible number of invasive changes to the game and engine that clutter the code. Moving forward I would like to cut back the scope of the project to simply providing Lua language bindings for modders who would like to use them.

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password

Sign in options