Author Topic: Which timer is used in the M&B/WSE2 engine?  (Read 3737 times)

0 Members and 3 Guests are viewing this topic.

Offline Dede

  • Count
  • *****
  • Renown: 161
  • Infamy: 14
  • cRPG Player
    • View Profile
Which timer is used in the M&B/WSE2 engine?
« on: March 04, 2013, 09:38:10 pm »
0
@cmpxchg8b, since you actively posting here may I address the question to you?

My Problem:
Few months ago, I put my custom PC together:
(click to show/hide)

Since then both native and cRPG are unplayable for me. My ping(22-35) and fps(120) are good, but the game feels like 200+ping.
In-Game I see always opponents who instantswing, and there is no chance to block anything but by guessing. The longer I play, the worse it gets. And this ends sometimes with a crash.
The most funny/frustrating thing is when I get hit from a one hander who is like 2m away from me.
It feels like desynced timer. Setting "Force Single Threading" and assigning M&B into one cpu core didnt helped.(on my old PC it worked)

To solve this I have testet several network,CPU and timer related Bios settings. Most of them didnt have any effect but wasting my time.

Recently I found a strange thing, which helped a lot, but it only works for a short period of time. After that it gets slowly desynced again, and I have to restart the game.
If you want I can PM you what I did, because I dont know if this is a legit way to play this game. And since because of this problem I have stopped playing anyway, it does not matter I suppose.
But I would love to play again if there would be a permanent solution.

For sure what I can say about this game is, its very picky when it comes to hardware. I played it on other Pc's and there was a huge difference.
After those experiences I am strongly assuming, that this is a timer related issue.



My Question:
Which timer is used in M&B/WSE2?


Microsoft for example  suggest to use QueryPerformanceCounter and QueryPerformanceFrequency for Game Timing and Multicore Processors.
http://msdn.microsoft.com/en-us/library/windows/desktop/ee417693(v=vs.85).aspx

Offline cmp

  • M:BG Developer
  • Supreme Overlord
  • *******
  • Renown: 2052
  • Infamy: 569
  • cRPG Player
    • View Profile
  • IRC nick: cmp
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #1 on: March 04, 2013, 09:48:59 pm »
0
It uses QueryPerformanceCounter and QueryPerformanceFrequency.
If you have timer problems, you might wanna check that HPET (High Precision Event Timer) is enabled in your BIOS and in the OS.

Feel free to PM me what you did to make it work, it might tell me more.

Offline Dede

  • Count
  • *****
  • Renown: 161
  • Infamy: 14
  • cRPG Player
    • View Profile
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #2 on: March 04, 2013, 09:54:40 pm »
0
It uses QueryPerformanceCounter and QueryPerformanceFrequency.
If you have timer problems, you might wanna check that HPET (High Precision Event Timer) is enabled in your BIOS and in the OS.

Ty, I tried HPET and used "bcdedit /set useplatformclock true" already. HPET makes it even worse. :/

Offline cmp

  • M:BG Developer
  • Supreme Overlord
  • *******
  • Renown: 2052
  • Infamy: 569
  • cRPG Player
    • View Profile
  • IRC nick: cmp
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #3 on: March 04, 2013, 09:57:14 pm »
0
Send me your secret method, I'm curious now.
Oh and by the way, what does the crash message say?

Offline Dede

  • Count
  • *****
  • Renown: 161
  • Infamy: 14
  • cRPG Player
    • View Profile
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #4 on: January 01, 2014, 05:36:13 pm »
0
I know this is an old topic but I am wondering, are the cRPG-game servers also set to "bcdedit /set useplatformclock true" ?

Offline cmp

  • M:BG Developer
  • Supreme Overlord
  • *******
  • Renown: 2052
  • Infamy: 569
  • cRPG Player
    • View Profile
  • IRC nick: cmp
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #5 on: January 01, 2014, 05:43:03 pm »
+2
Yes.

Offline Dede

  • Count
  • *****
  • Renown: 161
  • Infamy: 14
  • cRPG Player
    • View Profile
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #6 on: January 24, 2014, 06:39:18 pm »
0
Did you already read about the Windows 8 RTC bug?
"HWBot banned benchmark submissions from PCs running Windows 8, because the operating system doesn't correctly handle real-time clock (RTC), making it easy to spoof it."
http://www.techpowerup.com/189607/windows-8-rtc-bug-isolated-fixed.html


In this respect there is also an good article on how to fix it. It's interesting, I recommend you to fully read it.
http://www.ocaholic.ch/modules/smartsection/item.php?page=0&itemid=1071

Also the "QPC Timer" is affected on Windows 7, if platformclock is not set:
http://www.ocaholic.ch/modules/smartsection/item.php?itemid=1071&page=5


Conclusion from the article:
(click to show/hide)



Would you consider, to force hardware-clock(HPET & ACPI Timer) to all Players with the c-rpg Mod?

Offline cmp

  • M:BG Developer
  • Supreme Overlord
  • *******
  • Renown: 2052
  • Infamy: 569
  • cRPG Player
    • View Profile
  • IRC nick: cmp
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #7 on: January 24, 2014, 08:17:30 pm »
0
Did you already read about the Windows 8 RTC bug?

No, but from what I read it happens only when you change bus frequency. If somebody is able to do that, there's a good chance he already knows about this bug.

Would you consider, to force hardware-clock(HPET & ACPI Timer) to all Players with the c-rpg Mod?

Altering critical system settings is something a game should never, ever do.

Offline Dede

  • Count
  • *****
  • Renown: 161
  • Infamy: 14
  • cRPG Player
    • View Profile
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #8 on: January 24, 2014, 10:46:20 pm »
0
No, but from what I read it happens only when you change bus frequency.

Right, but CPU-Z shows that the bus-frequency is not always constant, even if you dont change anything. Especially when "Spread Spectrum" is enabed in Bios, which is by default on some Motherboards.

My bus-frequence vary betwen 99.96 - 100.01MHz :
(click to show/hide)

This may explain why I sometimes have a timing advantage over other players, but mostly I'm in disadvantage.
Ingame when I walk, it feels like I am gliding on ice and hitboxes seem glitchy and displaced to me - like playing with 200ping.

The only time when I fully enjoyed the cRPG Mod was when the old "Pecores server" was online. No laggs- No glitches - No timing related issues, at least not that bad. Which brings me to another question: What is the "tickrate" of the cRPG -server?

Offline cmp

  • M:BG Developer
  • Supreme Overlord
  • *******
  • Renown: 2052
  • Infamy: 569
  • cRPG Player
    • View Profile
  • IRC nick: cmp
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #9 on: January 25, 2014, 01:25:40 am »
0
Variable, but it's running at 120 FPS unless under very heavy load.

Offline Dede

  • Count
  • *****
  • Renown: 161
  • Infamy: 14
  • cRPG Player
    • View Profile
Re: Which timer is used in the M&B/WSE2 engine?
« Reply #10 on: January 25, 2014, 04:21:29 pm »
0
Last night I played on the DTV-server. There was me and an other guy fighting against bots.
When he left, the server became more responsive(no mouse lag) with fluid animations, no frameskips and hitboxes became accurate.
That was like playing on singleplayer, really awesome. As soon as an other player joined the server, it started with described problems again. Now I am sure it is not an issue between my PC and the server. It looks like the server(netcode?) is trying to desperately synchronise between players, but fails by doing so.
This ends up to give some players timing advantage over others. A feature - or a bug!?

Variable, but it's running at 120 FPS unless under very heavy load.
120 is pretty good.


Altering critical system settings is something a game should never, ever do.

I can't argue against that, but maybe it could be recommended when someone joins the server with software-timer.

I will test this on the DTV-server with someone who uses the platformclock. Let's see if it makes a difference.