Novahq.net Forum

Novahq.net Forum (https://novahq.net/forum/index.php)
-   Delta Force (https://novahq.net/forum/forumdisplay.php?f=101)
-   -   [DF2] OpenGL patches for DF1 / DF2 (https://novahq.net/forum/showthread.php?t=51491)

Verok 10-03-2020 02:21 AM

OpenGL patches for DF1 / DF2
 
Hi everyone, I'm new member here. I've made graphc patch for Dela Force 1 & 2, which replaces legacy DirectDraw by OpenGL for modern OSs. It fixes several window issues in windowed mode and also adds widescreen support for both games. So no more graphics compability modes are needed.

Patch is working only with latest versions of the games. So make sure you have the latest one by updating your game via Novalogic Update Wizzard.

Fixes & features:
  • Propper launching on Windows 8/8.1/10
  • Games render via OpenGL
  • Games can now easily switch into windowed/fullscreen mode
  • Mouse is working in gameplay with windowed mode
  • Game window is resizable in windowed mode
  • 1024x768 screen resolution can now be selected in settings menu, or via 'V' key in gameplay mode
  • Propper image aspect ratio for widescreen monitors
  • Added fixes from the NovaHQ website (Lobby fix / Voice Over Network fix / Startup.htm)
  • Removed CD check
  • Packages include original intro movies, this is helpful for playing without CD or GOG release, which doesn't have intro for DF1

Examples:
Some widescreen examples

https://i.ibb.co/XSx4JGD/df1-02-small.jpg https://i.ibb.co/j4k8cLY/df2-02-small.jpg



Donwloads:
7zip SFX archives. Just run and extract it to your game folder
More info:
You might check my blog here for more info


P.S. Hope this patch will be helpful for DF fans

Scott 10-05-2020 07:51 AM

Well done! I'll add these patches to the downloads area as well. Thanks!

Steve 10-05-2020 11:57 AM

Thanks for the effort in making these Verok :gj:

Verok 10-06-2020 05:59 AM

Thanks Scott. It will be great

Thanks Steve for your comment on YouTube :gj:

cambreaKer 10-06-2020 12:28 PM

woah! that's awesome! definitely will replay the classic games with this!

cambreaKer 10-06-2020 12:32 PM

also i noticed something, the link for df1gl downloads df2gl and df2gl link downloads df1gl so you might want to fix that :)

cambreaKer 10-06-2020 01:11 PM

made a steam guide for your patch so that more people will know about it :) https://steamcommunity.com/sharedfil...?id=2250049648

Verok 10-06-2020 11:56 PM

Tahnk you cambreaKer. I've fixed tihs on my blog, but I think I can't edit post here. So if someone can edit it, please do it.

Scott 10-07-2020 07:55 AM

I fixed the links for you

hunterz 10-07-2020 06:05 PM

Hey Verok, I'm DUZ on Youtube. Again: Good job!

I will continue to point out some things here:
1. If you could unlock more than 60 FPS, would be awesome. Even with 60 hertz in your monitor you'll feel it a lot smoother. It happens in CSGO where I currently work as pro coach (ex player). And it would make things even better for who has 144 or 240hz monitors, like me and others.

2. You said in YT that the biggest problem atm to increase the voxels subdivisions is the memory, which is a known thing also reported by Scott and other community members. I really hope you achieve that 'unlock'! DF1 feels heavier with 1024x768 and it has some glitches like objects disappearing, probably caused by the lack of memory. I'm a newbie in this matter, but I've heard about a software called CFF Explorer where you can edit the file header to handle more than 2GB ram. I saw this in Youtube, something like "How to increase old gamers performance".

3. Now with OpenGL, Is it possible to use ReShade or other programs to achieve some post processing features like Antialiasing etc? I tried here but DF.exe doesn't open. I also tried to force FXAA through the Nvidia panel... but nothing happens.

4. Here's a comparison (different from the one I posted on YouTube) between DF1 1024x768 with and without your patch.
Images taken using a phone: https://imgsli.com/MjQ3Njc
With the patch, the game is not streched anymore and you can clearly see it while comparing the crosshair and the radar circle, but the downside of it is the loss of some screen information in the vertical ends. Now you can barely see the model hands. I think this is a decent trade-of, I thought it was worse. Nice Verok!

5. Check this LOD thing: https://youtube.com/watch?v=meYhz1RbiqQ
I don't know if knowing this you can achieve any voxel improvement, I thought it was worth showing.

GL! Keep us updated :P

Verok 10-08-2020 10:23 PM

1. 60fps is max what my screen can handle. It's smooth enogh. I can't feel smother even 1000fps, because game doesn't skip any frame and my screen can't produce any extra frame. CS:GO might uses some motion blur effects or post processing shaders for 60FPS screens. But DF is too old for this.
Anyway, all DF actions and animations linearly based on previous state (previous frame), it doesnt take into account previous time. Time is only checking in main game loop. So if I'll make FPS twilce as much - any NPC will run twice faster and any animation will play the same, twice faster. Even mouse movement iwill be twice faster. This is the way old game were developed. Thats why we see frames lags with low fps, but not frames skipping. This is visible even on my youtube video. Sorry, but It's impossible to find all action codes without souce code.

2. 2Gb limits it's a different thing. Game has been developed in time of 8-32Mb of RAM. In "static memory allocation" I meant that alocated memory is defined in compile time, and it's hards to understand what and how much game memory needs for each resource now. Sorry it's hard to explain for regular users, but developers and rev. engenars should understand what I mean

3. Sorry, I can't check ReShade as it requires OpenGL 4.5 and my limit is 4.0. So ReShade does'n work for me

4. As I wrote in YT comment, widescreen support is based on DF1 F12 key mode. I just added stretching to fullscreen and dynamic recalculation for 16:10 or any other wide screens. But for 16:9 screen it's looking the same
as original F12 mode but stretched to fullscreen.
For DF2 I imported the same thing, as DF2 doesnt have any widescreen mode.
Yes wide mode is cropped 4:3 mode. But to increase horisontal FOV we need increase hoisontal resolution. For example for 1024x768 it sould be 1366px. But here is the same memory limitation as I described in pt 2. Memory is statically alocated for max 1024 px per row.

5. I haven't check it yet, but I think to increase lod distance will have the same problem as in pt 2 and 4.

Conclusion. For all these we need totally rewrite whole Voxel Engine or maybe ask Novalogic for original source codes for each game :haha:

Steve 10-11-2020 06:43 AM

think we did enquire about the source code at some point. it was very difficult to get hold of anyone from Novalogic, even when they still existed

cambreaKer 10-12-2020 04:50 PM

i just played delta force 2 with the patch and i found that the underwater pistol has a broken hud icon after installing the patch
https://i.imgur.com/1dggbHX.jpg

Verok 10-12-2020 05:22 PM

Thanks cambreaKer. Seems like this problem appears without patch too. It related to locked 1024x768 resolution. With lower resolution everything is ok.

Thanks again. I'll take a look what a can do here

Verok 10-12-2020 06:15 PM

Quote:

Originally Posted by cambreaKer (Post 395784)
i just played delta force 2 with the patch and i found that the underwater pistol has a broken hud icon after installing the patch

Fixed. Download patch again

dmux 10-15-2020 05:20 PM

Amazing work Verok!

After extracting the files and placing them in my installation folder, I seem to be having trouble joining multiplayer games: a few seconds after clicking on a game link in the lobby, I'm directed to a page that says "Thanks for playing DF2." Has anyone else had this issue?

dmux 10-18-2020 12:47 PM

Issue after patching
 
Thank you for the patch Verok. I seem to be running into an issue after installing it however. Upon clicking a lobby game link, instead of joining the server I immediately get redirected to a page that says "Thanks for Playing." Has anyone else run into this issue and resolved it?

DFXdemo 10-18-2020 03:05 PM

I cant join mp in dfxdemo and land warrior full ver

hunterz 10-19-2020 01:20 AM

Have you tested dgVoodoo? I tested and added AA+Sharpen through the Nvidia Panel:
https://www.youtube.com/watch?v=N51ccrUOnX0
I'm not sure about the pros cans cons...

dmux 10-19-2020 09:25 AM

Got it working
 
After some troubleshooting I've got the patch working correctly.

My issue was that I had run the DF2 updater as well as applied the DF2 Fixer patches.

After uninstalling and reinstalling:

(1) Run DF updater.
(2) Copy all the files from the DF2 OpenGL patch into the DF2 installation directory.
(3) ** Done, no other patches required **

cambreaKer 10-20-2020 10:44 AM

So i made a steam guide about this patch and someone commented there that after applying the patch in both df1&2 after loading into a mission he was spinning like crazy, will you be able to fix that?

dmux 10-20-2020 02:35 PM

Hey Cam, I've noticed something similar when running in windowed mode. I've found that simply clicking within the game captures the mouse and makes it so I can regain control. Not sure if this is the exact problem or not, but hopefully that's helpful.

Verok 10-20-2020 02:50 PM

Quote:

Originally Posted by cambreaKer (Post 395982)
So i made a steam guide about this patch and someone commented there that after applying the patch in both df1&2 after loading into a mission he was spinning like crazy, will you be able to fix that?

Yes, such problem still persist. I'll fix it as soon as I have free time

hunterz 10-26-2020 07:33 AM

Would be nice if you could implement antialiasing and something like RInput: https://github.com/abort/Rinput-Library

cambreaKer 10-26-2020 09:37 AM

just wondering - will it be possible to make the hud's size smaller? it's pretty big and obscures a big part of the screen especially in widescreen, maybe you can add an option to make the hud smaller?

Verok 10-26-2020 06:34 PM

Quote:

Originally Posted by hunterz (Post 396133)
Would be nice if you could implement antialiasing and something like RInput: https://github.com/abort/Rinput-Library

Antialising? Do you mean make game blockless? If yes, then it's almoust imposiible, because then we need rewrite whole VoxelSpace Engine, as it suses integer based calculation. Even if we'll made floating point calculation, with voxels interpolation, it will lead to huge CPU overload with poor rendering speed.

You can enable filtering for image upscaling from selected in-game resolution to your window size, by selecting in window menu "Image->Enable Filtering"

In regards mouse RInput. Thanks for advice. I've made for gameplay mode. The menu remained as it was. Also seems the "spinning" problem fixed too

hunterz 10-26-2020 06:53 PM

Quote:

Originally Posted by Verok (Post 396141)
Antialising? Do you mean make game blockless? If yes, then it's almoust imposiible, because then we need rewrite whole VoxelSpace Engine, as it suses integer based calculation. Even if we'll made floating point calculation, with voxels interpolation, it will lead to huge CPU overload with poor rendering speed.

Man, with all that knowledge you could create a multiplayer clone for DF1/2 (both inside the same client? damn :naughty2:) and add all these improvements. Check this https://github.com/s-macke/VoxelSpace

But... I was talking about something like post processing, like what I did using dgvoodoo and nvidia AA: https://youtu.be/N51ccrUOnX0 You can clearly see that it's way less blocky.

Verok 10-27-2020 03:44 AM

Quote:

Originally Posted by hunterz (Post 396142)
But... I was talking about something like post processing, like what I did using dgvoodoo and nvidia AA: https://youtu.be/N51ccrUOnX0 You can clearly see that it's way less blocky.

Better way is ReShade for this. But as we discussed before, I can't test it, as my GPU supports only OpenGL 4.0, and ReShade requires min 4.5

Quote:

Originally Posted by cambreaKer (Post 396135)
just wondering - will it be possible to make the hud's size smaller? it's pretty big and obscures a big part of the screen especially in widescreen, maybe you can add an option to make the hud smaller?

It's too much work, as for this I need create new graphic resources for HUD, and I don't want do that.

I've just added ability to Hide/Show HUD by pressing Alt+F. Check it. You can also toogle HUD via window options menu (Options->Show HUD)

Also, I noticed that I don't like Raw Mouse Input, so I moved it to options menu too (Options->Raw Mouse Input)

cambreaKer 10-27-2020 05:03 AM

oh ok, well hiding hud ability is enough so thanks!

hunterz 10-27-2020 08:36 AM

Nice additions Verok! I've posted the patch in the group after some days of tests.
Is it right to affirm that the patch also gives better stability, avoiding random crashes/sysdump errors? I had no crashes while using it.

Not sure if raw input is working like it should, but this is a must have for games nowadays, especially for the competitive FPS. The reason why I was testing RInput was because my mouse (Logitech Pro or Cooler Master MM710) was skipping pixels randomly and it stopped while using RInput. Thank you again.

I'm crossing my fingers and hoping you will find out how to improve the overall quality of the game (pixels, LOD etc) :fingersx:
Our community is excited with the patch!

hunterz 10-27-2020 01:20 PM

Double posting for a good reason:
You could add a way to adjust saturation/vibrance. This is another common habit nowadays. dgvoodoo has an option to change it: https://prnt.sc/v84a6i and works well. I'm using vibranceGUI (https://vibrancegui.com) for years. These 2 use different methods.

Another cool thing could be a "fix" for the misaligned crosshair gap and maybe adding some crosshair color and size presets. Like: 6 colors (limegreen, white, light blue, red, yellow) and 3 different sizes (small, medium, large). I'm assuming that all this is inside the code because I never found it inside the .pff files as images.

Steve 10-27-2020 03:35 PM

can we get raytracing also? ;) j/k
this is brilliant stuff :gj:

--BulletMagnet-- 10-27-2020 07:51 PM

This is sick!

Any chance you'd share the source code for those of us interested in how it works?

Verok 10-28-2020 06:51 PM

Quote:

Originally Posted by --BulletMagnet-- (Post 396170)
Any chance you'd share the source code for those of us interested in how it works?

Sorry, I had bad experience last time, so don't want provide any source codes for now. You can check my other patches on my GitHUB repo for old games. These patches work in the same manner.
(see https://github.com/verokster)

Main thing, is that my patch just transfers 2d image to GPU via OpenGL for scaling and filtering, and it's also it's helpfull for any post processing features and streaming. Also this patch makes several hooks to fix some errors and bugs.

Quote:

Originally Posted by hunterz (Post 396165)
Double posting for a good reason:
You could add a way to adjust saturation/vibrance. This is another common habit nowadays. dgvoodoo has an option to change it: https://prnt.sc/v84a6i and works well. I'm using vibranceGUI (https://vibrancegui.com) for years. These 2 use different methods.

I've imported my little color adjustment window from my other patches. Never thought that it will be interesting for someone. This window is little tricky, but it covers all my needs. You can find it at Menu->Image->Color Adjustment. Hope it will be helpful for you.

Quote:

Originally Posted by hunterz (Post 396165)
Another cool thing could be a "fix" for the misaligned crosshair gap and maybe adding some crosshair color and size presets. Like: 6 colors (limegreen, white, light blue, red, yellow) and 3 different sizes (small, medium, large). I'm assuming that all this is inside the code because I never found it inside the .pff files as images.

I think you mean problem with crosshair for DF1. Fixed. Also added color selection (works for both) Menu->Options->Crosshair Color.

Haven't add cross size, but maybe in near future

Verok 10-28-2020 07:45 PM

Quote:

Originally Posted by Steve (Post 396169)
can we get raytracing also? ;) j/k
this is brilliant stuff :gj:

What do you mean "raytracing"? real joke? :fingersx:

hunterz 10-29-2020 08:17 AM

Verok!! Amazing additions! Our community is already making use of it all! A lot helpful!
Keep hacking the code :D I'm always hoping you can find other graphics improvements :headbang:

We'll probably try to make some noise to get THQ Nordic's attention (with a petition etc), for the last time. Would you like to put your hands in the game code and help to develop some few improvements? Like adding new resolutions, increasing the "voxel quality" etc? Or this would be too much?

The Raw Input option is not being saved. I have to enable everytime I open the game :/

Do you know why buildings start to disappear after placing more than 5-6 of them close to each other? There's any possible fix for it? Check the video: https://youtube.com/watch?v=y3qvvKqJU_I
You can see that this is not happening in lower resolutions.

Verok 10-29-2020 10:41 AM

Quote:

Originally Posted by hunterz (Post 396205)
Do you know why buildings start to disappear after placing more than 5-6 of them close to each other? There's any possible fix for it? Check the video: https://youtube.com/watch?v=y3qvvKqJU_I
You can see that this is not happening in lower resolutions.

Sorry I tried find this code, but no luck. This is somehow depends on depth buffer. The more polygons, the faster they disappear. Also it depends on game resolution. As higher it is, the faster polygons disappear

Verok 10-29-2020 11:08 AM

Quote:

Originally Posted by hunterz (Post 396205)
The Raw Input option is not being saved. I have to enable everytime I open the game :/

Yeah, I forgot to save this option after selection. Fixed!.
I also added key Alt+W for toogle windowed mode, as ScrollLock is not so good, especially under Wine. So now Alt+W and ScrollLock will do the same thing.

BTW. All patch options are stored in DF.INI or DF2.INI files(s)

Verok 10-29-2020 11:19 AM

Hm, Alt+W not a good idea for WSAD. So moved to Alt+Enter

Steve 10-29-2020 02:39 PM

thanks for updates :gj:


All times are GMT -5. The time now is 09:55 PM.

Powered by vBulletin®