Jump to content

LRR remake project


miningmanna
 Share

Recommended Posts

3 hours ago, Erisdar_Skolir said:

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

https://github.com/ErisdarSkolir/LRR-remake/tree/entity_component_system_prototype

 

Credit to

https://github.com/adamgit/Entity-System-RDBMS-Beta--Java-

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 :)

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

large.441504374_FontsandCursors.PNG.5461a4f8f14513c6ceb92ea45bb0b33a.PNGlarge.Encoding.PNG.e5fb73daac150bfb1ca064e7ba2ed53d.PNG

 

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.

Link to comment
Share on other sites

  • 3 months later...

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

 

 

  • Like 2
Link to comment
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.

Link to comment
Share on other sites

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

https://www.youtube.com/watch?v=MHQlyC83g4o

 

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:

;#extern:<PATH_RELATIVE_TO_CONFIG>

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:

Game.Quit

Level.Pause

Level.Play

Level.Open(<NAME>)

 

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?)

  • Like 2
Link to comment
Share on other sites

  • Administrators
ShadowDraikana

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!

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

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

 

plans:

 

-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

end

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

 

lastly:

-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

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Good News: Im setup!

Bad News: I think HTML & Javascript https://github.com/Scarabol/rock-raiders-remake is the better approach.

I love Java and code Java for a living, but running the hole game inside the browser or even mobile is much more exiting to me.

 

Play at: http://rystills.github.io/rock-raiders-remake/

or latest development version at: https://scarabol.github.io/rock-raiders-remake/

 

It would be really great if you'd finish your project here, or even better join the dark (Javascript) side.

 

What do you think?

 

Best,

Scarabol

  • Like 2
Link to comment
Share on other sites

4 hours ago, Scarabol said:

<Snippity snippity snap>

Oh, you're using @risingstar64 existing HTML stuff? Seems you are, gauging by the links you've used. It's great to see you building on someone else's work!

 

It would be nice if I didn't have to upload the WADs: is there any point in that? :S Does mean I can throw my modded stuff into there though, but I wonder if your program will handle it correctly :P

 

I'm not sure why people keep sticking with the file format of LRR; while it is a file format and something to go off, there's no reason to use a .WAD instead of a .zip or something; or even to use Lego.cfg and instead split it up into Menu.cfg,, UnitsBuildingsVehiclesandStuff.cfg, Levels.cfg,  etc. The map format for LRR is very good and easy-to-use, but the .ae format is anything but - its interaction with the .cfg (or total lack thereof...) is annoying.

Not to mention that over half of us can't edit the model files :P

 

 

Nevertheless, it is very nice to see progress :)

 

EDIT: Actually threw the WADs in. Nice to see the vanilla loading screen with the loading bar :P pleasantly surprised to see it doesn't crash by Jet's foot (which is when the game will crash if there are missing colons or stuff in Lego.cfg). Pretty sure that it doesn't read much of the WADs though, given that the vanilla Power Station doesn't have two upgrade levels :P

 

I managed to break it... once by clicking on Frozen Frenzy when the game still showed the LevelPicker but thought it was in-game (Esc got me out of there); another time by interrupting some LRRs and ordering them to manually drill a wall. Hidden caverns also seem a little buggy, but that's because it's still very much a work in progress.

 

Also, a list of controls would be handy: it took me this long to realise ESC could quit a level, saving me from F5-ing the page for a new level...

 

It'll be really nice when you get all the sounds implemented as that adds a lot to the immersion!

 

I hope this goes really well! :)

Link to comment
Share on other sites

miningmanna

@Scarabol Thank you for your offer

I will work on in Java though. The idea is to have a proper game (maybe c would have been better). I dont really like games that run in browsers.
I see what you mean, about it being more portable in JS.
I think there will be a lot of work though to switch to JS.
All the loading must be converted to JS and the things you got up until this point are 2D, instead of 3D.

 

The final idea for this would be to have a runnable Jar file, which then just works out of the box.
It shouldnt be needed to compile it yourself, which takes the hassle of installing eclipse and setting up the build path for the project.
I think this approach is portable enough for most purposes. I dont anybody would like to play LRR on a mobile phone in any case.

 

Good work you did up until this point, the loading screen looks really nice.

 

 

@aidenpons I get what you mean with the Zip files. I could add support for them too, shouldnt be difficult, since i laid out the asset registration in a matter, that makes adding new file type a piece of cake. I really like the idea. This would make things a lot smaller.

As of converters: A simple LWO to OBJ converter should be easy enough. I can just export the vertices i use in OpenGL.
Im not quite sure about LWS files though... They are pretty simple for the most part though

Link to comment
Share on other sites

Hello everyone! Thanks for your replies.

 

@aidenpons

1) Loading different file formats is trivial on the HTML side, too. My focus is currently to get as close to the original game as possible, so we have a base to work with, before we start loosing the focus in modding and enhancing the game...

2) Loading the WAD files from an upload form has a big advantage for the loading time, since the files do not have to be downloaded. Also as you already noticed this opens the door for modding...

 

@miningmanna

Ok, keep going with Java, I think we can still support each other a bit. As you mentioned, you did an excellent job with loading and decoding the files.

Do you have fixed streaming hours? I'm curious about the coding livestream.

 

Best,

Scarabol

  • Like 2
Link to comment
Share on other sites

miningmanna

So some small updates:

I reworked the map rendering. It now uses a texture atlas, which gets generated by the supplied texture splits.
This optimizes the drawing of the map by A LOT.

 

Since  the last update in this topic. I made some changes to the config files.
It is now possible to add scripts, that get executed after the config got loaded. This will allow bulk changes to things.
As example, if you want to change all textures to the rock split. I use it in this video to make a non-intrusive change to the original config to add the trigger items to the level selection screen. This functionality was mainly used for this purpose. To reduce the amount of hardcoded parts of the game.

 

I also created a discord for more frequent updates. Mainly since I think, that I shouldnt spam in this topic, nor on the RRU discord:

https://discord.gg/hcSnyEK

 

The project is (since a while) also a lot easier to set up. This is thanks to the priorities.txt file and the AssetManager class, which makes specifying assets a lot easier.

It currently supports directories and WAD files. ZIP support will be added too.
The setup also got easier because of a pull request of @Erisdar_Skolir making the classpath of the project relative.

https://github.com/miningmanna/LRR-remake

  • Like 3
Link to comment
Share on other sites

  • 1 month later...

The Discord link is expired, could you update it? Also the level selection looks unbelievably good!

Link to comment
Share on other sites

  • Cyrem pinned this topic
  • 1 month later...
miningmanna

Update:
It has been some time since the last update, but I had some work to do for exams and held vacation.

I have taken a look at the savefiles and found out, which value determines, if a level has been completed or not.
Currently I am trying to figure out, what value has the score saved (which you can see in the levelpicker).
 

In general the savefile consists of 1 entry per level. This makes 33 entries in the savefile (tutorial levels count too)
each entry is 0x3190 bytes long. There is also a header with the length of 0xB0 bytes.

 

In each entry, at offset 0, there is an little endian 32 bit integer determining, if the level has been completed.

At offset 0x2FBA in the entry, there seems to be the value for the score shown in the levelpicker.
The value is however not a simple integer nor a float of some kind. I couldnt figure it out yet.

here is some of the values I have tested:

format:
bytes -> value ingame

BA 42 00 00 -> 93
00 42 00 00 -> 32
BA 00 00 00 -> 0
BA 41 00 00 -> 23
BA 40 00 00 -> 5
BA 3F 00 00 -> 1
FC 41 00 00 -> 31
FB 41 00 00 -> 31
EC 41 00 00 -> 29
FB 40 00 00 -> 7

I cant really see a system in it. I have tried looking at 32 bit floats and 16 bit floats

edit:
I took another look at it, and the score is saved as 32 bit little endian float.
I took a look at the wrong bytes though. Its the 2 first bytes in my tests and the 2 infront of it.

This means that the score is saved at the offset: 0x2FB8 for each entry.
 

@baraklava

discord link is fixed now

Link to comment
Share on other sites

 Share

×
×
  • 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.