|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/alien-farm-game-cpp-sdl2-from-scratch/
课程评论:没有评论
课程名称:从零开始使用C++ SDL2制作外星农场游戏 课程概述: 本课程旨在指导学员如何使用C++和SDL2图形库创建一个外星农场游戏。学员将能够在游戏中放置土壤、水以及不同颜色的草,还可以添加和删除各种类型和大小的植物和动物。植物将具有阴影效果,可上下移动,并从小生长到大的特性,并只能在适合的地块上存在。动物同样具有阴影效果,可自主移动,避免与植物、其他动物以及特定地块(如水)的重叠。 课程内容将包括: 1. **瓷砖系统**:首先创建一个简单的紫色格子网格,熟悉基本设置,接着改进为可放置不同颜色瓷砖的系统,并加入自动生成阴影的算法,以增强深度感。最后,学习如何处理水瓷砖的添加与移除,影响周围土壤的湿干状态。 2. **植物设计**:学员将学习如何设置简单的植物,并通过鼠标和键盘进行添加和删除。植物将逐步改进外观,使其看起来能够上下移动,并从小逐渐长成全尺寸。课程后期将增加不同大小的植物与树木,并改善阴影效果,确保它们只能够放置在适合的瓷砖类型上。 3. **动物设计**:从简单动物的字母开始,学员将学习如何通过鼠标和键盘添加这些动物,这些动物也将有生长机制。随后,改进它们的移动方式,使其在游戏中能够随机选择移动点,并避开植物、其他动物以及不适合它们生存的瓷砖类型。最后,添加一些检测机制,以确保动物与植物和其他动物不发生重叠。 通过本课程的学习,学员将掌握使用C++ SDL2设计和开发简单游戏的基础技能,从而能够独立开发更复杂的游戏项目。
OverviewYou'll be able to place dirt, water which makes surrounding dirt wet, and different colored grass. Add and remove plants of different types and sizes that have shadows, move up and down, start small and grow, and can only exist on the correct types of tiles. Add and remove animals of different types and sizes that have shadows, start small and grow, move around, and avoid overlapping plants, other animals, and certain tiles like water.Tiling SystemStart by adding a simple purple checkered grid to get the basics setup.Then it will be improved by adding a tiling system that allows placement of different colored tiles.Next an algorithm that automatically generates shadows, to give a sense of depth, will be added to the game.Finally when water tiles are added or removed, the surrounding dirt tiles become wet or dry depending on how far away they are from water.PlantsStart by setting up simple plants that can be added and removed with the mouse and keyboard.Then they will be improved so that they look like they're moving up and down, and start small then grow to their full size.Next more plants/trees of different sizes will get added to the game, and their shadows improved to be lighter and remove overlap with other images.Finally an algorithm will be added that checks tile types underneath them. That way they can only get placed on the correct ones, and if tiles are changed to types that they shouldn't exist on, they get removed.AnimalsStart by setting up simple animals that can be added with the mouse and keyboard, that start small then grow to their full size.Then they will be improved so that sometimes they either pick random points to move to, or random angles to rotate to.Next their movement will be improved further so that they avoid overlapping other animals, plants, and tile types that they shouldn't exist on, for example water.Finally more overlap checks will be added so that animals can no longer be placed on plants, other animals, or the wrong types of tiles. Also an overlap check so that plants can't be placed on animals. In addition code will be added so that animals can be remove with the mouse, or if the tiles under them are changed to types they shouldn't exist on.