Dolphin, the GameCube and Wii emulator - Forums

Full Version: [GC] 007: Nightfire
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Wiki Page - 007: Nightfire - [edit]

I'm having huge issues running certain mission of this game. Most mission work really well and run decently at my settings and my system (only driving missions fail to hit 100% speed at 60 most of the time). But some will just not start at all but rather freeze during loading.


This affects the following missions:
- The Exchange when trying to enter the party
- Double Cross
- Chain Reaction
So I just started a Double Cross mission, and noticed that I can't hit things five feet away from me. Turns out my crosshair misalligns with where the bullets go. Namely they go a bit to the right where my crosshair is. Tried playing with different resolutions and widescreen on and off, problem still persists.
What could be dopne about it?
(11-10-2019, 02:55 PM)GaroK Wrote: [ -> ]So I just started a Double Cross mission, and noticed that I can't hit things five feet away from me. Turns out my crosshair misalligns with where the bullets go. Namely they go a bit to the right where my crosshair is. Tried playing with different resolutions and widescreen on and off, problem still persists.
What could be dopne about it?

disable anisotropic filtering and anti aliasing
I have solved the problem of white screen in place of videos.
I'm using Lutris on Linux but the procedure should be the same on Windows.

Winetricks would force-close and fail installing Indeo video codecs so I had to look for another solution, and I found it!

I downloaded ffmpeg (Windows version), put it in <nightfire-wine-prefix>/drive_c folder.
I then opened Wine console (Windows command prompt) and entered the following command; set PATH=%PATH%;C:\ffmpeg\bin

That's it. The videos work, The playback isn't slow. It works flawlessly.

Oh, and to fix the FPS drop in menu (mine slowed down when I entered settings), simply add the WINEDEBUG=-d3d environment variable and that problem., too, has been solved.
The gameplay is flawless now.

I'm using the version with the unofficial patch, and I patched it simply by copying all the files from the Data folder, since the installer wouldn't work.
(05-08-2023, 03:48 AM)Vjb Wrote: [ -> ]I have solved the problem of white screen in place of videos.
I'm using Lutris on Linux but the procedure should be the same on Windows.

Winetricks would force-close and fail installing Indeo video codecs so I had to look for another solution, and I found it!

I downloaded ffmpeg (Windows version), put it in <nightfire-wine-prefix>/drive_c folder.
I then opened Wine console (Windows command prompt) and entered the following command; set PATH=%PATH%;C:\ffmpeg\bin

That's it. The videos work, The playback isn't slow. It works flawlessly.

Oh, and to fix the FPS drop in menu (mine slowed down when I entered settings), simply add the WINEDEBUG=-d3d environment variable and that problem., too, has been solved.
The gameplay is flawless now.

I'm using the version with the unofficial patch, and I patched it simply by copying all the files from the Data folder, since the installer wouldn't work.

What you're saying doesn't really make sense in the context of Dolphin. Are you talking about the PC version of Nightfire?
(05-08-2023, 04:11 AM)JosJuice Wrote: [ -> ]What you're saying doesn't really make sense in the context of Dolphin. Are you talking about the PC version of Nightfire?

Yes. It's the Windows version of the game. I found the CD images on an abandonware site (two CD images in .mdf and .mds format placed in a ZIP archive if memory serves right). I mounted them using gCDemu. But I couldn't install it - it woulf constantly ask for CD 2 even though it's the same mount point. Up until now, I would use Brasero to create one ISO image - I would simply copy the contents of the multipart images into a folder and add them all to Brasero and create an ISO image. It worked every time.

However, with Nightfire, it would for some reason omit some folders and files, and it complained that the folders were too nested. While installing Nightfire through Lutris, it would eventually report that it couldn't read some file and the installation would fail. So then I found the portable ISO making tool natively supporting Ubuntu that did the job - Folder2Iso. You simply enter the folder though terminal and execute the ./Folder2Iso command and it launches the GUI - pretty simple. And there's the choice to make it executable systemwide through terminal by running the sudo ln -s [path-to-Folder2Iso]/Folder2Iso /usr/bin which creates a symlink in the folder where Ubuntu calls on binaries and their commands systemwide.
So I mounted the two CD images, dumped their contents into a folder, launched Folder2Iso, selected that folder as well as the destination directory and ISO image name, mounted it through gCDemu and it installed without any issues.

I succesfully applied the official 1.1 patch. However, when I tried to launch it, it exited with error 256. I then trief installing the unofficial patch, but the installer needed the game's exe to be launched in order to apply the patch. I installed the game in the Games/Nightfire folder.
I deleted the wine virtual drive, but this time, instead of letting the installer create the Games/Nightfire folder, I waited untip Lutris created the Wine prefix and launchef the setup. I then manually created the Games/Nightfire folder and chose it as the install destination. This fixed the error code 256.
I then tried launching the game first (Bond.exe) and then the patcher, but all it would do is say it's waitin for the game to be launched. I then trief launching the patcher first then the game, but it again didn't detect that the game was running and thus couldn't detect the game directory.

And the game would stall when launcher at the same time as the patcher.

Now what's important to know is that Lutris has two ways to launch an EXE - normally through declaring it's location in the configurator, or by choosing to launch an EXE inside the Wine prefix. The second method works most of the time (after all, launching the 1.1 patcher that way still let it detect the game dir), but in some cases it makes programs fail to detect the correct targets - it is most prevalent in modding applications that modify the game executables in some way, and they would fail to detect the target executable, even when it's in the same folder as it's target. And the workaround for that is to declare the modding EXE as the game's executable in configurator, launch it like you would launch the game, and finally the program would detect the targeted files/folders succesfully and do its magic.

So I tried to kill two birds with one stone and created a .bat batch file that would launch both programs at the same time. I declared that file as the game's executable in settings and launched it that way - it launched the programs with these commands:

start [game-executable]
start [patcher-executable]

The batch file is useful in some cases, such as launching both the game and the game's trainer at the same time.

But even with this method the game would freeze when launched at the same time as the patcher. It would freeze no matter what EXE was callef first with the start command, and patcher would fruitlessly wait to detect the game running. And to add salt to the wound, the game would play choppy sounds, indicating it was launched, and yup, the patcher would still wait.

Keep in mind that I placed the patcher in the same directory as the game.

So I opened the Data folder bundled with the patcher to inspect it, and noticed that it has the same folder and EXE names as the game itself. So I simply copied the contents of the Data folder into the game's folder, launched the game, and it worked flawlessly. It turns out that the patcher EXE is competely unnecessary, is slower than simpy copying everything, is needlessly complicated, and can't read the game's install folder that the game reports in the registry, something which the official 1.1 patcher detected successfully and patcher the game with no fuss, while the unofficial patcher relies on the iffy and (as it turns out in the case of Wine's frontend Lutris) not very reliable in every case. It's completely superflous, needlessly complicated, and takes noticably mote time to patch the game, relying on you to launch the game so it can detect the correct folder, and then you need to exit the game. This takes time, waiting for the patcher to launch, waiting for the game to launch, ALT-tabbing out of the game to use the patcher, and then exiting the game. Compared to simply copying the contents, and to the official patcher that launcher fast, does it's job quickly, efficiently and with a much lower computer resource usage than the method used to apply the unofficial patch, I'm inclined to think that the unreliable patcher is simpy badly programmed and designed. They could have simpy read the registry or even ask you to specify the game's dir, but no, they settled for the needlessly complicated and slow method of relying on the game's executable to detect the dir. Which DOESN'T WORK WITH LUTRIS! Yeah, I get that it must be some kind of impressive achievement to patch the game using that particular method, but in this case simpler is better, and more technically complex and more impressive in the way that they pulled it off resulted in a worse result. Hell, they could've simply include a .bat file that asks you to type in the whole directory and it still would be much more reliable and efficient. Yes, I'm actially impressed how they breathed new life in such an old game and added some impressive features, including auto-patching and allowing you to specify command prefixes through the launcher instead of a shortcut, but I am inclinef to think they wanted to show off how inventive they are in using that unique way of patching the game, thinking it's so advanced and inventive. The only advantage that methof has over the 1.1 patcher is if you downloaded the ripped version without an installer, and this method would allow you to patch the game that has no installer and doesn't report in registry it's location, and where the official patcher would fail in that case, this method would work due to uniquely relying on detecting the game's executable instead of the reported location in registry.

Even so, it's still much simpler and faster to just copy everything yourself. So save yourself the time and simpy copy everything from the Data folder into the game's folder. The time spent entering the unofficial folder's location, selecting everything, marking everything as ready to copy, and then navigating to the game's folder and then pasting everything the old-fashioned way is still faster than relying on the patcher. And it works all the time. And both Lutris and PlayOnLinux (both excellent Wine frontends with differing strengths and weaknesses, so I keep both installed) have the option of opening the file explorer and taking you to the location of the Wine prefix in one simple click, thuy saving you some time.

In total, I spent over 5 hours getting the game to work properly in Lutris, constantly deleting and creating the Wine prefix. With Brasero failing to put every file and folder into the ISO, making me see the file loading error more times than I can count, trying to find a working ISO creator, the game installer failing to recognize the second CD even though it's the same mount point, having the game refusing to launch with error code 256, then repeatedly trying to get the unofficial patcher to work, and then, once succesfully installing the game and figuring out I can simply copy the unofficial patch files, I finally got the game to launch with the most up-to-date patches and features. I should've been happy, but no - now I had two problems. One - when I entered the game's configuration menu, the game would slow to a crawl and FPS would drop massively, so it took patience to configure everything.

I tried to remedy the slowdown with dgVoodoo and WineD3D, but dgVoodoo would force close evety time I enteref configutation or started the campaign, while WineD3D had no effect. I tried turning off DXVK to no effect.

Then I launched the campaign. I was badly shocked by the next scene - a completely white screen with no sound. But the game loaded and there was no slowdown. As I said, I should've been happy - it only slowed when configuring and the game itself worker. But I was bored, determined and on my fun weekend, and getting things to work flawlessly is what I can't resist at all. I knew that I had lost so much time getting it to work that much but I didn't care.

So I went to the Internet for solutions. Nothing worked - videos still didn't play. And I eventually found out it's because of VP6 codecs. I tried many sites on how to install Indeo codecs, but Winetricks always exited with errors - I couldn't get Indeo codecs to install. And simply launching the installer won't work - among other things, Wine required DLL overrides to load them properly, and installers don't declare them. You have to declare every DLL that you add with a Native load order - the only program that doesn't need it is nGlide. I tried the Indeo installer, using Winetricks to install every codec that doesn't force-close it, I even tried looking for DLL overrides but no dice. And the Indeo installer doesn't tell you where it puts its files, and sorting files by date does nothing, while extracting the installer tells you nothing.

So I looked deeper into VP6 codecs, and by sheer dumb luck, I stumbled onto ffmpeg, and luckily, these codecs are actually precompiled binaries that you can link to a path variable, as well as find if they contain any DLLs for overrides. It took me only minutes to find that you need to declare a Windows environment path variable - so close! I needed to find a way to declare it that didn't involve and Microsoft's GUI tool, since I'm hesitant to think Wine provides such a tool. But what it does provide it a Windows-capable command prompt. Plus Winetricks can install MS's original CMD. And since Terminal on Ubuntu can do anything a prettiet graphical tool can do and more, the same must be true for Windows's command prompt. And I was right, as you can attest by my previous post. Plus declaring a path variable to ffmpeg's binary/bin folder is much simpler and easier to do than with Ubuntu's terminap, with only one command that works is memorized by the system as opposed to several.

So I took that as a win - videos finally worked without slowdown. And I was finally ready to call it a day, considering that the slowdown appears just in configuration menu that you in most cases visit once while the rest of the game works, I accidentally sumbled on WineHQ'a article on the game and zhe ginal solution - I finally stimbled on the final piece of the puzzle and the last obstacle to the game working flawlessly - eliminating the massive FPS drops in configuration menu. Just one simple environment variable is all that's needed. And it works.

Final result? A game that works flawlessly, with no difference than running it natively on Windows.

Was it worth it? You can bet it was!

And now you and anyone else can get to have the easy-to-follow solutions in one place and fix it right away. And I'd call that another win. And yes, while a special "Windows 10 compatibility version" with an installer from [REDACTED] worked, and the rip from abandonware worked immediately, keeping them installed over the genuine unalteref article would be admitting defeat and it's nowhere close to satisfying - trust me, the whole time I'm playing an unaltered game, I thoroughly enjoy every second of it - the altered ripped versione, apart from GOG of course - just aren't "there". At leasz, it's that way for me.

Oh and sorry for the wall of text, but I felt this had to be shared. And also, I gauged you were curious about what it took and if it really is indistinguishable, performance and feature-wise, from playing it on Windows.
(05-08-2023, 10:35 AM)Vjb Wrote: [ -> ]I found the CD images on an abandonware site (two CD images in .mdf and .mds format placed in a ZIP archive if memory serves right).

Sorry, but it being abandonware doesn't make it legal to download. Banned for game piracy.

Also, I do need to point out that these forums are for Dolphin specifically. Not that talking about other things is a bannable offense or anything, but I don't think you're going to find many other people here who are interested in talking about the PC versions of games.