Giter Club home page Giter Club logo

Comments (7)

arandomguysomewhere avatar arandomguysomewhere commented on June 8, 2024 2

After testing I can confirm the post-game launch crashes do not occur when NOT using dgvoodoo2 so although launching the game can be finnicky, once it runs it is mostly smooth but there are weird moments where the camera would suddenly snap to one side of the screen unintentionally after some movement, don't know if a pre-existing bug or not. Windows compatibility fixes do nothing to improve the situation. As of right now the most stable way of playing the game under Windows 10 64-bit is to run it at 1024x768 without dgvoodoo2 sadly. @ThirteenAG Please consider making a patch for this game, it seems to be an amateur lithtech game so might be simpler than larger scale productions :)

from widescreenfixespack.

alphayellow1 avatar alphayellow1 commented on June 8, 2024 1

Nice! Would you mind sharing your modifications? If only the HUD is stretched that's already good progress and could help get to the overall fix more easily.

Well, I can but it's a long one, hope you can follow it. This is for 16:9 though, I can say how to do for other aspect ratios, consider this as a temporary fix while ThirteenAG doesn't do a dedicated patch. Here it goes:

  1. Open lithtech.exe with OllyDbg (extract OllyDbg 2.01 from here to some folder (like Documents) and open ollydbg.exe with admin rights).
  2. After importing the exe in OllyDbg and it's fully opened, press Ctrl+G, and write 0040BD86, then press Enter.
  3. Press space and write this: "JMP 004C3B00" (without quotes).
  4. Press Enter.
  5. Then press Ctrl+G again, and type this: "004C3B00" (without quotes).
  6. Press space and write this: "MOV EAX,3FED631A" (without quotes).
  7. Press Enter.
  8. Delete the "DB 00" and write this: "MOV DWORD PTR DS:[ECX+00000198],EAX" (without quotes).
  9. Press Enter again.
  10. Delete the "DB 00" again and write: "JMP 0040BD8C" (without quotes).
  11. Press Enter.
  12. In the main window, right click "Edit>Copy all modifications to executable".
  13. Then in the small window that appears, right click on it, and click in "Save file".
  14. Save with a different name from the original exe (like lithtech(2).exe) and backup the original exe, then rename the modified executable to lithtech.exe.
  15. You're done for 16:9.
  16. To change the FOV for other aspect ratios in the modified exe, just open the modified lithtech.exe in a hex editor like HxD (download it here), then press Ctrl+G and write "000C3B00" (without quotes).
  17. The next 4 pairs of values where the cursor lands is the horizontal FOV value (in radians).
  18. Highlight those and go to the right side in the "Data inspector" tab and change the value in the "Single (float32)" row.
  19. You'll need a degrees to radians converter like this one.
  20. Put the desired FOV value in the degrees tab and press "Convert".
  21. Then copy the last result in the "Radians result:" box.
  22. Go back to HxD and paste it in that row above [Single (float32)].
  23. Press Enter and the save the file. Your new horizontal FOV will be permanently saved.

from widescreenfixespack.

alphayellow1 avatar alphayellow1 commented on June 8, 2024

I managed to do it by altering one instruction in lithtech.exe, and it's responsible for the horizontal FOV. Using 800x600 ingame and forcing to 1080p in dgVoodoo2 leads to Hor+ gameplay and stretched HUD and menus. But like you said, changing the resolution to more than a certain value leads to cropped menus and HUD, which makes it unplayable. So for now, that's what I managed to do, keep the ingame resolution at 800x600 and forcing native res in dgV2. Maybe ThirteenAG is able to investigate further into the engine, and fix the HUD placement for 16:9 and wider resolutions, and also why it crashes beyond a certain resolution threshold and also during level loading screens.

LithTech Screenshot 2024 03 30 - 16 02 52 02

LithTech Screenshot 2024 03 30 - 16 04 45 62

from widescreenfixespack.

arandomguysomewhere avatar arandomguysomewhere commented on June 8, 2024

Nice! Would you mind sharing your modifications? If only the HUD is stretched that's already good progress and could help get to the overall fix more easily.

from widescreenfixespack.

arandomguysomewhere avatar arandomguysomewhere commented on June 8, 2024

Thanks! I tried this out and my modified lithtech.exe has CRC32 as 9adda7e6, does it match your modifications? In OllyDbg I had to disable "Keep size" and "Fill rest with NOPs" in the assemble window (after pressing space) for the rest of the instructions to work. I found the FOV set to be fine for 16x9, were the instructions for changing the FOV optional? I have a rudimentary understanding of this so sorry if this sounds dumb but does this modification jump from one resolution change setting to force setting an FOV value in the exe?

After testing, the game looks way better with dgvoodoo upresing the resolution but the pre-existing crashes both on startup (I have to run launchme.bat several times for the game to even start) and during level loading (sometimes loading a save, sometimes during level transition) get in the way of autosaves kicking in, blocking progression. This game has rough compatibility on modern systems.

from widescreenfixespack.

alphayellow1 avatar alphayellow1 commented on June 8, 2024

Thanks! I tried this out and my modified lithtech.exe has CRC32 as 9adda7e6, does it match your modifications? In OllyDbg I had to disable "Keep size" and "Fill rest with NOPs" in the assemble window (after pressing space) for the rest of the instructions to work. I found the FOV set to be fine for 16x9, were the instructions for changing the FOV optional? I have a rudimentary understanding of this so sorry if this sounds dumb but does this modification jump from one resolution change setting to force setting an FOV value in the exe?

After testing, the game looks way better with dgvoodoo upresing the resolution but the pre-existing crashes both on startup (I have to run launchme.bat several times for the game to even start) and during level loading (sometimes loading a save, sometimes during level transition) get in the way of autosaves kicking in, blocking progression. This game has rough compatibility on modern systems.

No, your modified file's checksum doesn't match my file's one, but you should be fine. And yes, I forgot about saying to check "Fill the rest with NOPs" and uncheck "Keep size" in the assembling window, important ones! And this tinkering in OllyDbg only changes horizontal FOV, nothing else. And no, this modification only changes the value that is passed to the address with the custom one that we added in the codecave, instead of the default value. And yeah, unfortunately, this does not fix the constant crashing during level loading or startup, that would require a much deeper dive into the engine's files, which I don't have the knowledge to do. Does this constant crashing happen even on older Windows versions like XP, Vista or 7?

from widescreenfixespack.

arandomguysomewhere avatar arandomguysomewhere commented on June 8, 2024

I tested the game on Windows 10 64-bit and had the crashes, on an XP VM it crashes too but that might just be a VirtualBox limitation as its in-built GPU support is very basic. I'll try again with some compatibility settings and such.

from widescreenfixespack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.