Widescreen Gaming Forum

[-noun] Web community dedicated to ensuring PC games run properly on your tablet, netbook, personal computer, HDTV and multi-monitor gaming rig.
It is currently 23 Nov 2024, 03:46

All times are UTC [ DST ]




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 06 Sep 2010, 08:06 
Offline
Insiders
Insiders

Joined: 07 Nov 2005, 04:16
Posts: 3010
Alright, I think I found the problem and the solution. It's not your data files - I was able to reproduce the gap at 5292x1050 in windowed mode. What we seem to have here is an oddly coincidental case of pixel offsets becoming floating points as they are scaled to 2.1875x their original values, while other offsets when scaled come out to integers. So some are misaligned by a single pixel and others are aligned perfectly, and we have the exact combination of alignment and misalignment for this to be visible.

Anyway, what I ultimately wound up doing is changing the CGDraw scaling code to round up instead of leaving it up to the deep, dark pits of the Q3 engine to interpret the meaning of a fraction of a pixel (I would guess it ultimately rounds down). There will still be misaligned scope graphics, but since I'm making sure everything is a fraction of a pixel too big, misaligned graphics should overlap instead of separate, and you won't notice. Hopefully this doesn't break anything. I tested the scope and binoculars with a couple of different resolutions, and it seems to work out.

New version uploaded.

I still have no idea why your crosshairs are different, but that's probably not important now. I used your files, and we have the same sized big ones - I still have my Mauser crosshairs, not yours.

By the way, this is the original version of Return to Castle Wolfenstein, not the Game of the Year Edition. It's possible they modified the scopes slightly between versions.

Here's the funny thing. The hairs on the scope are actually coded right into the executable. Here's some of the code (should be intelligible even if you don't know C):
Code:
   if ( weap == WP_SNIPERRIFLE ) {
   
   
         // sides
         CG_FillRect( 0, 0, 80, 480, color, UI_CENTER );
         CG_FillRect( 560, 0, 80, 480, color, UI_CENTER );
   
         /* stuff */
   
         // hairs
         CG_FillRect( 84, 239, 177, 2, color, UI_CENTER );   // left
         CG_FillRect( 320, 242, 1, 58, color, UI_CENTER );   // center top
         CG_FillRect( 319, 300, 2, 178, color, UI_CENTER );  // center bot
         CG_FillRect( 380, 239, 177, 2, color, UI_CENTER );  // right
      }


CG_FillRect( 84, 239, 177, 2, color, UI_CENTER ) means:
Draw a solid rectangle at x-coordinate 84, y-coordinate 239, with a width of 177px and a height of 2px. Fill it with the color data assigned to variable "color." Then scale it to the screen's resolution using the CG UI_CENTER algorithm (that part was my addition).

Did you crank the FOV really high to show the problem, or is specific to that particular weapon you're using?

It's specific to the Snooper. I had also messed with the drawing angles a bit to make it more clear that part of the gun was missing.


Top
 Profile  
 


PostPosted: 06 Sep 2010, 09:29 
Offline

Joined: 19 Apr 2008, 22:46
Posts: 144
Downloading now, I'll test it in a second.

That difference in crosshair is really bizarre. All I've done is install the game from CD, patch it to 1.4, followed by 1.41, followed by 1.41b (you have to do it like this, there's no cumulative 1.41b patch). I'm not running any mods, either.

If you take a really close look, it looks like two crosshairs overlayed one on top of the other. There's a simple plus-shaped crosshair in addition to the T-shaped one that the engine draws. Is it possible one of the additional PK3 files has added the plus-shaped crosshair image? We could both create checksum hashes of our PK3 files and compare notes to see what one is different.


Top
 Profile  
 
PostPosted: 06 Sep 2010, 14:46 
Offline

Joined: 19 Apr 2008, 22:46
Posts: 144
Ok, the scope fix worked, but I ran across a couple more bugs.

The first major boss in the game throws ghosts at you. If you don't manage to dodge out of the way, they black out your screen temporarily (giving the slow-moving boss time to slam you into the ground). Only a 4:3 square is getting blacked out, rather than the entire screen:



During the same boss battle (while cowering in fear) I noticed clipping in the skybox. You can see it in the upper left corner:



Top
 Profile  
 
PostPosted: 07 Sep 2010, 00:34 
Offline
Insiders
Insiders

Joined: 07 Nov 2005, 04:16
Posts: 3010
Is it possible one of the additional PK3 files has added the plus-shaped crosshair image? We could both create checksum hashes of our PK3 files and compare notes to see what one is different.

It's possible, but I don't see any place in the code where it does this.

If you were to move everything out of the main directory except these:
save (directory)
pak0.pk3
sp_pak1.pk3

You should still be able to launch the game, load a savegame, and zoom in with the Mauser to see if that changes the scoped look.

I used MD5Checker and got these hashes:
pak0.pk3 - CE92B11DF889CB0A045762BB5FD7CDE5
sp_pak1.pk3 - A0D3FE956F85F40C8EFD6BABE0D09832

Though I suspect you have the same files as me. I mean, the whole point of having multiple pak files is so that you can distribute incremental updates more easily.

Only a 4:3 square is getting blacked out, rather than the entire screen:

Fixed, new version uploaded. This one was easy.

During the same boss battle (while cowering in fear) I noticed clipping in the skybox. You can see it in the upper left corner:

I couldn't quite figure out why this is happening, but I did find that it happens in the original game too, if your FOV is set high enough. At your aspect ratio of about 5:1, your fov_x is greater than 150. The original game has the same clipping problems at an FOV of around 140. I have a hunch that this is something deep down in the Quake III code, and I don't dare touch that stuff. Consider this one a wontfix for the time being.


Top
 Profile  
 
PostPosted: 07 Sep 2010, 01:33 
Offline

Joined: 19 Apr 2008, 22:46
Posts: 144
I moved all the pk3 files except pak0.pk3 and sp_pak1.pk3 to another folder and tested the scope again. No change, I still have the "weird" crosshair. I checked your MD5 hashes against my game files, and they're identical... so what the heck is going on? :?

I could send you my entire game folder (without rtcwkey and without the pk3 data files, since those have been confirmed to be identical) to see if you can get the alternate crosshairs to show up.

I have the sneaking suspicion that the skybox in that map is just a little bit too big, which is causing it to hit the Far Clip Plane. This wouldn't have been noticed during development, as the clipping was still off-screen.

Unless you can increase the Quake III engine's maximum clipping distance, the simplest solution would be to shrink the skybox slightly so it doesn't clip anymore.


Top
 Profile  
 
PostPosted: 07 Sep 2010, 02:48 
Offline
Insiders
Insiders

Joined: 07 Nov 2005, 04:16
Posts: 3010
I could send you my entire game folder (without rtcwkey and without the pk3 data files, since those have been confirmed to be identical)

Ok, sure. If you do that, I'll look at it.

Unless you can increase the Quake III engine's maximum clipping distance, the simplest solution would be to shrink the skybox slightly so it doesn't clip anymore.

I'm guessing that the size of the skybox is defined in one of the map's corresponding files, not the source code. And I think fixing bugs with the game's levels is outside the scope of this project, even if I did know how to edit a map file (and I don't).


Top
 Profile  
 
PostPosted: 07 Sep 2010, 09:23 
Offline

Joined: 19 Apr 2008, 22:46
Posts: 144
Here are my game files. Just add in your PK3s and rtcwkey: http://www.mediafire.com/?pl2zjc2m18r06j0


Top
 Profile  
 
PostPosted: 07 Sep 2010, 16:22 
Offline
Insiders
Insiders

Joined: 07 Nov 2005, 04:16
Posts: 3010
Ok, I extracted that archive to a new folder, copied in the "Main" directory from the last download, copied in pak0.pk3 and sp_pak1.pk3, edited wolfconfig.cfg to make r_fullscreen "0", launched WolfSP.exe, and loaded your saved game and zoomed in.

Nothing. I'm still getting my scope, not yours.


Top
 Profile  
 
PostPosted: 07 Sep 2010, 16:47 
Offline

Joined: 19 Apr 2008, 22:46
Posts: 144
So...what the heck is going on? :?

Edit: I don't know if it makes any difference at all, but I've forced AA (4X4 Supersampled), AF (16X), and Texture LOD (-1) from my drivers for Wolfenstein.


Top
 Profile  
 
PostPosted: 15 Sep 2010, 17:14 
Offline

Joined: 12 Oct 2008, 22:56
Posts: 3
I tried it out, but I forgot that all games with a q3 base refuse to launch on my computer, I'll try it on my laptop.

Thank you sir, glad to see the source code is being put to good use so soon.


Do you have ATI graphics? If so you will run into problems with any drivers newer than 10.4 in most Quake 3 games. So far everything except Quake 3 and American McGee's Alice has crashed for me as well as all Quake 2 engine games. The solution is to put the 10.4 atioglx.dll in the game folder. If you don't have the file drop me a pm with your email adress and I'll send it to you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  




Powered by phpBB® Forum Software © phpBB Group