Book Description
A hands-on introduction to coding that teaches you how to program bots to do cool things in the game you love–Minecraft! This book takes the robotic “turtle” method, and extends it to the 3D, interactive world of Minecraft.
You’ve mined for diamonds, crafted dozens of tools, and built all sorts of structures–but what if you could program robots to do all of that for you in a fraction of the time?
In Coding with Minecraft®, you’ll create a virtual robot army with Lua, a programming language used by professional game developers. Step-by-step coding projects will show you how to write programs that automatically dig mines, collect materials, craft items, and build anything that you can imagine. Along the way, you’ll explore key computer science concepts like data types, functions, variables, and more.
Learn how to:
- Program robots that make smart decisions with flow control
- Reuse code so that your robots can farm any crop you want, including wheat, sugar cane, and even cacti!
- Program a factory that generates infinite building supplies
- Design an algorithm for creating walls and buildings of any size
- Code yourself a pickaxe-swinging robotic lumberjack!
- Create a robot that digs mine shafts with stairs so you can explore safely
Bonus activities in each chapter will help you take your coding skills to the next level. By the end of the book, you’ll understand how powerful coding can be and have plenty of robots at your beck and call.
Table of Contents
Chapter 1: Getting Started with ComputerCraft
Chapter 2: Programming Basics
Chapter 3: Talking to Your Turtle
Chapter 4: Programming Turtles to Dance
Chapter 5: Making a Better Dancer
Chapter 6: Programming a Robot Lumberjack
Chapter 7: Creating Modules to Reuse Your Code
Chapter 8: Running an Automated Tree Farm
Chapter 9: Building a Cobblestone Generator
Chapter 10: Making a Stone Brick Factory
Chapter 11: Constructing Walls
Chapter 12: Constructing Rooms
Chapter 13: Constructing Floors
Chapter 14: Programming a Robotic Farm
Chapter 15: Programming a Staircase Miner
中文:
书名:用我的世界编码:建得更高,农场更快,挖得更深,让枯燥的东西自动化
这是一个编程的实践入门,教你如何编写机器人在你喜欢的游戏中做一些很酷的事情–;我的世界!这本书采用了机器人乌龟的方法,并将其扩展到3D的互动世界《我的世界》。
你开采过钻石,制作过几十种工具,建造过各种各样的建筑,但如果你能为机器人编程,让它们在很短的时间内为你完成所有这些事情,你会怎么样?
在……里面 用《我的世界》®编码,你将使用专业游戏开发人员使用的编程语言Lua创建一支虚拟机器人大军。循序渐进的编码项目将向您展示如何编写自动挖掘矿山、收集材料、手工制作物品以及构建任何您能想象到的东西的程序。在此过程中,您将探索关键的计算机科学概念,如数据类型、函数、变量等。
了解如何执行以下操作:
- 编程机器人,通过流量控制做出明智的决策
- 重用代码,这样你的机器人就可以种植你想要的任何作物,包括小麦、甘蔗,甚至仙人掌!
- 为一家生产无限建筑用品的工厂编程
- 设计用于创建任意大小的墙和建筑的算法
- 把你自己编码成一个挥动镐的机器人伐木工!
- 创建一个可以用楼梯挖掘矿井的机器人,这样你就可以安全地探索了
每章中的奖励活动将帮助您将编程技能提升到一个新的水平。到本书结束时,你会明白编码是多么强大,并且有大量的机器人可以随时听从你的指挥。
目录表
第1章:ComputerCraft入门
Chapter 2: Programming Basics
第三章:与你的乌龟对话
第4章:编程让海龟跳舞
第五章:让舞者变得更好
第6章:机器人伐木工人编程
第7章:创建模块以重用代码
第8章:运行自动化林场
Chapter 9: Building a Cobblestone Generator
第十章:建造一座石砖工厂
Chapter 11: Constructing Walls
Chapter 12: Constructing Rooms
第13章:建造楼层
第14章:为机器人农场编程
第15章:编程楼梯挖掘器
评论前必须登录!
注册