|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/react-native-tic-tac-toe/
课程评论:没有评论
课程名称:React Native:创建一款无敌的多人井字棋游戏 课程概述:本课程将指导学习者使用React Native(Expo)创建一款井字棋游戏。尽管井字棋的玩法相对简单,但我们的项目却并不简单,特别是我们将使用TypeScript。这种工具为JavaScript语言添加了类型,有助于避免代码中的某些错误,并带来其他好处。我们的应用将包含单人游戏,我们将运用名为Minimax算法来创建不同难度的机器人。此外,课程还包括多人游戏的创建,我们将使用AWS Amplify管理API和身份验证,方便构建GraphQL API以供游戏使用。 课程大纲: 第一部分:为缺乏或有限TypeScript知识的学生准备的可选部分,内容包括TypeScript的基本类型、接口和泛型的快速介绍。 第二部分:介绍expo工具以及expo与普通React Native之间的区别,安装expo并在物理设备、Android模拟器和iOS模拟器上运行新项目。 第三部分:设置开发工作流程所需的工具,包括TypeScript类型检查、Prettier代码格式自动化、ESLint JavaScript规则实施、Husky在git提交前运行这些工具,以及模块解析器的安装以简化组件和文件的导入。 第四部分:为应用程序进行一般设置,包括加载字体、自定义文本组件、设置导航等。 第五部分:构建单人游戏,包括用户界面、机器人玩家、音效与震动效果、难度选择设置页面,以及使用react context和AsyncStorage持久化设置。 第六部分:介绍AWS Amplify及一些AWS概念(如IAM),并在项目中安装和设置Amplify。 第七部分:使用AWS Cognito添加应用程序的身份验证,包括登录、注册、OTP确认、重发密码、重置密码和忘记密码等功能。 第八部分:创建用于多人游戏的GraphQL API,学习如何在数据库中创建模型并添加访问授权规则,为玩家和游戏创建模型并连接起来,同时实现多个lambda函数处理游戏中的不同部分。 第九部分:在完成多人游戏的API后,开始构建用户界面,包括列出游戏、分页游戏、搜索玩家、开始新游戏和实时更新游戏的处理,并学习如何使用Amplify为查询、变更和订阅生成TypeScript类型。 第十部分:专门介绍如何使用expo发送推送通知,包括处理发送邀请通知的各个方面。 第十一部分:简要介绍如何使用AdMob在游戏中轻松添加广告,AdMob与expo集成。 第十二部分:最后,通过expo探索构建和发布应用程序的顺畅过程,为Android和iOS构建应用并将其发布到App Store和Play Store。 通过本课程的学习,学员将掌握使用React Native和AWS Amplify开发一个功能完整的井字棋游戏的各个技术细节。
In this course we are going to create a Tic-Tac-Toe game using React Native (Expo). Although the Tic Tac Toe game is simple, our project won't be very simple. We are going to use Typescript in the project. Typescript is a tool that adds types of the JavaScript language. Having types allows us to avoid certain bugs in our code in addition to many other benefits.Our app will contain a single player game. For that we are going to use an algorithm called the Minimax Algorithm in order to create a bot with different difficulties. In addition to that, we will also have a multiplayer game. In the multiplayer game we are going to create an API and manage Authentication using a service called AWS Amplify. AWS Amplify allows us to easily build a GraphQL API that we will use in our game.Let's breakdown what will be discussed in each section:Section 1This is an optional section for students without or with limited Typescript knowledge. We are going to have a very quick introduction to Typescript. We will discuss things like basic types, types, interfaces and generics.Section 2In this course we are going to use a tool called expo. Expo is a tool that simplifies building apps using React Native. We will see what is the difference between expo and normal React Native. And then we will install expo, create a new expo project and run it on a physical device, Android emulator and the iOS simulator.Section 3In this section we are going to setup some tools that will be very helpful in our workflow. First we will install Typescript for type checking. Then we will use Prettier to automate formatting our code. We will also use ESLint to enforce JavaScript rules. Husky to make sure we run all these tools before committing our code to git. And we will finally install a module resolver to make importing files and components in our project a lot easier.Section 4In this section we are going to do some general setup for our application. Including loading fonts, creating a custom text component, setting up navigation and more.Section 5In this section we will build our single player game. This includes the UI, the bot player, adding sounds and haptics, creating a settings page to choose difficulty and other options and persisting the settings on the phone using react context and AsyncStorage.Section 6This section will just be an introduction to AWS Amplify and some AWS concepts like IAM. We will also install amplify and set it up in our project.Section 7Here we will use AWS Cognito which is a service that comes with Amplify to add authentication in our app. This includes login, register, otp confirmation, resend password, reset password, forget password and more.Section 8This section will cover creating a GraphQL API using Amplify for the multiplayer game. We are going to learn how to create a model in our database and add authorization rules for this model to restrict its access by the API depending on authorization methods. We are going to create models for our players and our game and connect these models together. In addition to that, we will create multiple lambda functions that will handle different parts in the game like starting a new game and playing a move and we will see how to trigger these functions using our API. We will also create the necessary GraphQL subscription to listen for changes for each game so that we can have a real time experience.Section 9After completing the API for the multiplayer game, here we will start building our UI. This includes listing games, paginating games, searching for players, starting a new game and handling updating the game in real time. When consuming our API, we will learn how to use amplify to generate typescript types for our queries, mutations and subscription for a great development experience.Section 10This section is entirely dedicated to sending push notifications with expo. Sending notification may seem simple; however there are a lot of stuff that need to be handled that we will discover in this section. Eventually we will be able to send a notification to a player when he is invited to a new game.Section 11This short section will show you how simple it is to add ads in your game using AdMob which is integrated in expo.Section 12In this final section we will discover how smooth building and publishing your app with expo is. We will build our apps for Android and iOS and publish the builds to the App and Play stores.