吃豆人游戏:处理编程语言和动作脚本

发布于 2024-09-04 23:01:22 字数 548 浏览 10 评论 0原文

我将简单地根据我想要制作的吃豆人游戏来命名它。

有人建议我也许可以从一种比 DirectX 等开销更少的编程语言或平台开始。我可以同意这一点,特别是因为这样我就可以专注于游戏的设计而不是实现——我认为在这个阶段这更重要。

我想知道Processing作为一种能够创建简单游戏的语言有什么优点。图像的创建看起来几乎非常简单,这给了我很大的空间来处理算法。但是,我想知道该语言是否适合游戏以及可能的资源密集型代码?

乍一看,这几乎就像 Actionscript 的简化版本,这是一种试图轻松生成图像的语言。 ActionScript 是我已经编写过的程序,但不喜欢。出于某种原因,这种语言对我来说并不那么有吸引力。处理也不是那么多,但我觉得它的图像处理能力使它超过了我对语法的负面看法。

所以我的问题是,人们对 Processing 的体验如何,我将其与 ActionScript 进行比较真的合理吗?它适合用来制作游戏吗?我认为,尽管我创建图像时非常舒适和轻松,但我觉得整个程序的速度会降低,特别是当我引入算法时。

此外,如果它适合创建一个简单的吃豆人游戏,我是否应该尝试使用 ActionScript?

I'll simply title this in concordance with my Pac-Man game that I want to make.

I was suggested to perhaps start with a programming language or platform that uses less overhead than, say, DirectX. I can agree to that, especially because then I can focus on the design of the game rather than the implementation- something I think is more important at this stage.

I was wondering what merits Processing has as a language capable of creating simple games. The creation of images seems almost trivially easy, which allows me a lot of play-room to mess with the algorithms. However, I wanted to know if the language is suited for a game and possibly resource-intensive code?

At first glance, this looks almost like a simplified version of Actionscript, a language that tries to easily produce images. ActionScript is something I have already programmed in, but do not like. The language, for some reason, isn't that appealing to me. Processing isn't so much either but I feel the image processing capabilities of this make it outweigh my negative view of the syntax.

So my question is, what are the people's experience with Processing, and am I really justified in comparing it to ActionScript? Is it suitable for creating games at all? I figure with all the comfort and ease I have creating images, I feel the speed of the program as a whole would be decreased, especially when I introduce algorithms.

Furthermore, if it is suitable for creating a simple pac-man game, should I try ActionScript instead anyway?

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

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

发布评论

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

评论(2

长亭外,古道边 2024-09-11 23:01:22

嗯,你不仅选择语言,还选择平台。 AS3 表示 FlashPlayer,Processing 表示 JVM。我认为处理不一定需要变得更慢或更快。就 pacman 而言,这完全是渲染速度的问题。我不知道Processing用什么来渲染,但如果是jOGL,有可能超越FlashPlayer(取决于图形的种类)。

我认为,核心问题是,你想把游戏发展到哪里。如果只是一个原型,flash和processing都是不错的工具,各有各的优点和缺点。如果您确实希望这成为一个远景,那么您还应该考虑几个因素:

  • 由于 Flash 的市场渗透率和庞大的游戏(和游戏开发)社区:
    • 对于这两种发行版来说,Flash 可能是更好的平台。
    • 市面上有很多 Flash 游戏引擎(也可以处理多人游戏等),但我在 Processing 中却找不到类似的引擎。
  • 据我所知,AS3是一种更“严肃”的语言,旨在开发应用程序,而Processing则专注于快速原型设计和图像处理。

现在另一个问题是,AS3 和Processing 中你不喜欢什么。就我个人而言,我改用了 Haxe,事实证明,它比 AS3 更好地利用 FlashPlayer,并且更具表现力和优雅的语言。不过,由于我不知道你的具体问题是什么,所以我无法给你建议。

Well, you're not only choosing languages, but also choosing platforms here. AS3 means FlashPlayer, Processing means JVM. I don't think processing has to necessarily needs to turn out slower, or faster. In the case of pacman, this is all a matter of rendering speed. I don't know what Processing uses for rendering, but if it is jOGL, it is possible to outperform FlashPlayer (depending on the kind of graphics).

I think, the core question is, where you want to be going with the game. If it is just a prototype, both flash and processing are good tools, each having its own strengths and weaknesses. If you really want this to be a long shot, then you also should consider several factors:

  • Due to Flash's market penetration and a big gaming (and game developement) community:
    • Flash probably is a better platform for both distribution.
    • There's a number of flash game engines (also dealing with multiplayer etc.) out there, whereas I found similar engines to build on in Processing impossible to find.
  • From what I can tell, AS3 is a more "serious" language, aiming for developement of applications, whereas Processing focuses on fast prototyping and image processing.

Now another question is, what you don't like in both AS3 and Processing. Personally, I switched to Haxe, which proved to leverage the FlashPlayer better than AS3 does, and is a far more expressive and elegant language. However, since I don't know what your exact problem is, I cannot really give you advice.

波浪屿的海角声 2024-09-11 23:01:22

经过多年的使用处理,我可以说该语言将自己强加为画布语言,并在 js、python 和 ruby​​ 中实现。

如果你喜欢画布,你也许会理解它的简单性
即可绘制一条线

line(x1,x2,y1,y2);

仅将其与本机 js 或 python 语法进行比较
因此,处理可以让您更多地关注想法,而不是纠结于特定于平台的概念,

在浏览器和桌面上都使用它制作了许多游戏。

与动作脚本相比,我觉得处理更加跨平台且用户友好,这使得释放您的创造力成为一件轻松的工作!

after years of using processing, i can say that the language imposed itself as the canvas language with implementations in js, python and ruby.

if you like the canvas, you'll maybe understand the simplicity of it
a line is drawn with only

line(x1,x2,y1,y2);

compare this with native js or python syntax
as such, processing allows you to focus more on ideas rather than struggling with platform specific concept

numerous games have been produced with it both on the browser and in desktop.

compared to action script, i feel that processing is far more cross platformed and user friendly which makes unleashing your creativity a painless job !

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