将 Luabind 转换为 C#?
有人尝试过将 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
理论上可以继续从 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 ;)