赛车游戏警告转换为4.0时 [英] Racing Game warnings when converted to 4.0

查看:115
本文介绍了赛车游戏警告转换为4.0时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,又是我.

首先:

我让PacMan工作了.耶!现在,它是一个(几乎)完整的带有弹丸和能量提升功能的游戏...

现在开始提问.
我将赛车游戏入门套件升级到XNA 4.0,因为我将完全重做它.但是由于某种原因,它将无法运行(由于图形卡),我得到了这些奇怪的警告:

警告编译C:\ Projects \ XNA \ Projects \ Racing Games \ XNA-4-Racing-Game-Kit \ RacingGameWindows1 \ RacingGame \ RacingGameContent \ Shaders \ NormalMapping.fx:

警告X3571:pow(f,e)不适用于负数f,请使用abs(f)或有条件地处理负数. C:\ Projects \ XNA \ Projects \ Racing Games \ XNA-4-Racing-Game-Kit \ RacingGameWindows1 \ RacingGame \ RacingGameContent \ Shaders \ NormalMapping.fx

等等.有谁知道这些警告的含义,以及是否与应用程序未运行有关?

我在Windows 7台式机上安装了Intel视频卡,并且正在使用到达"配置文件.

谢谢!

Well guys, it''s me again.

First of all:

I got PacMan working. Yay! It is now a (almost) complete game with pellets and powerups...

Now to the question.
I am upgrading the Racing Game starter kit to XNA 4.0, because I am going to totally redo it. But for some reason, it will not run (because of graphics card), and I get these weird warnings:

Warning compiling C:\Projects\XNA\Projects\Racing Games\XNA-4-Racing-Game-Kit\RacingGameWindows1\RacingGame\RacingGameContent\Shaders\NormalMapping.fx:

Warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them.
C:\Projects\XNA\Projects\Racing Games\XNA-4-Racing-Game-Kit\RacingGameWindows1\RacingGame\RacingGameContent\Shaders\NormalMapping.fx

and so on. Does anyone know what these warnings mean, and if they have anything to do with the application not running?

I have a Intel video card, on a Windows 7 desktop machine, and I''m using the Reach profile.

Thanks!

推荐答案

恭喜吃豆人!您的图形卡不会导致该游戏无法运行,因为您运行了机器人游戏就可以了吗?

我建议您去这里,获取已经转换为XNA 4.0的赛车游戏.
https://github.com/Pepsi1x1/XNA-4-Racing-Game-Kit [ ^ ]

这是该页面的链接,用于以zip文件的形式下载档案文件
https://github.com/Pepsi1x1/XNA-4-Racing-Game-Kit/zipball/master [ ^ ]

注意:进入这些选项并启用/禁用屏幕后效果,阴影和高细节以获得最佳外观的图形.

希望这会有所帮助.
Congratulations on PacMan! Your graphics card should not be causing this game not to run because you ran the Robot Game just fine correct?

I recommend that you go here and grab the racing game already converted to XNA 4.0
https://github.com/Pepsi1x1/XNA-4-Racing-Game-Kit[^]

Here is the link from that page to download the archive as a zip file
https://github.com/Pepsi1x1/XNA-4-Racing-Game-Kit/zipball/master[^]

Note: Go into the options and enable/disable post screen effects, shadows, and high detail to get the best looking graphics.

Hope this helps.


您还期望f的其他否定因素吗?值f将在功率e中升高.每个人都应该从小学代数知道,幂运算不是在整个实数集上定义的. (不是在复数上定义的.)

考虑一下(实数为-1的平方根):

What else would you expect of f is negative? The value f is to be raised in the power e. Everyone should know from elementary school algebra, that power operation is not defined on the whole set of real numbers. (It is defined on complex numbers which is not the case.)

Consider this (square root from real -1):

double pow = 0.5;
double bs = -1;
double x = Math.Pow(bs, pow);



在Windows的.NET中,该值为System.Double.NaN(不是数字),这是非常合理的结果. x86,IE-64和x86-64的处理器以及指令集体系结构允许某些浮点运算返回NaN的模式,或者该运算引发异常的模式-全部合法.您在先前的系统编译中没有遇到任何麻烦.很难说为什么,但它很容易发生.

考虑一下自己很幸运.您将免费获得不兼容的诊断信息!重新查看您的计算结果,找出为什么有这样的电源操作输入值并修复代码.

—SA



In .NET for Windows, the value is System.Double.NaN (not a number), which is a very reasonable result. The processors of x86, IE-64 and x86-64 and instruction-set architectures allow the mode where some floating point operations return NaN, or the mode where such operation throw exception — all legal. You just did not come across any trouble in your previous compilation of the system. Hard to say why but it can easily happen.

Consider yourself lucky. You got a diagnostics of incompatibility free of charge! Re-visit your calculations, find out why you have such input values for power operation and fix your code.

—SA


这篇关于赛车游戏警告转换为4.0时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆