官术网_书友最值得收藏!

Why build games to learn to program?

Fun, of course! But there are other reasons too. Successfully running any program we have written is immensely satisfying, even more so when it involves using some code that we previously didn't understand.

But making our own games, as you will soon realize, creates a feeling of pleasure that is not easy to describe—it has to be experienced. Then there are added bonuses of sharing our creations with friends on a phone or tablet or even sharing them publicly on the Google Play Store, and you might realize that once you start making games, you can't stop.

As we create more complex games steadily, you'll realize that all techniques and pieces of code can be rehashed to create other games, and you can then start planning your very own unique masterpieces. This is exhilarating to say the least.

And as with many subjects, the more we practice the better we get. So games are a perfect way to start learning to program Java. However, most beginners' books for Android games require a fairly high level of Java knowledge. But as we will see, it is perfectly possible to keep the practical examples as fun game projects and still start with the very basics of Java.

There is a slight trade-off in doing things this way. We will not always approach the working game examples in a "by-the-book" manner. This is to avoid the problem of doing cartwheels before mastering the forward roll.

The learning outcome priority will always be the Java programming concept, followed by understanding the Android environment and game design principles. Having said that, we will closely examine and practice plenty of Android and game programming fundamentals.

Of course, from what we have just discussed, you can probably surmise that it would have been possible to teach a bit more Java in the same number of pages if we hadn't been making games.

This is true, but then we lose all the benefits that come with using games as the subject matter. Making games really can be a joy, and when our brains are open and eager for information, we will learn much faster. The minimal overhead of learning this way is negated a hundred times over. If games don't interest you in the slightest, then there are plenty of Java beginners' guides out there that take the traditional approach. Just don't expect quite the same thrill as when you publish your first game with online leaderboards and achievements.

主站蜘蛛池模板: 安丘市| 沁水县| 曲阜市| 青海省| 衡山县| 竹山县| 兴化市| 镇安县| 桂东县| 白水县| 驻马店市| 安福县| 夏河县| 察隅县| 磐石市| 顺平县| 平阳县| 淮北市| 桃源县| 子洲县| 吴堡县| 定结县| 廊坊市| 平谷区| 鄂伦春自治旗| 克拉玛依市| 农安县| 永丰县| 上虞市| 定南县| 赤壁市| 新乡市| 商城县| 济南市| 深州市| 静宁县| 汉川市| 高唐县| 兰考县| 河北省| 宁国市|