We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
我不会选择单个库,而是会快速概述所有库,如 Hackage 上的图形部分。
基本框架:
OpenGL
GTK
QTHaskell
SDL
X11
古老的 Unix 用户界面。
示例:xmonad。
GD
GD图形系统。 黑客包。
示例:wordcloud、sparklines。
HOgre
绑定到 Ogre 游戏图形系统。
现在,除了这些游戏层之外,还有许多更高级别的框架和工具:
图表
2D 矢量图(例如数学),基于 cairo 构建。
光泽
2D图形,非常简单的界面,相对较新。请参阅 TomMD 的评论。
Cal3D
绑定到 Cal3D 动画包。
黑板
用于生成图像的基于 OpenGL 的组合器,用于教学。
TeaHS
一个用于创建 2D 游戏的简单库,灵感来自Ruby 库 Tea。
Instead of picking individual libraries, I'll have a go at a quick overview at all of them, as listed in the Graphics section on Hackage.
Basic frameworks:
OpenGL
GTK
QTHaskell
SDL
X11
Venerable Unix user interfaces.
Examples: xmonad.
GD
The GD graphics system. Package on hackage.
Examples: wordcloud, sparklines.
HOgre
Bindings to the Ogre game graphics system.
Now, besides these game layers, there are many higher level frameworks and tools:
Diagrams
2D vector diagrams (e.g. for math), built on cairo.
Gloss
2D graphics, very easy interface, relatively new. See TomMD's comment.
Cal3D
Bindings to the Cal3D animation package.
Chalkboard
OpenGL-based combinators for generating images, used in teaching.
TeaHS
A simple library for use creating 2D games, inspired by the Ruby library Tea.
如果您正在寻找专门的游戏库,您可以在此处找到许多选项< /a>. FunGEn 可能是这些库中的最佳选择。但是,您的问题似乎表明,如果您只想绘制文本并接收输入,那么游戏库有点矫枉过正。在这种情况下,您可能会选择更简单的东西,例如 HOpenGL 或 hsSDL。 此处还列出了其他几个库。
编辑:经过更多研究,您可能会很好地使用 haskgame。我自己从未使用过它,但看起来它有一些功能 此处 正是您所寻找的。
If you're looking for a specialized game library, you have a number of options that you can find here. FunGEn is probably your best option out of those libraries. However, your question seems to suggest a game library would be a bit overkill, if all you're looking to do is draw text and receive input. In that case, you might opt for something simpler like HOpenGL or hsSDL. There are also several other libraries listed here.
Edit: After a bit more research, you might do well using haskgame. I've never used it myself, but it looks like it's got a few functions here that do exactly what you're looking for.
我推荐新的 Gloss 库 作为获得良好结果的简单方法。
还有不错的示例,例如:
和一个很好的示例构建 植绒模拟器
另外,如果您要操作的是矢量和文本,diagrams 包可以产生非常好的结果。
I'd recommend the new Gloss library as an easy way to get good results.
There are also nice examples, such as:
and a nice example building flocking simulators
Alternatively, if it is vectors and text you want to manipulate, the diagrams package on top of cairo can yield very good results.
你可以使用Qt。这就是跨平台 Nikki And The Robots 所使用的。您可以查看他们的源代码并了解他们在做什么。
You could use Qt. That's what the cross platform Nikki And The Robots is using. You can see their source code and take a look at what they're doing.