uwp windows_如何在Windows 10的UWP游戏中监视FPS

uwp windows

uwp windows

Tools like FRAPS and NVIDIA’s ShadowPlay are great for monitoring your game performance on Windows, but they don’t work with Microsoft’s Universal Windows Platform (UWP) games. Thankfully, a few tools will let you monitor your framerate and benchmark games made for Windows 10’s new application platform.

FRAPS和NVIDIA的ShadowPlay之类的工具非常适合监视Windows上的游戏性能,但不适用于Microsoft的Universal Windows Platform(UWP)游戏 。 幸运的是,有一些工具可以让您监视为Windows 10的新应用程序平台制作的帧速率和基准游戏。

Some individual games may have integrated FPS counters you can use instead, but most don’t. The tools here will let you monitor your FPS in games like Quantum Break, Gears of War: Ultimate Edition, Forza Motorsport 6: Apex, and the Windows Store version of Rise of the Tomb Raider.

某些单独的游戏可能具有集成的FPS计数器,您可以使用它来代替,但大多数却没有。 此处的工具可让您在诸如Quantum Break ,《 战争机器:终极版》 ,《 Forza Motorsport 6:Apex 》和Windows Store版本的《古墓丽影崛起》等游戏中监控自己的FPS。

PresentMon是免费的,但需要一点工作 (PresentMon Is Free, but Requires a Little Work)

PresentMon is an open source tool created by a developer at Intel. It uses event tracing to monitor the underlying Windows operating system for “present” commands and logs information about them. This allows it to monitor the performance of DirectX 10, DirectX 11, and DirectX 12 games. It works even if those applications are Universal Windows Platform (UWP) apps, which are distributed via the Windows Store. In other words, this tool works because it doesn’t need to interact with the UWP app–it’s not allowed to do that. It monitors Windows at a lower level.

PresentMon是由英特尔开发人员创建的开源工具。 它使用事件跟踪来监视基础Windows操作系统中的“当前”命令并记录有关它们的信息。 这使它可以监视DirectX 10,DirectX 11和DirectX 12游戏的性能。 即使这些应用程序是通过Windows应用商店分发的通用Windows平台(UWP)应用程序,它也可以工作。 换句话说,该工具之所以有效,是因为它不需要与UWP应用交互-不允许这样做。 它在较低级别监视Windows。

This is a command line application, so there’s no pretty graphical interface. An enterprising developer could create a graphical tool built on this command-line program to make this easier in the future.

这是一个命令行应用程序,因此没有漂亮的图形界面。 有进取心的开发人员可以在此命令行程序的基础上创建图形工具,以使其在将来更加容易。

Unfortunately, it takes some work to get going at the moment. You’ll need to visit the PresentMon repository page and click “Download ZIP” to download the repository. Then, you’ll need to download the free Visual Studio Express Community Edition from Microsoft. Install Visual Studio and allow it to update itself.

不幸的是,这需要一些工作才能开始。 您需要访问PresentMon存储库页面 ,然后单击“下载ZIP”以下载存储库。 然后,您需要从Microsoft下载免费的Visual Studio Express社区版 。 安装Visual Studio并允许其自行更新。

Unzip the downloaded PresentMon repository file and double-click the “PresentMon.sln” file to open it in Visual Studio. Visual Studio will offer to download the compiler.

解压缩下载的PresentMon存储库文件,然后双击“ PresentMon.sln”文件以在Visual Studio中将其打开。 Visual Studio将提供下载编译器。

When it’s done downloading and installing the required software, you can open the PresentMon.sln file in Visual Studio and build the application. Just click Build > Build Solution to build it.

完成下载和安装所需的软件后,您可以在Visual Studio中打开PresentMon.sln文件并构建应用程序。 只需单击构建>构建解决方案即可构建它。

You’ll then get an x64 directory, assuming you’re on a 64-bit version of Windows 10 (which you probably are). This contains the PresentMon64.exe command you can use. You can place this file in a more convenient directory, like your Desktop or Downloads folder, if you like.

然后,假设您使用的是Windows 10的64位版本(可能是),则将获得x64目录。 它包含您可以使用的PresentMon64.exe命令。 您可以根据需要将此文件放置在更方便的目录中,例如“桌面”或“下载”文件夹。

You’ll need to use the process ID of a UWP app to monitor it. First, launch a game. Next, open the Task Manager by pressing Ctrl+Alt+Escape.

您需要使用UWP应用的进程ID进行监视。 首先,启动游戏。 接下来,通过按Ctrl + Alt + Escape打开任务管理器。

Right-click the heading on the Processes tab and enable the “PID” column. If you don’t see the Processes tab, click “More Details.”

右键单击“进程”选项卡上的标题,然后启用“ PID”列。 如果看不到“进程”选项卡,请单击“更多详细信息”。

Find the running UWP game you want to monitor and note its PID number. This process ID number will change each time you launch the application, so you’ll have to find it again if you close and reopen the game.

找到您要监视的正在运行的UWP游戏,并记下其PID号。 每次启动应用程序时,此进程ID号都会更改,因此,如果关闭并重新打开游戏,则必须再次找到它。

You’ll need to open a Command Prompt window as Administrator to run this command. To do so, right-click the Start button or press Windows+X, and then click the “Command Propmt (Admin)” option.

您需要以管理员身份打开“命令提示符”窗口以运行此命令。 为此,请右键单击“开始”按钮或按Windows + X,然后单击“命令提示符(管理)”选项。

Change to the directory containing the PresentMon64.exe command. Just type “cd” followed by the path to the directory you’re storing the PresentMon64.exe file in.

转到包含PresentMon64.exe命令的目录。 只需键入“ cd”,然后键入要在其中存储PresentMon64.exe文件的目录的路径即可。

cd C:\path\to\PresentMon-master\x64\Debug

Then, run the following command, replacing #### with the process ID number of the application you want to monitor.

然后,运行以下命令,将####替换为要监视的应用程序的进程ID号。

PresentMon64.exe -process_id ####

You’ll see the FPS of the application you specify displayed in the Command Prompt window. It won’t overlay the game, so you’ll have to Alt+Tab back here when you want to check it.

您将在“命令提示符”窗口中看到指定的应用程序的FPS。 它不会覆盖游戏,因此要检查它,您必须将Alt + Tab返回此处。

Dxtory轻巧易用,但要花钱 (Dxtory Is Slick and Easy, But Costs Money)

Dxtory is a more user-friendly alternative. Like PresentMon, Dxtory grabs its data from a lower level in Windows. it doesn’t need to interact directly with the game application, which means it works with those UWP games. You’ll need to download the “latest” build and not the “stable” build–at least build 2.0.134–as the latest builds fix compatibility issues with DirectX 12 applications.

Dxtory是更用户友好的替代方法。 与PresentMon一样,Dxtory在Windows中从较低级别获取数据。 它不需要直接与游戏应用程序进行交互,这意味着它可以与那些UWP游戏一起使用。 您需要下载“最新”版本而不是“稳定”版本(至少是版本2.0.134),因为最新版本修复了DirectX 12应用程序的兼容性问题。

Unlike PresentMon, it offers a graphical user interface. It can even overlay its FPS counter over UWP games. This is more of a true alternative to FRAPS, with all the bells and whistles.

与PresentMon不同,它提供了图形用户界面。 它甚至可以将其FPS计数器覆盖在UWP游戏上。 对于所有的钟声,这都是FRAPS的真正替代产品。

This application is paid software, although there is a trial you can use. The developer charges 3800 JPY for a license, which is about $34.50 USD.

尽管您可以使用试用版,但该应用程序是付费软件。 开发人员为许可证收取3800日元的费用,约合34.50美元。

Just launch the Dxtory application and then launch–or Alt+Tab back to–your UWP game. An FPS counter will be overlaid over the top-left corner of the UWP game.

只需启动Dxtory应用程序,然后启动(或Alt + Tab)回到您的UWP游戏。 FPS计数器将覆盖在UWP游戏的左上角。

You can also switch back to the Dxtory application to see more information and customize your settings. But you don’t have to do anything special to set this up–open Dxtory, launch a UWP game, and it will just work. If you want to get rid of the FPS counter, just close the Dxtory application.

您也可以切换回Dxtory应用程序以查看更多信息并自定义设置。 但是您无需做任何特别的事情来设置此功能-打开Dxtory,启动UWP游戏,它就可以工作。 如果要摆脱FPS计数器,只需关闭Dxtory应用程序。



In the future, more gaming tools–like NVIDIA’s ShadowPlay–may be updated to work along with Microsoft’s new app platform. For now, only a handful of tools work and you’ll need to go out of your way to use them with UWP games. Microsoft’s UWP platform is still a work in progress, and nowhere is that more obvious than with PC games.

将来,可能会更新更多游戏工具(例如NVIDIA的ShadowPlay)以与Microsoft的新应用程序平台一起使用。 目前,只有少数工具可以使用,并且您需要全力以赴将它们用于UWP游戏。 微软的UWP平台仍在开发中,没有比PC游戏更明显的地方了。

翻译自: https://www.howtogeek.com/256108/how-to-monitor-your-fps-in-uwp-games-on-windows-10/

uwp windows

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值