Jump to content

LRR remake project

Recommended Posts

3 hours ago, Erisdar_Skolir said:

I realize my last post was a little ambiguous, so example time.



Credit to


for the entity manager code.


I partial refactored an ECS system into a fork of your project as it stands on github. I have lws animations working, but I didn't mess around with too much else.

A lot more could be optimize/organized, especially in the loader classes, but this was just a small example of how an ECS system could better organize this project.

Also recognize it isn't a complete ECS example because logic still exists within the components, but that is just due to me not wanting to completely refactor data classes such as the LwsAnimation file. A real implementation would change those files to just be structs (or as close to structs as you can get in java) and move all the logic into factory/loader classes and systems.


If you think it is worth looking into I can work on making a prototype engine to demonstrate scripting, better entity creation, multi-threading, etc. that an ECS would allow. Though I am definitely not touching those file formats. They scare me.


I'd be happy to see a little prototype, since I am a little bit unsure how to structure the final game. If it works well, I will defenitly add it to the project, and if you are interested, you can work on it. I feel more comfortable in the more "data-near" (loading files, transforming meshes, etc.) parts :)

Share this post

Link to post
Share on other sites

I have a little announcment to make, if anyone is interested, I will be streaming today whilst continuing the project. That would be on twitch, with the same username.


I had to make a little bit of a pause, since the size got out of hand.


Edit: I have stopped the stream now. I will do this more often.


I got the cursor animations loaded, and applied, though not to the cursor, but to the map mesh.

I will fix the cursor tomorrow. probably around the same time

Share this post

Link to post
Share on other sites

So, today i got the Fonts done (the cursors are done aswell).

And I came across a problem.


The fonts obviusly have some kind of encoding, and I cant seem to find the right one...

I am currently using Cp850 with an offset of 32, which works for all characters except: ÄäÖöÜü and etc.



Does anyone have an idea, what the encoding could be?

I tried looking at some different ones, but I couldnt find one, that fits perfectly.


Elsewise I will convert it to the right encoding myself, but that would be kind of tedius, since there arent many references to look at.

Share this post

Link to post
Share on other sites

Okay, it has been a while, but Im getting back to it.


After some thought, I think I tackled too many problems at once.

Not having any structure over the project didnt help either, but I am making some sketching.


By looking at the config file, I realised, they must have implemented each screen seperate, since there isnt a uniform way of describing the used assets in the config file

As example:


The word wallpaper is only used once in the config file for describing the background image of the result screen. Its never used again, I think i will need to implement each "scene" separately.


I am live streaming this. If you feel like helping out or just watching, join in: https://www.twitch.tv/miningmanna

Edit: stream is over


Ive got some more structure to the whole project, and I will at least make the main menu during this week, which probably means, that a lot of menus will work. The result screen is special, but most of the menus arent.


Stay tuned



Share this post

Link to post
Share on other sites

Welcome back! I'm pretty glad that you're still working on this project; I can't wait to see more progress on this.

I'm not somebody who's all that technical, although trying to get a basic structure for it, like you said, is very crucial.

Share this post

Link to post
Share on other sites

The main menu is pretty much done. There are still some small bugs, but those can be fixed.



Next plan is to make a method of doing the Trigger menu items. For anyone not knowing what that is:

The Trigger items of a menu pretty much are things the menu can do which doesnt equal to navigation in the menu or changing values (like volume sliders)

An example of an trigger item is the "Yes" button when you exit the game. It is supposed to trigger the game to quit. Some others are the "Credits" button, which then starts the credit sequence, etc....


So the plan would be to make some basic functions, which can be triggered with a setting in an extra config file.

Before I get into more details about these functions, I added a way of splitting the config file into multiple files. This also means you can add custom values to the config via an external file. The only thing left to do would be to include a comment with this syntax:


This would mean, if youd like you could remove the section "Lego*/Levels" into a different file. This works recursivly if you like to do so, adding more possibilities to structure mods and make the config more readable.


Now to the functions:

There would be a set of basic functions. As example:






and so on. These can then be used in your custom menus which you can add. In the original game, these seem to be hardcoded.

If you have any suggestions for some functions, I'd like to hear them :)

(Maybe some way of triggering scripts?)

Share this post

Link to post
Share on other sites
Slimy Slug

Splitting the config into multiple files?  I very much like this idea and it would make things a lot easier to handle.  Dividing up the Stats {} and Sounds {} sections into separate config files would make organizing/finding things much less of a pain.


Custom Menus?  Already a big step up from the original game.  This opens up possibilities for things such as an actual Options menu in the front end (that is, if you allow for calling the in-level options here).


Very excited to see how this progresses; keep up the awesome work!

Share this post

Link to post
Share on other sites

So I got some stuff done:


-TriggerItems can get their function assigned via Lego*/Triggers where you put the path to the TriggerItem with : and define their function (for now only exit)
-The MapMesh is reimplemented. A bit more structured this time

-Cursor is able to select a tile (not really select but the tile under the cursor gets highlighted to test the ray-mesh intersecting) (https://www.youtube.com/watch?v=WZvtmtvVuOw)

-The Main-menu overlays have a random delay inbetween



-The rock animation for the menu transitions has been added

-The initial cave in the dugg map gets "expanded" to have a 1 tile wide border of any cliff type, meaning that it will add every neighbour tile until it has a 1 thick border




-Being able to modify the map and update the mesh accordingly

-Improving the cursor tile highlighting. It currently is a bit iffy. It works but sometimes it doesnt feel like it. Note that i implemented that today. There is probably a better way of doing this. Currently it uses a parametric description of a plane and the ray from the cursor to set up 3 equations (for each component: x,y,z) and solves the system with gaussian elemination.

-Ingame menu (building menu, etc.)

-NERP to lua compatibility. I already have a way of compiling the nerp files to lua. Basically it reuses the function names. I will make a lua file which then binds the function to the new alternative function. Example:

GetEnergyCrystalsStored (nerp) -> function GetEnergyCrystalsStored

GetEnergyCrystalsStored is then defined as:

function GetEnergyCrystalsStored()

  return base.crystals


regarding registers. They will use global lua variables. So everything should work like intended after compiling to lua



-A solid loading system. The idea will be that it first tries to get the assets from the following places. The last with the overrides the ones coming before it:

    * WAD files "LegoRRx". Larger x overrides lower x

    * "Data" folder

    * "LegoRRx" folders. Same order as the WADs.


It might be a good idea to switch around "Data" and "LegoRRx" folders, but that should be an easy fix, as soon as its done

Share this post

Link to post
Share on other sites

Cool project! Just forked and hopefully have some time soon to join development.




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.