本文介绍了如何学习游戏开发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了一段时间的网络程序员,我也可以用 Java 编程.我有一个想开发的小型多人 RPG 游戏的想法.它将通过用户 Web 浏览器中的 Java 小程序播放.

I've been a web programmer for a while and I can also program in Java. I have an idea for a small, multiplayer RPG game that I want to work on. It will be played through a java applet in the user's web browser.

我已经编写了游戏玩法的设计文档和规范.我现在想知道的是我如何开发游戏?过去我只使用过类似 windows 的商业应用程序,带有用于文本框、下拉菜单等的内置小部件.对于游戏编程,似乎我必须为游戏的 UI 构建自己的小部件/控件.

I have written the design document and specifications of the gameplay. What I'd like to know now is how I can develop the game? I've worked only with windows-like business apps in the past, with built-in widgets for textboxes, dropdowns, etc. With game programming it seems that I would have to build my own widget/controls for the UI of the game.

这些是我想到的具体问题:

These are the specific questions I have in mind:

1) 如何在下载游戏的图像、声音等时显示带有进度条的正在加载..."消息.(使用java小程序)

1) How to display a 'loading...' message with a progress bar while the game's images, sound, etc are being downloaded. (Using the java applet)

2) 如何使用自己的菜单、控件等创建游戏的 UI.例如,通过单击地图图标,它会向他们显示地图.点击好友图标可让他们与好友等聊天.

2) How to create the UI of the game with its own menu, controls, etc. Such as by clicking the map icon it would show up a map to them. Clicking the friends icon would let them chat to their friends, etc.

3) 以及我应该了解的其他一般游戏开发问题,例如我应该使用 2D 还是 3D 图形、游戏中的物理等.

3) And other, general game development issues that i should know about, like whether I should use 2D or 3D graphics, physics in games, etc.

如果有好的推荐书对我有帮助,请分享.

If there's a good recommendation for a book that will help me, do share.

推荐答案

  1. 最简单的方法是将所有内容打包到 Jar 文件中.默认屏幕确实显示了一个进度条,具有一些定制.您可以编写自定义代码来跟踪、管理和下载文件,但我个人建议不要使用这种方法.如果您搜索小程序加载器,您会找到更多信息.

  1. The easiest route is to package everything in a Jar file. The default screen does show a progress bar with some small ability to customise. You can write custom code to keep track, manage and download files but I would personally advise against this route. If you search for applet loaders you will find more information.

我不是 100% 确定你的意思,但你可以使用 Swing 组件,就像在应用程序中使用它们一样.使用带有图像的 JButton 非常简单,然后在 actionPerformed 方法中挂钩事件代码.

I'm not 100% sure what you mean, but you can use Swing components in the same way you can use them in applications. Use a JButton with an image is quite trivial, then hook the event code in the actionPerformed method.

您可能会遇到的最大问题是动画和 EDT.我之前问过这个.

The biggest problem you will probably come across is animation and the EDT. I asked about this earlier.

这个页面有一大堆对游戏开发有用的链接.Pulp core 是一个值得一试的开源框架 - 即使您不使用该框架可以查代码.

This page has a whole bunch of useful links for game development. Pulp core is an open source framework worth checking out - even if you don't use the framework you can investigate the code.

您是否应该使用 Java 小程序似乎超出了这个问题的范围,但上述许多答案给出了是否使用 Java 小程序的客观(或根本没有理由).如果这是一个用于学习 Java 的个人练习游戏,那么这是一个很好的方法.如果您希望将其公开,您需要考虑当前的采用水平是否足以满足您的需求.

Whether you should use Java applets or not seems out of scope of this question, but a lot of the above answers give objective (or no reasons at all) about whether to use Java applets. If it's a game for a personal exercise to learn Java then it's a great approach. If you wish to make it public you need to consider whether the current adoption levels are high enough for your needs.

最近小程序世界发生了变化.由于 1.6 update 10,它比 Flash 更具竞争力 - 下载大小更小(通常低于 4Mb),启动时间减少,并且 引入了新的缩放外观.

Things have changed in the applet world recently. Since 1.6 update 10 it is much more competitive with Flash - the download size is smaller (at typically under 4Mb), the startup time is reduced and a new scaling look and feel was introduced.

这篇关于如何学习游戏开发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-09 07:53