将 Luabind 转换为 C#?

发布于 2024-08-27 10:51:26 字数 175 浏览 5 评论 0原文

有人尝试过将 Luabind 转换为 C# 吗?这样的事有可能吗?

我有一个应用程序想要转换,以便它可以在完全托管的环境中运行,但大多数游戏逻辑依赖于 Lua 脚本,并且该应用程序使用 Luabind 来管理来回。我对 Lua 或 Luabind 不太熟悉,不知道其中涉及什么。

我来这里是不是在做傻事?

Has anybody tried converting Luabind to C#? Is such a thing even possible?

I've got an application that I want to convert so that it can run in a completely managed environment, but most of the game logic relies upon Lua scripts, and the application uses Luabind to manage the back-and-forth. I'm not familiar enough with Lua or Luabind to know what's involved.

Am I on a fool's errand here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心在旅行 2024-09-03 10:51:26

理论上可以继续从 C# 运行 Lua(而不是将 Lua 转换为 C#)。然而,如果在 C++ 和 Lua 之间使用 Luabind,事情就会变得有点复杂,因为 luabind 向 Lua 添加了很多东西,我不确定这是否可以被模拟或忽略。这实际上很大程度上取决于依赖 Luabind 的哪些部分。看看 LuaInterface,它是 .NET 和 Lua 之间的一个很好的中介。

总而言之,我想说这个任务可能是可行的,但是非常乏味且容易出错,大部分 Lua 代码肯定也需要更新。我会留在本机方面,无论如何 .NET 都被高估了;)

It's theoretically possible to keep running Lua from C# (not to convert Lua to C#). However, if Luabind is used between C++ and Lua, that will complicate things a bit, as luabind adds a lot of stuff to Lua and I'm not sure this could be simulated or ignored. It really depends a lot on what parts of Luabind are relied upon. Have a look at LuaInterface, it's a good mediator between .NET and Lua.

All in all, I'd say this task is probably doable, but very tedious and error prone, large parts of the Lua code will most certainly have to be updated as well. I'd stay on the native side, .NET is overrated anyway ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文