Duke4.net Forums: NAM M16 auto-aim isn't correct - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

NAM M16 auto-aim isn't correct

#1

Hello there!
I found a problem with the NAM support of Eduke32 that makes this broken record of a game even more impossible.

What I found it that the auto-aim of the M16 is the same as the Thompson for WW2GI while it should work just like the pistol in regular Duke.

The error is in the following line of the file:
source\duke3d\src\player.cpp

P_PreFireHitscan(spriteNum, playerNum, projecTile, &startPos, &Zvel, &shootAng,
                    projecTile == SHOTSPARK1__STATIC && !NAM_WW2GI, 1);


The line should only check that the game is not WW2GI, instead of NAM and WW2GI, like:

P_PreFireHitscan(spriteNum, playerNum, projecTile, &startPos, &Zvel, &shootAng,
                    projecTile == SHOTSPARK1__STATIC && !WW2GI, 1);


I found this, because I couldn't beat the first level in Eduke32. I noticed that the aiming was different from the original MS-DOS version. After some testing and changing Eduke32 to behave like Duke Nukem 3D, I think that this is the reason.

A easy way to check this out, is to shoot an enemy from a long distance. As you might notice, you can't hit them from a distance easily in Eduke32, while in the original you can just hit them right, even from large distances, just like in Duke with the pistol.

For reference, I used the re-release on Steam and a old copy from CD-ROM.

Also, if someone want to work-around it, I made a CON modification so that Eduke32 will work just like the original NAM release (at least, as far as I know).
To use it, download the CON file in the attachment and run Eduke32 like this for the Steam re-release on Windows:

eduke32.exe /mx nam_fixes.con /g "Y:\Steam\SteamApps\common\Nam\NAM\nam.grp"
 /x "Y:\Steam\SteamApps\common\Nam\NAM\game.con"


Where Y:\Steam points to your Steam installation/library.

EDIT: Forgot the attachment, and some typo's...

Attached File(s)



This post has been edited by Little Tijn: 23 April 2018 - 11:04 AM

6

User is offline   Hendricks266 

  • Weaponized Autism

  #2

Wow, thanks for the report! I'll get this fixed right away.

Please let me know if you notice anything else wrong with either NAM or WWII GI. I recently observed that the MIDI music of NAM's opening level is missing instruments on Windows, but I determined this to be an issue with Windows 10, since my Windows 7 machine is unaffected. I have not yet found a workaround.
0

#3

That's nice to hear! :P

I will check both games and see what else I can find. I know that WW2GI isn't correct on all aspects, but the weapons in the original game also function a bit weird, so I guess this game is just a bit buggy overal.

I also noticed that the music is incorrect. This started in Windows 10 1507. Windows 8.1 and below do not have this problem at all. Even if I play the MIDI file in a stand-alone player (like Windows Media Player), the music is missing instruments. In the music of the first level it is easier to spot, because almost all instruments misbehave. I also have no idea how this could be fixed easily. The default MIDI player in Windows "Microsoft GM Wavetable Synth" seems broken since Windows 10.

Maybe it is possible to add a OPL3 emulator, also for authentic sounding music in Duke as well. Although that would be quite a change for a game (NAM) that isn't that great. Maybe for Duke :lol:
0

#4

I have tried WW2GI from a original CD-ROM in DOSBox and in Eduke32 and found some differences:

Weapons:

Knife (1)
- No differences

Thompson (2)
- The fire rate of the Thompson seems a bit slower in Eduke32
- The reload animation is different. In WW2GI the clip is just a brief moment on screen while in EDuke32 is is a lot longer on screen. Also the sound in WW2GI is played at a later time (the sound of the insert)
- When manual reloading, the reload sound is played a bit earlier on Eduke32

MP40 (3)
- When reloading the wrong image of the gun is displayed (the one firing)

BAR (4)
- Weapon has a clip of 20 in the original and 60 in Eduke32

Bazooka (5)
- When firing, the weapon is longer on screen in Eduke32. In the original it is lowered as soon as the weapon is fired

Grenate (6)
- No difference

Grenate Garand (7-1)
- Another frame is show when fired in Eduke32. I like it a bit more :P

Sniper (7-2)
- When firing, the frame of the gun is shown in the top of the screen. The timing might also be off although in the original the timing is also quite out of whack. Especially the reloading is so quick in the original that you almost do not notice it being there.

Dual Colt 1911 (8)
- When firing, two bullets are shot per gun. It should be 1 per gun.

TNT Explosives (9)
- No differences

Flamethrower (0)
- Fire rate in Eduke32 is a bit quicker

Also some bugs in the original and Eduke32:
- It looks like the blood of the enemies is glowing in the dark. Most likely because they used the same colour as for the glowing eyes of the pigcops. Or because they are nuked :lol:
- It is not possible to hit the enemy that replaces the LIZMAN actor when it has not spotted the player yet. I found that after the enemy is activated by spotting you that you can hit it with a weapon. This bug is also in NAM and the original Duke Nukem 3D game. A easy fix is to replace this actor with a useractor. This bug might be fixed in Eduke32. Haven't tested this yet.

These are mine findings at the moment. There could be more, testing will tell...

A question: How do we get the correct timings from the orignal MS-DOS version?

EDIT: Some typo's

This post has been edited by Little Tijn: 24 April 2018 - 10:55 AM

3

User is offline   Hendricks266 

  • Weaponized Autism

  #5

After WWII GI was added to Steam I went through the EDuke 2.0 source code (which includes source for NAM and WWII GI) to make sure we had everything, but either I missed a bunch of stuff, the source is not a perfect record, or both. If the source cannot account for these differences, then our options are either to empirically determine what values remain to be changed, or examine the machine code in the WW2GI.EXE itself.

If it interests you, the wiki contains instructions for building EDuke32 from source. I can't promise I have the time to figure out what things to change myself, but if you feel up to comparing the sources and telling me what you find, I can patch fixes in easily.
2

#6

I will look if I can get the source compiled on my machine. Then I can see if my correction I gave for NAM actually works :P

About the EDuke source, maybe I can check if the released binary of it will work correctly with WW2GI. If not, then it's going to be a lot trickier to get all the timings etc. right.

EDIT: That went easy! Just fetching it from SVN, open the solution in VS 2017 and start compiling.

EDIT #2: Just tried the fix for NAM. Looks like it works as it should, based on testing with the original release. Also the reload animation of the MP16 is different...

This post has been edited by Little Tijn: 25 April 2018 - 11:02 AM

2

User is offline   Hendricks266 

  • Weaponized Autism

  #7

I don't believe EDUKE.EXE supports playing WWII GI. The source code has separate preprocessor branches for Duke/NAM and WW2.
1

#8

You are right :P! Just checked the code and indeed I see some ifdef statements for those games. So, that idea is out of the window.

Will check if I can find that reload animation of NAM somewhere.

EDIT: Found it in Eduke and Eduke32. What I can't find is the reload animation times of NAM in the Eduke source. There doesn't seem to be a preprocessor branch for NAM. Only WW2GI as far as I understand it.

I tried to play with the values in P_DisplayWeapon in Eduke32 and it looks like I can manipulate the timings somehow. Maybe I get them right by trial and error. But first, to bed :lol:

This post has been edited by Little Tijn: 25 April 2018 - 12:12 PM

2

User is offline   Hendricks266 

  • Weaponized Autism

  #9

Please try r6872 to see how much I fixed.
1

#10

Good job! And thanks for the fixes!

I have just checked NAM and the timing seems just as the original. Also the auto-aim is as it should. So that game is fixed nicely.

Now, on to test WW2GI... To be continued..


EDIT:
WW2GI also looks correct. Nice done both NY00123 and you Hendricks266 :P


EDIT2:
Found out that some of the sounds in WW2GI aren't played on my machine. Maybe I did something wrong. Started the game with:
eduke32.exe /j c:\dos\ww2gi

In that directory is the installation of WW2GI. The launcher of Eduke32 did display WW2GI as a game and I did choose that option.

In the log I can see that Eduke32 cannot load some VOC files. No idea why that is. Attached is the log.
Maybe you can figure out what is wrong.
PS. I'm using the installation of the original CD-ROM release. It runs just fine in DOSBox.

Attached File(s)



This post has been edited by Little Tijn: 02 May 2018 - 11:59 AM

2

User is offline   Hendricks266 

  • Weaponized Autism

  #11

I'm glad the fixes seem to have worked.

I experienced the same issue with missing sounds while testing and I suspect it is related to recent changes that were made to our sound code, non-specific to WWII GI. Most of the missing sound warnings in the log are inherited from Duke 3D and are harmless, because those sound IDs are never played.

EDIT: r6874 addresses the sound problem.

This post has been edited by Hendricks266: 02 May 2018 - 08:45 PM

0

#12

Just saw the change in the SVN log. BTW, nice define there :lol:

Soon Eduke32 can claim the honour to be the first (and most likely only) port to have full support for both NAM and WW2GI. Another bullet point for on the website. :P

Have to go to work soon, but just going to check this change. Can't resist…

EDIT: Hmm… Now it doesn't start. Something with cache. The last lines in the log:

362- ptr: NULL, leng: 2041920, lock: 0
Cachesize = 25165824
Cacnum = 363
Cache length sum = 25165824
ERROR: CACHE SPACE ALL LOCKED UP!

Full log attached as usual.


Thanks again for the work so far! I'm liking it already :lol:

Attached File(s)



This post has been edited by Little Tijn: 02 May 2018 - 09:35 PM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #13

I bumped up the cache size, try now.
0

#14

I will try it today. Let you know soon :P
0

#15

Hmm.. Revision r6875 also crashes.

Still something with the cache. Last lines in the log:

360- ptr: 0x1ead9bb0, leng: 15328, lock: 200
361- ptr: 0x1eadd790, leng: 96, lock: 198
362- ptr: NULL, leng: 2041920, lock: 0
Cachesize = 25165824
Cacnum = 363
Cache length sum = 25165824
ERROR: CACHE SPACE ALL LOCKED UP!


Info in start of log:
EDuke32 r6875
Built May 2 2018 23:11:33, GCC 7.2.0, 32-bit
Application parameters: /j f:\WW2GI
Using F:/Eduke32/ for game data
Using f:/WW2GI/ for game data
Running on Windows 10 (build 10.0.17134)
Initializing SDL 2.0.8
Searching for game data...
Using "WW2GI.GRP" as main game data file.
Compiling: GAME.CON (162391 bytes)


What I also see is this:
Initialized 24.0M cache

I read in the SVN log that this should be 96MB. Is that right?

Included is the log, hopefully you can find the problem.

Attached File(s)


0

User is offline   Hendricks266 

  • Weaponized Autism

  #16

Frustrating. My change did not take effect because cache size is now saved in the cfg.
0

#17

That's why it didn't work!
Changed the cache size in the config file and bingo! WW2GI ran in all its glory.

Thanks again!

Going to give it a quick run. :P

EDIT: Fixed typo's, yet again

This post has been edited by Little Tijn: 03 May 2018 - 09:40 AM

0

#18

Wow! I'm impressed! Almost every little detail of the working of the weapons of WW2GI is in Eduke32! It just behaves like the original thing. Even the weird timing of the sniper is accurately recreated!

It's a bit nitpicking, but I found just three things different:
- The reloading the Thompson (2) the sound of inserting the clip is a bit too soon
- When reloading the Thompson (2) by hand, two sound are heard, while the original only plays one of the sounds (can't hear which sound it is)
- When reloading the MP40 (3) by hand (with the holder function) the frame of the weapon shooting is displayed while it is lowered

If theses are fixed, then it is spot on. A job well done! :P


BTW, how did you get those timing from the original? I'm a bit curious.

This post has been edited by Little Tijn: 03 May 2018 - 11:10 AM

0

#19

Just tried NAM, and it also very nice done!

Just some few differences:
- The M-60 (4) shooting animation is just a bit faster
- The sniper doesn't play the reload sound when fired and a bullet case is dropped (what I quite like)

Like I said before thanks! I'm going to play some NAM :P

This post has been edited by Little Tijn: 03 May 2018 - 11:14 AM

0

User is online   Jblade 

#20

There's been a bug introduced in this snapshot, relating to this stuff:

http://dukeworld.duk.../20180502-6872/

Basically if you tap the fire button on slot 0, it'll mess up the animation of the mighty boot and cause it to not actually work (this has a knock on effect on mod weapons using slot0) I can record a video if you want an example, but you can check out that snapshot and the one before to see the difference first hand.

EDIT: just tested it out more, it seems to be affecting the other guns as well. I'll report back with any more findings.

This post has been edited by Jblade: 05 May 2018 - 01:18 PM

0

#21

Just checked the SVN logs and there is a fix for this problem in r6879. Tried it and the mighty boot is working as it should again.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #22

I'm going to have to make the weapon system do different things in WWII GI mode, as fixing things for it broke Duke.

Shoehorning Duke's weapons into WWII GI's weapon system was a mistake.

I've discovered that some of EDuke32's weapons have been inaccurate to DOS Duke since the beginning.

I hope I can fix this without breaking mods.

This entire project has been driven by the needs and desires of the here and now, leaving a trail of wreckage behind. In order to get anything done lately, not only do I have put my own head in the right place for work, but I also must overcome the disheartening feeling of swimming against a current which is stronger than I can match. There is no one who both wants to help and is capable of contributing in the ways that I need. Many others are content to pull the lever that makes the current even stronger.
3

#23

I'm really sorry to hear that. I didn't know that these modifications gave so much trouble. I was already impressed by the quick response. Especially given that these games aren't that populair.

I can easily understand that it's difficult to get this right. Tried to read the code of the weapons system and must say, it's hard to understand.

Maybe I could contribute somehow in this. Need to study this code first to try to understand it better.

This post has been edited by Little Tijn: 07 May 2018 - 10:58 AM

0

#24

And about shoehorning Duke's weapons in WW2GI weapons system, do you mean that the code of Eduke32 is based on the modified code from Eduke, that was already modified WW2GI code?

This post has been edited by Little Tijn: 07 May 2018 - 10:56 AM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #25

EDuke32 was created by manually merging stuff from EDuke 2.0 and 2.1 into JFDuke3D.
0

User is online   Jblade 

#26

We all definitely appreciate the expedience you guys act with bug fixes and stuff; I definitely don't want you to get overwhelmed with trying to sort out bugs though so I don't really like reporting stuff that much. Maybe it might be worth drawing a line for bug fixes for a while until IM is finished and released so that's not bearing down on you as well.
3

#27

And the weapon system was taken from Eduke, seeing that it supports the modding options created first for WW2GI?

I do remember that the auto-aiming was as in WW2GI in Eduke32 it the first years of the project (although, I could be mistaken) and fixed later.

This post has been edited by Little Tijn: 07 May 2018 - 11:39 AM

1

#28

View PostJblade, on 07 May 2018 - 10:58 AM, said:

We all definitely appreciate the expedience you guys act with bug fixes and stuff; I definitely don't want you to get overwhelmed with trying to sort out bugs though so I don't really like reporting stuff that much. Maybe it might be worth drawing a line for bug fixes for a while until IM is finished and released so that's not bearing down on you as well.


I'm also really grateful for everyting you guys done already and really do not want to overwhelm you with these request. Like I said, I didn't except a response this soon. I'm already really happy with how it works now.

Sorry for the trouble. These games (NAM and WW2GI) can wait. They already did for a long time before 😊. IM should really be the focus, seeing how great that game is already!

This post has been edited by Little Tijn: 07 May 2018 - 11:44 AM

1

User is offline   Danukem 

  • Duke Plus Developer

#29

View PostHendricks266, on 07 May 2018 - 10:12 AM, said:

I've discovered that some of EDuke32's weapons have been inaccurate to DOS Duke since the beginning.

I hope I can fix this without breaking mods.



While I wouldn't normally condone breaking old mods, in this case it would be a price worth paying, since having an accurate replication of Duke's OG weapons is a high priority. Also, it's not like there haven't already been changes to to the weapons over the years that affect mods.

For example, several years ago TerminX discovered that EDuke32 had the wrong timing on the devastator shots. Eduke32 had two rockets coming out simultaneously (2 would launch on a certain tic, then later the 2 on the other side would launch). He discovered that actually only one rocket was supposed to fire at a time, and fixed it. And yes, that impacted a few mods.
2

User is offline   Hendricks266 

  • Weaponized Autism

  #30

r6880 amends the problematic commit and another one I'm unsure of to only apply in WWII GI mode. Do the issues that affected Duke before r6879 also apply to WWII GI in r6880?
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options