了解如何使用CodeGym在Java中编写您的第一个游戏

We’ve got a problem, Cap!

大多数尝试自行学习编程(或其他方法)的尝试都失败了。 由于各种原因,每个自学成才的风险都会失去动力。 例如,某些编码主题可能看起来过于复杂和难以理解。 或者,相反,您如此轻松地移动,以至于您怀疑朝正确的方向移动。 估计自己的成功很难。 怎么做? 去哪儿? 而且,由于新手程序员看不到工作的最终结果或中间结果,因此他们常常会失去动力。

It’s too dark in here… I can’t see the results of my job!

这个问题不仅在学生中而且在专业程序员中都是典型的。 在大型团队中从事大型复杂项目并在大型程序中编写一小段代码的软件开发人员。 这件作品的效果并不总是可见的,更多的是它丢失在那里,淹没在同事们制作的相同作品中。

编程学生有稍微不同的问题。 他们通常会学习一些主题,解决一些任务以巩固脱离现实的知识,但在全球范围内却看不到他们学到的东西以及他们实际可以做或不能做的事情。 实际上,结果与专业人员相同:他们看不到努力的结果。

Yep, quite a problem… What should you do?

放弃编程学习不是一个好主意。 更好的方法是用其他东西稀释它。 对您来说有趣的是,结果将可见。

在大型外包和产品公司工作的程序员经常通过创建自己的项目来“娱乐”自己。 我们建议高级学生使用相同的方法。 新手开发人员通常会根据经典游戏编写小型游戏,有时他们会实现自己的想法。

But what should coding rookies do, those who are not ready for a relatively interesting project on their own? Now on the Internet, you can find enough step-by-step instructions. Following them, a student creates their own project with the help of more experienced developers. A great example is free to use CodeGym Game Section. There you can create your own versions of classical games under the clear guidance of professionals. Now you can try to write your own interpretation of 6 games: Minesweeper, 2048, Snake, Space Invaders, Moon Lander, and Racer.

了解如何使用CodeGym在Java中编写您的第一个游戏

To code such game, you need to have only basic knowledge of Java, which can be obtained quite quickly: initial knowledge about classes and objects, basic primitive data types, String, loops and branches, arrays and initial knowledge about the ArrayList structure. The CodeGym authors recommend completing the first 5 to 10 levels of the course to get such knowledge. If you don’t feel confident enough, here is a useful theory that helps you to solve the tasks.

However, CodeGym Games section is apart of the main course and available to everyone, not only for CodeGym students.

每个游戏都由两个子任务以及分步说明来划分。 首先,您获得子任务和提示,然后编写代码。 完成后,CodeGym自动验证系统将检查您的代码。 如果一切正常,请转到下一步。

了解如何使用CodeGym在Java中编写您的第一个游戏

When you complete the last step, you get a ready-to-use game. You are free to publish it on the site, and sharing with your friends or modify the code to improve it or propose something original into old ideas. All the games use simple CodeGym game engine, you can read about it in this article.

CodeGym Games部分是编写您的第一个完整游戏项目,对其进行修改以及了解如何自己开发独立项目的好方法。 经过这样的练习,您准备继续学习,并在不久的将来考虑自己的原始项目。

More about CodeGym Games: https://codegym.cc/groups/posts/137-new-section-on-codegym–games

Go to code: https://codegym.cc/projects/games

First published on Technotification

from: https://dev.to//codegym_cc/learn-how-to-code-your-first-game-in-java-with-codegym-2220