Java Monkey 引擎教程

发布于 2024-12-09 22:27:20 字数 899 浏览 0 评论 0原文

我已经完成了 jme 教程系列,感觉我已经理解了基础知识。现在我想创建第一个非常简单的游戏。没什么特别的,只是一个简单的测试场景:玩家应该能够移动物体。然后我想扩展它。但我不知道如何开始。这很难解释,但我只是不知道该把代码放在哪里。该手册说,有一些“控件”(作为接口实现)可以让您将代码连接到频繁的更新调用或其他事件(这就是我的理解),但我无法掌握如何使用它们。

更详细的描述。你可以跳过这个:

为了明确一点 - 我来自 Unity3d 引擎。使用非常愉快,社区很有帮助,文档也很棒。但你必须花费大约 1000 美元才能获得完整版本并被允许使用专业功能(阴影、自定义着色器、一些高级工具......)。一段时间后,开源的诱惑实在是太大了。在unity3d中,你基本上有一个高级的3d编辑器和一个场景图。您可以将对象放置在场景中并通过场景图访问和修改它们。您可以使用预定义的对象(例如灯光或粒子系统)并更改它们以满足您的需求,但您使用的大多数东西都是定制的,并由不同的组件组合在一起:网格、碰撞器、一些脚本。这就是您的代码发挥作用的地方。在 unity3d 中,您的程序被分成小脚本,并将这些脚本添加到每个场景的对象中。这些脚本可以访问底层引擎、其对象的属性,并且可以使用特殊的数学框架、网络……每个脚本还可以定义在某些事件中调用的函数:update()、onCollisionEnter(Collider other) , onTriggerEnter(碰撞其他), ... 这非常容易使用。诚然,巨大的架构可能很难实现,但这种挫折得到了非常高的生产力的补充。

坦率地说:我需要有关如何使用 JME 构建简单游戏的建议。

  1. 您推荐什么架构?

  2. 如何使用控件?

    我希望有一个教程的链接(我已经阅读了 flagrush 系列)或任何其他资源。

感谢您的帮助

I've worked my way through the tutorial series of jme and feel like I've understood the basics. Now I would like to create a first very simple game. Nothing fancy just a simple test scenario: The player should be able to move an object. Then I would like to expand it. However I don't know how to start. It's hard to explain but I just don't know where to put my code. The manual says that there are "controls" (implemented as interfaces) that let you hook your code up to frequent update calls or other events (that's what I understood) but I can't grasp how to use them.

More detailed description. You could skip this:

To get the point clear - I'm coming from the engine Unity3d. The usage was quite pleasant, the community helpful and the documentation great. But you have to spend about 1000$ to get the full version and be allowed to use pro features (shadows, custom shaders, some advanced tools,...). After a while the temptation of open-source was simply to big. In unity3d you basically have an advanced 3d editor and a scene graph. You can place objects in the scene and access and modify them over the scene graph. You can use predefined objects such as lights or particle systems and change them to suit your needs but most things you use are custom made and puzzled together by different components: a mesh, a collider, a few scripts. And this is where your code comes to work. In unity3d your program is split into small scripts and these are added to the objects of each scene. The scripts have access to the underlying engine, the properties of their object and can use a special framework for math, networking,... Each script can also define functions to be called in certain events: update(), onCollisionEnter(Collider other), onTriggerEnter(Collision other), ...
This was extremely easy to use. Admittedly huge architectures can be difficult to implement but this setback was complemented by very high productivity.

Frankly: I need advice how to structure a simple game with JME.

  1. What architecture do you recommend ?

  2. How are controls used ?

    I would appreciate a link to a tutorial (I already read the flagrush series) or any other resource.

Thank you for your help

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

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

发布评论

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

评论(1

惯饮孤独 2024-12-16 22:27:20

我不确定您对教程的阅读程度如何,但它们从字面上解释了您所要求的内容。

无论如何,您对所有内容进行编码,这样您就不会添加对象并将代码放入其中,而是通过代码实例化对象。

输入由 InputManager 处理,只要您仍然使用 SimpleApplication 作为基础,您就不必考虑它并按照您在 本教程

I'm not sure how well you read the tutorials but they quite literally explain the things you asked for.

Anyway, you code everything so you don't add an object and put code in it you instance an object trough code.

Input is handled by the InputManager, as long as you still use SimpleApplication as foundation you don't have to think about it and use it the way you learned in this tutorial

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