Hexo


  • 首页

  • 标签

  • 分类

  • 归档

Game Ai Chapter 3

发表于 2018-03-13 | 分类于 AI

This is the reading note after reading by Mat Buckland.

Here is the part of the Chapter 3.

阅读全文 »

Game Ai Introduction

发表于 2018-03-13 | 分类于 AI

This is the reading note after reading by Mat Buckland.

Here is the part of the introduction chapter.

阅读全文 »

《Unity Shader 入门精要 Chapter 5》Reading Note

发表于 2018-03-11 | 分类于 Unity

《Unity Shader 入门精要》Chapter 5 — Reading Note

阅读全文 »

Simple Charged Jump

发表于 2017-12-13 | 分类于 Unity

If you have ever played Super Meat Boy by Edmund McMillen, you must be impressed by one of the interesting mechanisms, the charged jump.

阅读全文 »

Reading Notes - 2D Game Creation

发表于 2017-12-07

Here are the reading notes after watching 2D Game Creation in Unity Tutorial.

Sprite Renderer

“Sprites/Diffuse” is an optimised material for use with sprite, which can react to the light. Usually, light is not a necessary part in 2D game creation. But if you want the light effect, remember to set the z-order of the light to a negative value (e.g. -3).

The Sprite Editor

Sprite editor is only used for atlas and sprite sheets. Use “slice” tool can automatically generate sprites from the resource. For atlas we use automatic type slice, and for sprite sheets we use grid type slice.

Sorting Layer

Sorting layer is used for rendering objects in different order, as an optimised alternative of z-order. And order in layer defines the render order in that sorting layer. The object with the small value will be rendered first.

Rigidbody 2D

  • Material allows you to control the collision effect (fraction and boundness).
  • Mass is like a normal mass in real world. For example, a heavier object is harder to move.
  • Linear/Angular Drag is like the air force, which lower the object’s linear/angular speed.
  • Gravity Scale means how much scales of gravity the object is affected.
  • Collision Detection is usually set to discrete to save computational resource. If you want a precise collision control (usually for high speed object), you can set the value to continuous.
  • Sleeping Mode defines how the GameObject “sleep” to save processor time when it’s at rest. Of course, in this case you will lose a little physical precision (usually acceptable).
  • Interpolate can be set to obtain a more smooth movement for the rigidbody2d.
  • Constraints is set to freeze position/rotation.

Body Type:

- Dynamic: Normal rigidbody2d.
- Kinematic: Rigidbody2d not affected by collision/gravity, and should be manually controlled.
- Static: Static rigidbody2d.

Hinge Joint 2D

The hinge joint 2D is a component that allows a sprite to rotate around a point while being controlled by 2D rigidbody physics.

  • Anchor is in world space when attached to a point, on the contrary in local space while attached to a rigidbody2d.
  • Motor is used to power the hinge joint (Try to apply a constant speed by setting).
  • Limit is the angle limit for the hinge joint.

By using hinge joint 2D, we can realize some interesting mechanics in games. For example, a spring-load trap door, a chain or a rope.

Area Effector

The area effector is used to apply physics forces to objects whthin a specific area. The area object attached the area effector should also have a collider with “Used by Effector” set to true. It’s not necessary to use a trigger collider. If it’s not a trigger, the force will only be applied on the surface of the collision.

  • Force target: If set to rigidbody, the force will be applied to the mass center of the rigidbody. If set to collider, the force will be applied to the collider.
  • Damping is used to set the linear and augular drag to better control the movement and avoid rotation.

Distance Joint 2D

Distance joint 2d is a component that allows a sprite to maintain a fix distance with a point while being controlled by 2d rigidbody physics.

If the designed distance is less than the actual distance, a relative force will be applied to them to make them near and reach the designed distance.

Point Effector

Point effector is like area effector. The only difference is that for area effector, the force is directional. Howerver, in point effector, the direction of the force is from the source to the object. For example, the gravity of the earth can be considered as a point effector.

Most of the variables are the same as area effector.

  • Distance Scale: To scale the calculated distance from source to target, without changing the actual distance.
  • Force Mode: The mode used to apply the effector force.

Scriptable Objects

发表于 2017-12-06 | 分类于 Unity

This article is about the basic understanding on scriptable objects in Unity, including why, when and how to use scriptable objects.

阅读全文 »

Notes on Intermediate Gameplay Scripting

发表于 2017-11-26 | 分类于 Unity

Here is the reading notes on Intermediate Gameplay Scripting

Intermediate Gameplay Scripting from Unity Toturials

阅读全文 »

Unity Design Patterns - Finite State Machines

发表于 2017-11-25 | 分类于 Unity

Here is a basic understand on finite state machines in Unity after reading < Game Design Patterns > by Bob Nystorm.

阅读全文 »

Understand Coroutine in Unity

发表于 2017-11-22 | 分类于 Unity

Here is a basic understand on how coroutine works in Unity.

阅读全文 »

Python中sort和sorted的区别

发表于 2017-05-02 | 分类于 Python

最近写Python经常需要使用排序,Python2.7内置了两个排序函数,分别是sort和sorted,那么他们的用法和相互的区别是什么样子的呢。

阅读全文 »
1234

Chang Lin

34 日志
10 分类
16 标签
GitHub E-Mail
© 2019 Chang Lin
由 Hexo 强力驱动
|
主题 — NexT.Gemini v5.1.3