在游戏引擎中使用 F#

发布于 2024-11-03 03:38:21 字数 406 浏览 2 评论 0原文

我目前正在创建一个 roguelike 游戏,并且已经开始用 C# 进行编码,但还没有编码太多( <1000 行)到目前为止...

现在我再次了解了 F#,这种语言似乎非常酷...我现在正在考虑使用 F# 作为游戏引擎,我认为这将是90% 的代码线(roguelike 游戏有一个非常“精简”的 ASCII-UI)。

您认为 F# 是否比 C# 更适合为程序内容生成、复杂 AI 和游戏逻辑编写代码?你看到任何陷阱了吗(当然,除了我必须首先掌握语言)?

我担心 F# 是否不仅仅是一个研究项目并且会被 Microsoft 放弃,或者是否有声明称它现在是主要的 .NET 语言?

感谢您的意见。

I'm currently creating a roguelike game and have already started coding in C# but have not coded much (<1000 lines) so far...

Now again, I have had a look at F# and this language seems to be very cool...I'm considering now using F# for the game engine, which, I think, will be 90% of the codeline (A roguelike has a very 'lean' ASCII-UI).

Do you think, F# would be better suited than C# concerning writing coding for procedural content generation, complex AI and game logic? Do you see any traps (apart from that I have to master the language first, of course)?

I've some concerns if F# is not just a research project and will be abandoned by Microsoft or are there statements that it is now a major .NET language?

Thanks for your input.

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

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

发布评论

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

评论(3

尾戒 2024-11-10 03:38:21

我没有看到任何陷阱。

F# 完全支持 .NET,即使它主要是一种函数式语言,您也可以毫无问题地实现 OO 范式。

与 C# 的互操作也是非常可能的,因此您甚至可以返回 C# 而无需放弃 F# 代码。

至于它的未来:

它现在作为稳定语言成为 VS 的一部分,因此它正朝着与 VB 和 C# 一起成为主要 .NET 语言之一的方向发展。

I don't see any traps.

F# fully supports .NET and even though it's mainly a functional languague you can implement the OO paradigma without a problem.

Also interop with C# is very well possible, so you could even go back to C# without giving up your F# code.

And as for it's future :

It's now part of VS as a stable language, so it's going very much in the direction of being one of the main .NET languages together with VB and C#.

唱一曲作罢 2024-11-10 03:38:21

F# 现在是一个完整的 MS 产品,函数式编程在未来将变得越来越重要,所以我不担心 MS 很快就会失去对它的兴趣。

F# is now a full MS product, and functional programming will be increasingly important in the future, so I wouldn't worry about MS losing interest in it any time soon.

风情万种。 2024-11-10 03:38:21

F# 在这里应该是一个不错的选择。我怀疑您会拥有一些有趣的状态机,并且我发现 F# 特别适合于此。

F# should be a great choice here. I suspect you'll have some interesting state machines and I've found F# to be particularly good for that.

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