MonoGame 真的是跨平台的吗? [英] Is MonoGame really cross-platform?

查看:23
本文介绍了MonoGame 真的是跨平台的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我下载 MonoGame(我将使用它代替 XNA,因为我在 Mac 上)并解压缩它时,所有 MonoDevelop 解决方案文件都被命名为 MonoGame.Framework.[PLATFORM NAME].sln,其中 [PLATFORM NAME] 是操作系统的名称.教程中的代码对于每个平台都不同,因此对于 MonoGame应用程序要在不同的机器上运行,它必须被移植.这个对吗?如果是这样,还有哪些其他版本的 XNA 用于 Mono,最好是在 Xbox 360 上工作?我见过 MonoXNA,但截至本文为止,它似乎还不够成熟,无法使用.

When I download MonoGame (which I will use in place of XNA since I'm on a Mac) and unzip it, all the MonoDevelop solution files are named MonoGame.Framework.[PLATFORM NAME].sln, with [PLATFORM NAME] being, well, the name of the OS. And the code in the tutorials is different for each platform, so it appears that for a MonoGame app to run on a different machine, it must be ported. Is this correct? If so, what other versions of XNA are there for Mono, preferably that work on the Xbox 360? I've seen MonoXNA, but it doesn't seem mature enough to use as of this post.

推荐答案

MonoGame 通过在多个平台上提供 XNA API 使 您的代码 跨平台.(但它不会使您编译的 binary 像 Flash 或 Java 那样跨平台.)

MonoGame makes your code cross-platform by providing the XNA API on multiple platforms. (But it does not make your compiled binary cross-platform like, say, Flash or Java would.)

MonoGame本身不是跨平台的,因为每个平台都有一个版本 - 因为每个版本都包含实现 XNA API 所需的大量特定于平台的代码对于那个平台.

MonoGame itself is not cross-platform, in the sense that there is a version of it for each platform - as each version contains a large amount of platform-specific code required to implement the XNA API for that platform.

(虽然实际上大量的 MonoGame 代码是跨平台的,并且在不同的 MonoGame 版本之间共享 - 因为它又构建在 Mono、OpenGL 和 OpenAL 等层上,就像 MonoGame,在平台上提供具有不同底层实现的一致 API.)

(Although in reality substantial amount of MonoGame code is cross-platform and shared between different MonoGame versions - because it is, in turn, built on layers like Mono, OpenGL and OpenAL that, like MonoGame, provide a consistent API with a different underlying implementation on platform.)

这与微软官方的 XNA 实现完全相同.XNA 库有 3 个不同版本(Windows、Xbox 360 和 Windows Phone).它们都提供 XNA API.您可以为任何这些平台构建使用 XNA API 的代码.

This is exactly the same as Microsoft's official XNA implementation. There are 3 different versions of the XNA library (Windows, Xbox 360, and Windows Phone). They all provide the XNA API. And your code that uses the XNA API can be built for any of those platforms.

MonoXNA 已经过时了,而且它的大部分有用代码已经进入了 MonoGame.

MonoXNA is pretty out of date, and most of its useful code has made it into MonoGame anyway.

据我所知,目前没有其他使用 Mono 在 OSX 上运行的 XNA 实现.ExEn,它使用 Mono - 但仅适用于 iOS 和 Android.

As far as I know there are no other current XNA implementations that use Mono to run on OSX. There's ExEn, which uses Mono - but only for iOS and Android.

在 Xbox 360 上使用 XNA 的唯一选择是使用 Microsoft 的版本.但这并不妨碍您针对 MonoGame 编译代码.

Your only option for using XNA on Xbox 360 is to use Microsoft's version. But this doesn't preclude you from also compiling your code against MonoGame.

这篇关于MonoGame 真的是跨平台的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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