Huy Minh Ha

Software development, Tech and other stuff

Wed 28 December 2016

Finite state machine for Unity

Posted by Ha.Minh in Unity   

Finite State Machine (FSM) is an important technique in game programming. Most games that have some sort of battle will have to design an FSM for its entities. FSM can be applied in UI as well. For example, instead of using flags to enable/disable certain UI elements, we can ...

Read more...




Sat 03 December 2016

Unity Texture compression and optimization

Posted by Ha.Minh in Unity   

A common question when building Unity games is which texture compression format will be the best. The criteria are: size on disk, memory footprint, performance.

We have many options in the Unity Engine: ETC1, ETC2, DXT3, DXT5, and so on. How do we choose? Let's look at some optimization ...

Read more...


Sat 03 December 2016

Unity geometry distortion on child object

Posted by Ha.Minh in Unity   

In Unity there is a geometry issue with the child object of non-uniformly scaled parent. When the parent object does not have (1,1,1) scale, then the child object will be skewed weirdly when they rotate. This issue has been mentioned in the below references:

  • http://answers.unity3d.com ...

Read more...



Tue 29 November 2016

Unity Asset Bundle

Posted by Ha.Minh in Unity   

Asset Bundle is a big topic in Unity. Initially, you want to grasp the basic setup and make something work. As your games get bigger, you might want to do more customization to make sure you have full control of the lifecycle. Here are some documents I've studied while ...

Read more...




Thu 24 November 2016

How to do blur effect in Unity

Posted by Ha.Minh in Unity   

Image Blur

  • can use a camera which render to a rendered texture
  • add the images to be rendered to a second canvas, which uses the new camera with screenspace-camera
  • Add blur shader to the Camera, or a parent object which contains all images
  • Add the rendered texture to anywhere you ...

Read more...