我怎么能用Java创建关卡映射? [英] How could I create level maps in Java?
问题描述
Hello CodeProject社区,
我正在用Java开发2D游戏,我希望能够使用关卡地图。
我可以通过任何方式开放,完全使用Java而无需任何额外的软件。
我想要使用数组或文本文件,然后是数字来标记不同的块/纹理。
如果可能的话,还可以告诉我如何在一个级别中创建一定数量/字符地图加载某个图像?如果可能的话,我想知道如何在屏幕的正确部分绘制图像。
谢谢!
请参阅 http://docs.oracle.com/javase/tutorial/2d /index.html [ ^ ]。
Hello CodeProject Community,
I am developing a 2D game in Java, and I would like to be able to use level maps.
I am open to any way of doing it, completely in Java without any extra software.
I either want to use arrays or text files, and then numbers to mark the different blocks/textures.
If possible could you also please show me how to make a certain number/character in a level map load a certain image? Also if possible I would like to know how I could make the image draw on the correct part of the screen.
Thanks!
See http://docs.oracle.com/javase/tutorial/2d/index.html[^].
这篇关于我怎么能用Java创建关卡映射?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!