《Unity in Action》阅读笔记

用较短的时间读完。以一个完整的枪战游戏为例子,穿插讲解unity基本知识,适合入门,符合书名表达的理念:在实践中学。不过想要深入unity,还得靠多个项目实践和锻炼,急不来的,毕竟一门引擎的使用是偏向于实践性的技能。这本书只是提供一个入门的概要和框架,要深入还得需要补充更多图形学的知识,以及多加实践。

  • Chapter 1: Getting to know Unity

    • unity优点:
      • 可视化的工作流:基于component
      • 跨平台
    • unity缺点:
      • 寻找script困难
      • 不支持链接外部的代码库,需要copy过来
      • unity中使用的javascript与原生的有区别,也叫unityscript
  • Chatper 2: Building a demo that puts you in 3D space

    • 主要内容:构造一个有围墙的房间,人可以在其中自由移动
    • 3D坐标系:左手,右手,unity使用的是左手

    • 所有场景对象都继承自GameObject

    • lights类型:point,spot,directional
    • camera跟着人走

    • 用两个脚本MouseLook和FPSInput控制转向和移动

  • Chapter 3: Adding enemies and projectiles to the 3D game

    • 主要内容:加入具有自动寻路AI的敌人,可以发射子弹,玩家也可以攻击敌人

    • 通过raycast虚拟弹道和做AI的碰撞检测

    • 敌人通过prefab生成,可反复使用

    • material:定义3D物体表面属性的集合,如颜色、亮度,子弹的表面属性就是一种material
  • Chapter 4: Developing graphics for your game

    • 主要内容:使用贴图、3D模型和粒子效果
    • art assets种类:2D image, 3D model, material, animation, particle system
    • whiteboxing: 游戏的初始状态
    • 2D image file format supported by unity: PNG(无损压缩,推荐), JPG, GIF, etc
    • skybox:虚拟的天空,全亮且永远在camera中间
    • 3D model format supported by unity: FBX, Collada, OBJ, 3DS, etc
  • Chapter 5: Building a Memory game using Unity’s new 2D functionality

    • 主要内容:利用2D功能实现一个翻牌游戏
    • sprite:直接在屏幕上显示的2D image

    • 需要选择2D编辑模式

  • Chapter 6: Putting a 2D GUI in a 3D game

    • 主要内容:在游戏中可以打开一个2D菜单,改名和调整移动速度
    • heads-up display(HUD): 在最高层显示图形
    • immediate mode vs retained mode,后者更新

    • 在canvas上绘制UI

  • Chapter 7: Creating a third-person 3D game: player movement and animation

    • 主要内容:人的移动和动画,可以在台阶上跳跃

    • 第三人称视角:camera追着角色

    • 模拟阴影

    • 地面检测:ray cast,collision,capsule

  • Chapter 8: Adding interactive devices and items within the game

    • 主要内容:穿过门,拾取和使用道具

    • 复杂的游戏状态可以通过能全局访问的特殊对象来管理

    • List和Dictionary可以用来存储集合对象
  • Chapter 9: Connecting your game to the internet

    • 主要内容:从互联网获取天气情况和壁画

    • 使用协程获得网络数据

  • Chapter 10: Playing audio: sound effects and music

    • 主要内容:使用音频
    • audio file formats supported by unity:wav(windows, 无损),aif(mac, 无损),mp3,ogg,etc

    • 音效不压缩,音乐要压缩,unity支持对导入音频的压缩

    • 2D音频的效果固定,3D取决于听者的位置
    • AudioListener可以调整音量
  • Chapter 11: Putting the parts together into a complete game
  • Chapter 12: Deploying your game to players’ devices
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Unity in Action, Second Edition is a book about programming games in Unity. Think of it as an intro to Unity for experienced programmers. The goal of this book is straightfor- ward: to take people who have some programming experience but no experience with Unity and teach them how to develop a game using Unity. The best way of teaching development is through example projects, with students learning by doing, and that’s the approach this book takes. I’ll present topics as steps toward building sample games, and you’ll be encouraged to build these games in Unity while exploring the book. We’ll go through a selection of different projects every few chapters, rather than one monolithic project developed over the entire book. (Some- times other books take the “one monolithic project” approach, but that can make it hard to jump into the middle if the early chapters aren’t relevant to you.) This book will have more rigorous programming content than most Unity books (especially beginners’ books). Unity is often portrayed as a list of features with no pro- gramming required, which is a misleading view that won’t teach people what they need to know in order to produce commercial titles. If you don’t already know how to pro- gram a computer, I suggest going to a resource like Codecademy first (the computer programming lessons at Khan Academy work well, too) and then come back to this book after learning how to program. Don’t worry about the exact programming language; C# is used throughout this book, but skills from other languages will transfer quite well. Although the first part of the book will take its time introducing new concepts and will carefully and deliberately
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值