/SwarmIntelligence

Swarm intelligence with Metal technology by Apple. Small fishes interact each other, and behave like a big creature. The logic is written with a shader of Metal, while the graphic is drawn with UIImageView.

Primary LanguageSwift

SwarmIntelligence

Swarm intelligence with Metal technology by Apple. Small fishes interact each other, and behave like a big creature. The logic is written with a shader of Metal, while the graphic is drawn with UIImageView.

Shaders.metal

constant float alpha = 0.025;
constant float beta = 0.2;
constant float gamma = 0.005;

By adjusting above parameters, a variety of lives can be seen in your iOS device.
The detailed explanation is in the following page(in Japanese).
http://qiita.com/yuky_az/items/ce5920f28c08e743418b