An open source re-implementation of LEGO Rock Raiders πŸͺ¨β›

OpenLRR

An open source re-implementation of LEGO Rock Raiders (PC). This is created by slowly implementing and replacing game functionality, while relying on the original executable and game assets for everything else.

OpenLRR is not associated with The LEGO Group or Data Design Interactive. When using the name "OpenLRR" within this project, the L must never be expanded (i.e. do not write "Open LEGO Rock Raiders").


Base game installation


See also

Related LRR projects

Similar open source projects

Owner
Robert Jordan
I have too many C# projects...
Robert Jordan
Comments
  • How to run

    How to run

    Hi, maybe I'm stupid but there's absolutely no documentation on how to actually run this. Can someone help me please? Simply cloning the repo into the LRR folder doesn't work, the .exe says it's missing openllr.dll (or openllr-d.dll)

  • Show arrow when placing buildings to clearly indicate the resulting rotation

    Show arrow when placing buildings to clearly indicate the resulting rotation

    Describe the issue When placing buildings like the Mining Laser or Geological Center, there isn't any indicator for what rotation they'll spawn in. It's not too hard to figure out if you're familiar with how the rotation works, but it would be more user-friendly to show an arrow so that it's easy to tell.

    Outline of feature

    • A white arrow should be drawn over the origin tile in the SelectPlace tile grid to indicate the current rotation of the building before placing.
    • This arrow should (by default) show exclusively for buildings with only solid tiles (aka the buildings described in the first section).
    • A setting should be made to disable the arrow, or change if it always shows, or only shows for purely solid buildings.

    Screenshot Example of placing a larger building with the arrow visible. OpenLRR_BuildingPlacementArrowPowerStation

    Video Example of placing the Mining Laser and deciding on the building rotation.

    https://user-images.githubusercontent.com/9752430/189546414-ea9e297d-9700-4980-b28f-db261d7bc06d.mp4

  • Random landslide sounds and notifications at the start of levels

    Random landslide sounds and notifications at the start of levels

    Describe the issue Sometimes when starting the level, the sound of a wall collapsing will play, despite there being no collapsing wall nearby. Very rarely, Chief's landslide announcement will play as well, despite no landslide notification appearing.

    When encountered in a level, it will always play at the start of the level no matter how many times the level is restarted. However, what levels it happens in, if any, seems random. It appears to function separately from #42.

    It most commonly happens in Breathless, but has also been heard in Erode Works, Lake of Fire, Hot Stuff, and Rocky Horror. It does not seem to happen in levels that start with Chief announcing something.

    Steps to reproduce Unknown. It happens randomly, and Chief's landslide announcement is extremely rare.

    Additional information

    • Time played this session: Varies
    • Level: Varies
    • Game speed: 100%
    • Graphics fix: dgVoodoo 2.79.1
    • Using mods: None

    Update: This is probably related to #42, since Driller Night and Explosive Action both also have a collapsing wall at the beginning of the level. I'm not going to close as duplicate until it's certain.

  • Randomized sound cues can pick multiple sounds at once (Legacy bug)

    Randomized sound cues can pick multiple sounds at once (Legacy bug)

    Describe the issue Issue #37 fixed the problem with some sounds in a randomized sound list not playing, but now when Rock Raiders slip on a spider, it will sometimes play both slipping sounds at the same time. This does happen with other sound lists, though it seems to vary; it happens for the rock monster's footstep sounds during its normal walking animation, but not for its carrying boulder animation.

    Expected behaviour The game should only pick one sound to play, not two or more at once.

    Steps to reproduce Enter Driller Night! to hear the slipping sounds. Other sounds are harder to hear, and may require replacing them in the CFG with more distinct sounds.

    Additional information

    • Time played this session: (rough estimate is fine. Time for the level -and- overall if played other levels before this)
    • Level: Driller Night!
    • Game speed: 100%
    • Graphics fix: dgVoodoo version 2.79.1
    • Using mods: Edited Rock Monster footsteps to make them more distinct.
  • Block Fade does not work without texture management

    Block Fade does not work without texture management

    Describe the issue

    Block Fade is an experimental feature enabled with the command line option: -flags 32768. This causes block textures to fade-transition into their new state when changed (except for roof textures).

    The feature only works as expected when paired with the -ftm option ("Force texture management").

    However when texture management is disabled, the resulting effect is a delay until the transition time is over, upon which the block texture immediately changes. (This basically looks like lag.)

    As this effect looks quite neat (especially with Power Paths transitioning their powered state), see if it's possible to fix this issue while keeping texture management disabled.

    Steps to solve

    Note: Simply having texture management on is an undesirable solution as it produces a very broken lighting experience, where only walls have lighting applied. (This in of itself may be a graphical bug that affects the Block Fade issue... or it may have been an intended limitation for Voodoo2 graphics cards).

    1. Search engine/gfx/Mesh.cpp for uses of the flag: MAIN_FLAG_DONTMANAGETEXTURES.
    2. In order to find the code that supports these transitions, try removing render/texture state change lines from texture management code blocks to see if these disable the effect.
      • Test these changes with the command line options -flags 32768 -ftm.
    3. If lines responsible for the effect are found, try moving these outside of the conditional code blocks.
      • Test these changes with the command line options -flags 32768 -nm. (-nm is usually applied by default as the opposite to -ftm, as such it is an optional argument)
    4. Confirm if the effect is visible with texture management disabled, and ensure there are no adverse effects caused by these changes.
  • Always allow skipping intro videos and splashes

    Always allow skipping intro videos and splashes

    Describe the issue

    The intro videos and splash screens in LRR are incredibly slow, and unskippable by default when launching the game without -programmer options.

    Area(s) with issue?

    Videos/splashes played on boot, and videos played at the end of a level.

    Steps to fix

    Force the skippable parameter to true for all intro videos/splashes. And consider doing the same for level-end videos.

    Additionally, it may be best to add an option to remove the intros entirely, like in LRR:CE.

  • Upper limits to number of Powered Path connections

    Upper limits to number of Powered Path connections

    Normal gameplay usually never reaches this issue, but attempting to expand your base pathing too far will cause a type of breakdown in the Power Path connections. This breakdown can be observed by Powered Paths directly connecting to Unpowered Paths. Adding more Power Stations generally helps, but the results still seems inconsistent.

    TODO: Determine how much -if any- of this was intentional gameplay behavior.

  • WinMain loop does not sleep, making fixedFrameRate unplayably fast

    WinMain loop does not sleep, making fixedFrameRate unplayably fast

    Describe the issue

    Similar to other engine issues (such as https://github.com/trigger-segfault/OpenLRR/issues/9), the concept of elapsed time is merely a delta of the last update, but with no real restrictions on the number of updates over a period of time.

    The command-line option: -fpslock <float> exists to enforce a fixed frame rate by setting the engine/Main global variable fixedFrameRate. This variable is used during the main loop within engine/Main > WinMain function, where the time delta is always set to the value of fixedFrameRate, and used in the next MainLoop update call.

    But the WinMain loop does not sleep (or wait at all). So although this has the correct effect on game logic of using a consistent time delta for every update... the real-time speed of the game (and how often it updates per second) is entirely at the mercy of your computer's performance.

    Simply put: This does not change the number of updates per second, this simply reports what the number of updates per second should be to the MainLoop update call.

    Steps to fix

    Determine a good method for the WinMain loop to wait until the next frame (when fixed update rate is being used). This waiting also needs to take place for other main states affecting the frame rate (i.e. mainGlobs.flags & MAIN_FLAG_DUMPMODE).

  • NERPs speech/script freeze in Rubble Trouble

    NERPs speech/script freeze in Rubble Trouble

    Describe the issue

    A game freeze can be caused in "Rubble Trouble" by immediately skipping mission briefing, in relation to NERPs message speeches.

    Area(s) with issue?

    Levels: Level03, "Rubble Trouble"

    Although other levels (such as "Frozen Frenzy") seem to meet the same conditions for this bug, only "Rubble Trouble" has been found to trigger this freeze.

    Steps to reproduce

    1. Boot up the game: i. Either with a save game that has "Rubble Trouble" unlocked. ii. Or with the command line option: -testlevels.
    2. Enter level selection: i. Either through loading a same game. ii. Or press Start Game if using -testlevels.
    3. Navigate down to "Rubble Trouble" without triggering any level name SFX.
    4. Rapidly launch "Rubble Trouble" (again, before the level name SFX plays).
    5. Rapidly skip the mission briefing with the >> button.
    6. The game should immediately freeze (then crash? needs confirmation).

    Possible leads

    • The game freeze is triggered by SFX module passing some garbage value sound handle number to the Sound3D module, which is called during a loop in a NERPs message file handling function.
    • "Rubble Trouble" triggers a Chief speech with a vertical dropdown animation stating "You must collect 5 Energy Crystals". Immediately after the mission briefing ends.
    • The NERPs messages file has 7 sounds listed, but the seventh voice file does not exist in the game data. (Sounds\Streamed\InGame\ins307.wav)
    • The NERPs script itself varies from other similar levels (that don't trigger the bug).
    • It seems this cannot be reproduced after a level name SFX has been played. Or after starting a level for the second time(?).

    Attachments

    πŸŽ₯ Walkthrough video

    https://user-images.githubusercontent.com/9752430/135764989-d5c1d639-0b8b-46e6-9e96-3aba7fed7587.mp4

  • Mouse cursor invisible over titlebar in window mode

    Mouse cursor invisible over titlebar in window mode

    Describe the issue

    The game always chooses to render its own cursor over the system cursor. When in Windowed mode, this decision also impacts the frame of the window (outside of the game client area). The cursor is not shown at all when in this area, making it frustrating to drag the window, use any buttons in the title bar, or use an attached system menu.

  • Music menu item does not reflect enabled state

    Music menu item does not reflect enabled state

    Describe the issue The Music menu item checkbox is not entirely accurate at stating whether the music is on/off. When not in a level (or in briefing), the menu item will always be unchecked.

    Additionally, checking this menu item during these periods will cause music to start playing when it's not supposed to.

    Expected behaviour The Music menu item checkbox should reflect the actual music enabled setting, and only toggle whether its enabled. Playing music should only happen when in a level and not in briefing.

    Steps to reproduce

    1. Use a Lego.cfg with Main::MusicOn TRUE.
    2. Open up LRR.
    3. Look at the Options menu to see that the Music option is unchecked.
    4. Start up a level, and after briefing music should play. The Music option is also checked now.

    Additional information

    • Time played this session: 1 minute.
    • Level: Driller Night!
    • Game speed: 100%
    • Graphics fix: dgVoodoo 2.55.4
    • Using mods: None

    Explanation The issue is caused because the game has two flags for the MusicOn state.

    • GAME1_USEMUSIC (relabeled as GAME1_MUSICPLAYING)
    • GAME2_MUSICON (relabeled as GAME2_MUSICREADY)

    MUSICPLAYING is used to determine if the music is actively playing in a level. Meanwhile MUSICREADY states that music isn't playing and also that music is enabled when not playing.

    To effectively gauge if music is enabled, either one of these flags should be on.

    To solve the issue with the music menu item playing music at incorrect times, a different function will be needed for toggling music state that takes both these flags (and whether we're in a level/briefing) into consideration.

  • [Feature request] Borderless Fullscreen Window + Save settings like LOD

    [Feature request] Borderless Fullscreen Window + Save settings like LOD

    Hi,

    here's a feature request to make the OpenLRR window be able to fill the entire screen, with 4:3 aspect ratio, and integer/software scaled to fill the center of the screen, and black bars where needed - a "pseudo Fullscreen" experience.

    And a simple option that LRR saves settings like Dual Mouse, Auto Game Speed, LOD quality and so on. Maybe even add in-game settings such as Music volume to OpenLRR's Menu.

  • Memory for Rock Raiders is not fully cleaned up between levels

    Memory for Rock Raiders is not fully cleaned up between levels

    Describe the issue When teleporting down hundreds of rock raiders, the memory usage in the VS Debugger will slowly skyrocket (~2MB per rock raider!!!). When exiting a level, this memory is not cleaned up at all. This is not related to standard listSet expansion, because the memory increase happens with every unit.

    This occurs with both Mini-Figure and RockMonster object types, so it may be an issue with the CreatureModel or the MeshLOD (in which case Vehicle types may also be affected).

    The current theory is that this is related to MeshLOD, because the memory usage only goes up when teleporting down the Nth unit for the first time, meaning restarting the level and teleporting down new units won't increase usage until exceeding the previous max. MeshLOD has some funky behaviour with allocating contiguous memory for cloned meshes. So this may likely be the key to what's happening.

    Update: It's not the MeshLOD, it seems to be the CreatureModel Container. Disabling MeshLOD cloning doesn't stop the memory consumption, so the issue has to be burried somewhere in one of the aspects of Containers.

    Expected behaviour Memory should be reasonably cleaned up between levels, it's understandable for some memory to stay, like those of list sets. But there are no other known structures that should continuously consume decent amounts of memory without returning it.

    Steps to reproduce

    1. Run OpenLRR in the VS Debugger.
    2. Start any level.
    3. Turn on the Disable Oxygen Consumption cheat to allow endless unit spawning.
    4. Continue to teleport down rock raiders and watch as memory usage jumps up with each unit.

    Additional information

    • Time played this session: 4-10 minutes
    • Level: Driller Night!
    • Game speed: 100%-300%
    • Graphics fix: dgVoodoo 2.79.3
    • Using mods: None
  • CryOre not generating during overlapping rockfall in exposed cavern

    CryOre not generating during overlapping rockfall in exposed cavern

    Describe the issue The exact cause of this bug isn't entirely understood, so the rockfall title is partially an assumption. When digging walls in Driller Night! using debug keys, it's possible to dig walls in a way that CryOre for destroyed adjacent blocks won't spawn. This only happens when digging in fast succession right after discovering the ToolStore hidden cavern.

    Expected behaviour CryOre should normally spawn from dug blocks, but something is stoppinp/overwriting it from happening.

    Steps to reproduce

    1. Start up Driller Night! with AllowDebugKeys enabled.
    2. Using the DestroyWall debug key, destroy walls up and then immediately left.
    3. Destroy the final left wall to uncover the cavern.
    4. Then quickly destroy the inner-right side of the remaining 2x2 wall section while the cavern discovery/rockfall is still happening.
    5. After the dust has settled, crystals should not spawn, (as long as the wall you destroyed was the one shown over the cursor in the Figure B screenshot).

    Additional information

    • Time played this session: 1 minute.
    • Level: Driller Night!
    • Game speed: 100%
    • Graphics fix: dgVoodoo 2.55.4
    • Using mods: None

    Screenshots Figure A (left): The mouse is over the wall that was destroyed to uncover the hidden cavern. Figure B (right): The mouse is over the wall destroyed to tear down the 2x2 section while preventing crystals from spawning. OpenLRR_CryOreMissingRockFallOverlap

  • SFX/Music Volume controls both affect program mixer volume

    SFX/Music Volume controls both affect program mixer volume

    Describe the issue Changing the Music or SFX volume from the options menu only changes the Windows Mixer volume. This affects the volume of the entire program, and also defeats the point of separating Music and SFX channels. It's assumed that this issue started on newer OSes (I read the change happened some time around Vista).

    Expected behaviour Changing the Music or SFX volume should independently change only that channel of audio. Also it's terrible practice to change volume level through the windows mixer (unless it's a master volume control), so ideally that shouldn't be happening either.

    Steps to reproduce

    1. Run OpenLRR or LegoRR.
    2. Right click on the Windows volume tray icon and select Open Volume mixer.
    3. Enter a level in-game.
    4. Open the options menu.
    5. Change the SFX or Music volume sliders and observe them changing the mixer volume for OpenLRR/LegoRR. Also note that SFX will change music volume, and Music will raise/lower the SFX clicking sound from changing the slider.

    Additional information

    • Time played this session: Any
    • Level: Any
    • Game speed: 0%-300%
    • Graphics fix: dgVoodoo 2.55.4
    • Using mods: None

    Steps to fix

    • [x] Isolate SFX volume
    • [ ] Isolate Music volume

    Possible solutions This will essentially require ripping out and replacing most of the DirectSound and MCI audio functionality. MCI needs to be replaced, since it just uses waveOut, and that uses the program's master volume. Meanwhile DirectSound's primary sound buffer also affects the entire program's volume.

    It may be possible to load all sounds under a secondary buffer duplicated from the primary one, this way setting the volume of the secondary (shouldn't?) affect the master volume. Music would also need to be moved to DirectSound or some other API that allows volume control, this means we'd need to eliminate original disc music support from OpenLRR!!! And also decide on a music format to support, and include the associated library. Worst case is we just switch to wav format.

  • Music playing state not changing with WinLevelInstant or Restart Mission

    Music playing state not changing with WinLevelInstant or Restart Mission

    Describe the issue When using the Debug_WinLevelInstant shortcut (LCtrl+LShift+L), the music is not stopped, and proceeds to continue while in the front end.

    When pressing Restart Mission from the options menu, the music also does not stop, and continues to play during the the intro video and briefing.

    Expected behaviour Music is only intended to play when in a level, when not showing an objective message (briefing, missing complete/failed). Even though Debug_WinLevelInstant is a debug shortcut, the game should still function as expected.

    The Restart Mission music issue is slightly different, in that you could argue it sounds better to keep the current track playing even during the restarted second briefing. The same goes for music playing when pressing the Replay Objective button.

    Steps to reproduce (A)

    1. Open up a level.
    2. Enable DebugComplete / AllowDebugKeys.
    3. Press the Debug_WinLevelInstant shortcut (LCtrl+LShift+L).
    4. Music should continue to play while in the rewards screen and the rest of the front end.

    Steps to reproduce (B)

    1. Open up a level.
    2. Open up the options menu.
    3. Press Restart Mission (or Replay Objective).
    4. Music should continue to play during the intro video and while briefing before starting the mission.

    Additional information

    • Time played this session: 3 minutes.
    • Level: Driller Night!
    • Game speed: 100%
    • Graphics fix: dgVoodoo 2.55.4
    • Using mods: None

    Steps to fix

    • [x] WinLevelInstant
    • [ ] Restart Mission
    • [ ] Replay Objective

    Possible solution (A) Simply updating the music playing state in Lego_EndLevel (like is present in Objective_Update) should suffice.

    Possible solution (B) To fix the Restart Mission issue, update the music playing state in Level_Free.

    To fix the issue with Replay Objective, the music playing state should be updated when calling Objective_SetStatus.

  • Better camera controls

    Better camera controls

    Describe the issue Moving the camera with vanilla controls is clunky and slow. Implement modern camera control features from the last decade.

    List of controls

    • [ ] Camera panning keyboard controls.
    • [ ] Camera rotation with mouse held down.
    • [ ] Camera panning with mouse held down (rather than panning at the corners of the screen).
WinMerge is an Open Source differencing and merging tool for Windows.
WinMerge is an Open Source differencing and merging tool for Windows.

WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.

Nov 16, 2022
cavi is an open-source library that aims to provide performant utilities for closed hierarchies (i.e. all class types of the hierarchy are known at compile time).

cavi cavi is an open-source library that aims to provide performant utilities for closed hierarchies (i.e. all class types of the hierarchy are known

Mar 9, 2022
KeyScan is a C++ open source explanation tool targeting windows operating system.
KeyScan is a C++ open source explanation tool targeting windows operating system.

KeyScan is a C++ open source explanation tool targeting windows operating system. it allows you to send keyboard events, mouse events and capture keystrokes (keylogger).!

Sep 21, 2022
Open Source iOS 15 Jailbreak Project

Fugu Fugu is the first open source jailbreak tool based on the checkm8 exploit. UPDATE: Fugu will now install Sileo, SSH and Substitute automatically!

Nov 26, 2022
A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.
A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.

libpostal: international street address NLP libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP a

Nov 23, 2022
Open Data Description Language

Open Data Description Language This is the reference parser for the Open Data Description Language (OpenDDL), version 3.0. The official language speci

Nov 8, 2022
Orbit, the Open Runtime Binary Instrumentation Tool, is a standalone C/C++ profiler for Windows and Linux
Orbit, the Open Runtime Binary Instrumentation Tool, is a standalone C/C++ profiler for Windows and Linux

Orbit, the Open Runtime Binary Instrumentation Tool, is a standalone C/C++ profiler for Windows and Linux. Its main purpose is to help developers visualize the execution flow of a complex application.

Nov 17, 2022
AlleyWind is an advanced Win32-based and open-sourced utility that helps you to manage system's windows
AlleyWind is an advanced Win32-based and open-sourced utility that helps you to manage system's windows

AlleyWind AlleyWind is an advanced Win32-based and open-sourced utility that helps you to manage system's windows. AlleyWind could: Displays a graphic

Oct 20, 2022
Open-CMSIS-Pack development tools - C++

CMSIS-Pack Development Tools and Libraries This repository contains the source code of command line tools and library components for processing meta i

Nov 2, 2022
A CoAP (RFC 7252) implementation in C

libcoap: A C implementation of the Constrained Application Protocol (RFC 7252) Copyright (C) 2010β€”2021 by Olaf Bergmann [email protected] and others AB

Nov 17, 2022
A pure C implementation of the Geohash algorithm.

libgeohash Derek Smith [email protected] A static library used for encoding/decoding geohashes. To use libgeohash just run make. Link libgeohash.a a

Oct 10, 2022
Juice the carrots from γ‚¦γƒžε¨˜γƒ—γƒͺティーダービー (Umamusume Pretty Derby) - Android implementation

Riru-CarrotJuicer Hooks the decryption function in libnative.so of γ‚¦γƒžε¨˜γƒ—γƒͺティーダービー (Umamusume Pretty Derby), to allow inspecting the packets. For Windows

Aug 9, 2022
This is a simple C++ implementation of plant-like structures defined with bracketed OLsystems.
This is a simple C++ implementation of plant-like structures defined with bracketed OLsystems.

Tree Hundred This is a simple C++ implementation of plant-like structures defined with bracketed OLsystems, as described in the book The Algorithmic B

Apr 22, 2022
An implementation of yacc for the janet programming language.

janet-yacc An implementation of yacc for the janet programming language. The implementation is based heavily on https://c9x.me/yacc/. Example from ./e

Nov 22, 2021
libddwaf is Datadog's implementation of a WAF engine

Datadog's WAF libddwaf is Datadog's implementation of a WAF engine, with a goal of low performance and memory overhead, and embeddability in a wide va

Nov 15, 2022
Small implementation of c++ entity component system inspired by Unity

EntityComponentSystem About This is small implementation of entity component system with C++. The API is heavily inspired by Unity ECS framework, but

Oct 13, 2021
Crown (formerly Crowncoin) reference implementation

Crown Core integration/staging tree https://crownplatform.com What is Crown? Crown is an experimental digital currency that enables instant payments t

Nov 17, 2022
GNU project's implementation of the standard C library(with Xuantie RISC-V CPU support).

GNU project's implementation of the standard C library(with Xuantie RISC-V CPU support).

Mar 17, 2022
A basic A* implementation showing how to use C++20 modules alongside UWP and C++/WinRT.

Introduction This is a port from an old application that was original written in a mix of C++14, Java and C++/CX. Originaly the goal was to use a simp

Nov 17, 2022