Friday, 3 May 2013

Smoother FEZ


New 1.04 patch for FEZ includes a new value for time step and a new command line parameter to use variable time steps as a beta test. With 1.04, you can see FRAPS shows now 60 fps instead of 58, but the game has judder anyway. So, for me, this is not the final fix and if you want real smooth, it's better that you  use modified DLL or custom refreshrate discussed below.


CruelToot user in steam community has created a modified DLL that link FEZ framerate to refreshrate. This is his message in steam:

I made a modified MonoGame.Framework.dll that makes the game much smoother for me. It basicaly locks the game logic updates to the the screen updates. I uploaded the modified file here Just replace the one in your FEZ folder. I have one tested the first few minutes of the game, so I don't know if it breaks any puzzles or anything like that. Vsync needs to be enabled or the game will in way to fast. And if your machine is too slow to do a solid 60 fps I think what will happen is that the game will run in slow motion. Hopefully this will help at least some of you. 

Link of message: FEZ steam discussion
Link of DLL file: CruelToot DLL fix for judder

NOTE: Replace DLL file (make a copy of the original file first) into steam FEZ folder. Some users have detected a higher CPU use with this DLL. In my case the CPU use is 35%. Remember to force Vsync ON for perfect and smooth gameplay. If you don't want to replace the file, you can use the first fix detailed below.


Finally I decided to enter some info about games beyond Crysis series.

I preordered FEZ in steam weeks ago and downloaded few minutes after realease. Inmediatly I notice an annoying judder. Every second the game miss one or two frames producing constant and periodic pauses.

Using FRAPS you can see FEZ is limited to something near 58 fps and you can't fix that.

My first suspicion was that the FixedTimeStep plus an incorrect TimeStep period value into the game are creating this problem (set_IsFixedTimeStep and set_TimeStep are the related variables into FEZ source). I created a program to modify windows timer resolution but I find it's impossible to rise timer period if any other program has set a lower value. This is a normal behaviour for windows timer resolution to avoid a new launched program can set a lower resolution (higher value) that interfere with the proper operation of an application previously launched and still running.

Then I tested ArtMoney to modify variables values into FEZ process while runing, but the blind test was useless. Too many variables with similar values.

Finally I used MSI Afterburner to identify a more precise value of FEZ framerate and then create a custom resolution with that refreshrate. This is my actual solution and provides a perfect smooth framerate.

Maybe you need to use MSI Afterburner to identify the exact FEZ framerate in your computer if it's not the same than in my case.

FEZ framerate in my computer is 57.7 fps. FRAPS shows 58 fps.

Steps to create a custom resolution (this is a step list for nvidia users):

- Open Nvidia control panel
- Go to Screen -> Adjust size and position
- Select Aspect Ratio mode
- Scaling in GPU
- Go to Screen -> Change resolution
- Click in Customize.. button
- Click in New custom resolution button
- Resolution showed must be your native resolution. Don't touch Horizontal pixels
- Reduce vertical lines in 2 units (1200 to 1198, 1080 to 1078, etc depends of your native resolution)
- Set Refreshrate to 57
- Click in Sync/standard -> Manual
- Change the vertical refresh rate in the bottom right to 57.750
- Click "Test"
- After monitor test the new resolution, if all is ok, click Yes button to save the resolution.
- Don't bother is Control Panel shows your custom resolution refreshrate as exact 58 hz, internally will be different because the representation is a rounded integer.

Start FEZ and look the judder during zooming to FEZ letters. Enter into the options menu and select the new resolution (1920x1198, 1920x1078, or whatever). Restart the game and if everything is perfectly fluid, it went well. Good luck and enjoy that awesome game as must be.


  1. I'm Nuninho.

    I tried to apply 58.600 Hz at manual in NVCP but 58.000 due to integer only. :(

    1. Don't worry, the number showed is always rounded but internally works with decimals you put.

  2. Hey there, developer here :)

    What did you do on the MonoGame DLL code-wise? I'd like to change the code itself because I'm probably going to keep working on changes on MonoGame and can't use a fixed binary like this.

    It's pretty amazing that you got it fixed without the source!

  3. It's just a hack and not a fix.
    It changes the line
    this._accumulatedElapsedTime += this._gameTimer.Elapsed;
    this._accumulatedElapsedTime += this._targetElapsedTime;
    in Tick()

    Which basically simplifies the entire function down to:
    With no sleep or anything.

    So the game always runs perfectly in sync with the screen.
    But if the machine is too slow to do a solid 60fps or vsync is off the game will run at the wrong speed.

  4. Some thoughts for a more general solution
    Perhaps one could keep some of the logic and just check if the last frame was longer than 16.6 ms and do an extra DoUpdate() to catch up for slower machines.
    Unfortunately I don't have any machine that can't do 60 fps so I have no way to test it.

    This would still break if the screen is not 60HZ or vsync is off.

  5. Hi, thanks for the response.

    I'll add a CLI flag to do what you hack did, at least people that had success with your hack will be able to use it without replacing the DLL.

    MonoGame already does some of the logic you describe, and it's pretty sensitive stuff, so I'll leave it at that for now. Once the larger issues are resolved I can test with a beta branch on Steam and see what works.

  6. I feel honored for this conversation. Thank you both.

  7. File is missing , please put it somewhere more sensible than a file dump.

    Usenet , torrent etc are options with acceptable longevity without a single point of fuck-it-upitude .

    Thnx in advance for placing it somewhere else.

    Or , if aforementioned command line parameter is already implemented , please specify it.
    (for me starting fez.exe has it complaining I haven't got steam running in the background , which I have.)


  8. Could you rehost CruelToots dll. The link does not work anymore. :-(

  9. This process is very interesting to me. I would like to study it a lot. For those who want to study this, hurry to read this web too.


  10. ร้อยไหม
    ร้อยไหมปรับรูปหน้า ปรับรูปหน้าที่ไหไนดี ร้อยไหมที่ใด

    ดี? กังนัมสถานพยาบาล


    คำตอบไม่ว่าจะเป็น ร้อยไหมหน้าเรียว เป็นวีไลน์แบบประเทศเกาหลี





    ลดอายุ หน้าเด็ก ไม่เจ็บ ไม่บอบช้ำ

    ไม่บวม หน้าเป็นวีเชฟ ลดเหนียง เหนียงกระชับสมปรารถนา

    ร้อยไหม เป็นอย่างไร

    การร้อยไหม เป็น


    ผิวหน้าที่ไม่กระชับ หย่อนยาน

    คล้อย ให้กลับมากระชับ หน้าเรียว เต่งตึง เข้ารูป วีเชฟได้สมใจอยาก

    ร้อยไหม ปรับรูปหน้า
    ร้อยไหม pantip