SamuZai
Rose
Rose

patreon


Manhunt 2 widescreen and wider solution

Phew. Another long read ahead, but you'll understand why if you get to the end! If not, here is a link to the solution (mirrored here)!

About a week ago, someone on the WSGF Discord requested a solution for Manhunt 2.

I was a big fan of the original back in the day but I have not played through the second game and could not find any ways to buy it. Back then, in the absence of straightforward ways to buy games, I did not mind pirating them, but even then finding a copy was problematic.

However, my interest in fixing the game now was driven purely by the request - or so I think, and there was something subconscious! I got access to a proper Amazon copy and began to work!

At first it was refreshing to look at another old game with its pros and cons in terms of the code. There were fewer simultaneous operations but it was harder to walk through the values given the heavy use of the FPU registers. Then another problem arose.

As I walked through the code over a couple of days, I struggled to understand the calculations that did not rely on any apparent aspect ratio. There was a check against 1.78 that was easy to remove, but it did not solve the native issue of the game stretching at anything from 16:9 to wider. I had multiple questions. What was the native aspect ratio? What kind of aspect ratios the developers had in mind when they released the game?

I had to look up the most common aspect ratios around the years of 2007 and 2009., however, nothing like 1.33 was reflected in the game. Beyond the code, I also examined the game files to find that the cutscenes were in 640x480 (more on this later). So I was set on the idea of 1.33 being a point of reference, although not entirely convinced.

After having found a way to force the game to maintain a ratio without stretching, I also had to find a way to fix the field of view, which again needed a reference point. I even installed the original Manhunt and checked ThirteenAG's fix to possibly get a better understanding of the concepts. There was nothing of help but the fact that the original Manhunt did have some of the same values. Over a series of values, they seemed to boil down to an aspect ratio of 1.28. It got me thinking that perhaps those were just remnants of the old code in Manhunt 2, because it did not look like any real ratio someone would play at then. So I continued to pursue parity with 1.33 with some doubts in mind. Did I say I had also looked for and watched multiple videos of the game from around its year of release? Well, I had, as I measured them and even downloaded one, and those pointed at the likes of 1.33 and 1.78, though I knew for a fact that the latter was slightly squeezed compared to 4:3, although hor+.

Solving the aforementioned issues took a few days and then I found that the rendered cutscenes were natively vert- and the FMVs were stretched. Could you imagine? There were three different scaling behaviors at play. For example, at 16:9, the gameplay view would be a bit distorted but playable (going by the YouTube videos, most people don't notice), the rendered cutscenes would be vert- and the pre-rendered cutscenes would be perfectly adapted to that aspect ratio. Thankfully, my FOV fix implementation composed of multiple parts and novel calculations, addressed the matter of the rendered cutscenes as well.

After having tested the fix for a while, I packaged it and was preparing to release it. Then it hit me that it wouldn't hurt to address the stretching of the pre-rendered cutscenes as well. That led me to another problem with the game. As I mentioned earlier, the videos were technically in 4:3 but clearly intended to be played at 16:9, as there was some native distortion. This was addressed by the developers by the addition of letterboxing at 4:3.

After nearly a week on the solution for hours each day, I had to dive deep into the code and the calculations again, though I still couldn't let go of doubts - if this is a 4:3 game, where's the 4:3 and where do the checks against 16:9 come from? Still, I knew that the cutscenes had to be displayed in 16:9, so I reached a way to force them to be constrained to 16:9 with no stretching. Sadly, the image was aligned to the left like in my Death Standing fix, with no offset values in sight. As a result, I almost gave up and released the fix without this part, hoping to just recommend watching the cutscenes on YouTube if concerned, but then I persisted.

From hours of inspecting the code over that day, I finally found a way to push the image to the center of the screen, but as it goes, it had to involve relatively complex calculations to place each element, making the totality of this fix one of my most complex of all time. That's just on the code and the calculations, not to mention the fully dynamic scaling for any aspect ratio and the real-time FOV changer.

Was it worth it just to help one person and for a game that cannot be bought? The notes I had to write down, the countless times I opened Calculator, the videos I watched, the brainstorming, the experimenting at numerous resolutions, the assembly reading and writing would strongly suggest otherwise, but you know that it's how I feel in the moment, then comes the relief of having it done and out. It was definitely a welcome break from the more usual routine of familiar engines and modern approaches. Let's hope it won't stop at just a handful of downloads!

PS I'm attaching the trainer to this post so that you can have it while the person who had requested it gets to test it before the public release. I'll update the post with a public link soon.

Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution Manhunt 2 widescreen and wider solution

More Creators