FenPhoenix on 10/12/2018 at 05:23
The current thing I'm tackling is the maintenance of the FM list (looking in installed dirs and archive dirs and putting together a list, or updating the existing list properly if anything has changed). It's pretty boring work that doesn't make for an exciting update, but it's important to get it as robust as possible to minimize the chance of people running into problems - as they sometimes have with any loader - where it gets something not quite right and then they can't uninstall their FM or whatever else have you. This might sound simple, but it's actually rather tricky due to various things. Tech talk ahead:
In NewDark, when a loader goes to install a mission, it extracts the zip file to a folder in a particular location (specified in cam_mod.ini). So say your Thief folder is C:\Thief, and your FMs folder is C:\Thief\FMs, and you install "Super Great Mission Supreme v.1 Part 1.zip", its installed folder will be:
C:\Thief\FMs\Super_Great_Mission_Supreme_v_
Notice certain characters are replaced with underscores and the whole thing has been truncated to 30 characters. This is required by NewDark and this is really the crux of what makes things potentially tricky. And by the way, when I say "required", I mean the 30-character truncation is definitely required, and the character-replacement I'm not sure if or to what extent it's required, but FMSel and NewDarkLoader both do it (and they both replace different sets of characters, argh).
Another thing you'll notice is that the "Part 1" has been chopped off as part of the truncation. If you have another FM called "Super Great Mission Supreme v.1 Part 2.zip", that would also get truncated to "Super_Great_Mission_Supreme_v_", and now you've got an ambiguous install folder name. FMSel handles this by replacing the last characters of the name with "(n)" where n is a number beginning with 2 and incrementing by one thereafter until it has a unique name. FMSel also places an fmsel.inf file into every installed FM's folder, which specifies both the installed folder name and the original archive name. (Thank god for that, too, it makes things that much easier on me.) NewDarkLoader does neither of these things, so it can actually run into a situation where it overwrites an installed FM with another one that has the same name when truncated. Admittedly that's a fairly rare situation - in my 1098-mission test set, the situation occurs only once - but still, it's something I feel I should handle as best I can.
Of course, there will be fmsel.ini and NewDarkLoader.ini files for me to import, which should also help with sorting things out the way they should be. But, yeah, this stuff is just really difficult for me to keep straight in my head, so I'm probably overthinking it or something. But I've basically just been doing research, looking at code, and taking notes in preparation to make something fast and reliable. Oh yeah, and it's gotta be fast. The system I've got now is just looping through the the whole cache for every found mission, and it's really hilariously not good at all. It still starts up faster than NDL, but yeah.
It's also worth noting that not even FMSel is above error when it comes to this stuff. It does make a good attempt to be accurate, but it doesn't go mad with engineering prowess trying to handle every corner case. I've managed to break it by trying, but it's probably unlikely it would happen if you weren't trying, I guess. I'm probably going to take the same tack. I'll have AngelLoader handle any situation it reasonably can, but if things are really messed up I guess I'll just have to give up and offer some kind of fallback.
But once this mess is done and working well, I can move on to the fun and exciting stuff. How can you have any pudding if ye don't eat yer meat! and all that, eh wot.
PinkDot on 11/12/2018 at 23:14
Well done on the progress so far.
One feature request came to my mind - an option to downscale texture maps. It would be useful to all folks with lower spec machines, on FMs that are high res texture heavy.
There's no just one way of doing it, so giving a couple of options would be a good idea. Let's say:
- maximum acceptable size (default: 256) - this means don't touch textures equal or smaller than this size
- reduce size of bigger textures by: 2x, 4x, 8x...
- or down scale all the big ones to the maximum acceptable size (so any map bigger than let's say 256 - be it 1024 or 4096 - would be scaled down to 256)
FenPhoenix on 12/12/2018 at 03:37
Quote Posted by "PinkDot"
One feature request came to my mind - an option to downscale texture maps. It would be useful to all folks with lower spec machines, on FMs that are high res texture heavy.
There's no just one way of doing it, so giving a couple of options would be a good idea. Let's say:
- maximum acceptable size (default: 256) - this means don't touch textures equal or smaller than this size
- reduce size of bigger textures by: 2x, 4x, 8x...
- or down scale all the big ones to the maximum acceptable size (so any map bigger than let's say 256 - be it 1024 or 4096 - would be scaled down to 256)
I've added it to the list of things to look into.
I've finally managed to figure out and implement a fast way to handle the FM archive/installed/ini-list stuff. Now I can leave it be for now and move on to something more interesting and uh... easier.
Marzec on 12/12/2018 at 16:02
Very cool project, I really like it!
Do you consider a feature of missions rating? ;) If yes, do you plan any kind of FM selector ratings import/export?
FenPhoenix on 13/12/2018 at 10:00
I plan to allow importing from other loaders to the extent feasible.
Also:
[video=youtube;q2B3kGwFKjY]https://www.youtube.com/watch?v=q2B3kGwFKjY[/video]
R Soul on 14/12/2018 at 23:02
I have no problem with the performance of NewDarkLoader being compared to AngelLoader (or any other program), but the ironically cheerful music seems rather dismissive, as does your comment that NDL "doesn't even" get all of the titles. You've taken a similar approach to GarrettLoader, but you should remember that these are more than just programs; they represent a lot of time and effort.
Of course the reason for that is to make a program that lets people play FMs, and it's the nature of software that it sometimes gets replaced. If someone else writes a new program that improves on the existing ones then that's clearly a good thing, so I hope it goes well.
FenPhoenix on 19/12/2018 at 17:54
I make a mighty effort to pretend I'm not an asshole, but sometimes it comes through. :erg:
Twist on 19/12/2018 at 20:43
Well I didn't take it as dismissive. I thought you were just being silly and playful. But I don't have the same time and emotional investment in developing NewDarkLoader, so I don't begrudge R Soul's response, either.
Don't let this suppress your enthusiasm, Fen. I think many of us took those parts of your video as you just being playful and we're eager to see the results of your labor.
I really appreciate all the time and effort R Soul put into his loader. I've been using it extensively and exclusively for a couple of years now. But I also appreciate some of the new, interesting ideas Fen's bringing to his loader. It's all good.
Twist on 3/1/2019 at 17:30
A couple of updates:
First, one from a couple weeks ago, which includes an apology, an explanation and some sincere gratitude to R Soul and NewDarkLoader.
He also shows some nice features, like the ability to choose to have separate tabs for the missions from different games, or have all missions from all games in one filterable or sortable list. Neat!
[video=youtube;tykdRMRn5Y4]https://www.youtube.com/watch?v=tykdRMRn5Y4[/video]
And then this one from a couple days ago, where he shows some nice new features, like tags and the larger comment text field (yay!):
[video=youtube;xoCJSyH6kRg]https://www.youtube.com/watch?v=xoCJSyH6kRg[/video]
SirLord Best on 5/1/2019 at 20:02
Got to say this is shaping up to be my new go to FM Loader when this gets released! Good luck with this Fen!:thumb: