Unity
Unity::Pathfinding with A* algorithm in Unity small game project
· ☕ 8 min read
https://pavcreations.com/pathfinding-with-a-star-algorithm-in-unity-small-game-project/ Introduction In this tutorial we are going to look into the pathfinding of the shortest route between two points in a tilemap-based world on a basis of a grid. It is a continuation of the previous article where I’ve presented the concepts behind A* search algorithm. Last time, I’ve implemented a grid that now will be used by enemies to move around levels. That is to say, the enemies will independently wander around a game world without bumping into obstacles.

Unity::LuaString
· ☕ 2 min read
-- -- lua -- 判断utf8字符byte长度 -- 0xxxxxxx - 1 byte -- 110yxxxx - 192, 2 byte -- 1110yyyy - 225, 3 byte -- 11110zzz - 240, 4 byte local function chsize(char) if not char then print("not char") return 0 elseif char > 240 then return 4 elseif char > 225 then return 3 elseif char > 192

Unity::testHugo
· ☕ 1 min read
image: beach.jpg image: images/feature2/gallery.png Sample images from Pixabay $image := resources.Get “images/feature2/gallery.png” - {{ with .Resources.ByType “image” }} {{ range . }} {{ .RelPermalink }} {{ end }} {{ end }} Sample Image: Image with title, caption, alt, ...

Unity::帧同步 预测回滚
· ☕ 4 min read
备份数据 每个Entity 的所有 component都实现 IBackup ,里面的数据都写入 stream里面 #回滚数据 从二进制数据流里面还原LogicEnti

C#泛型接口的抗变和协变
· ☕ 2 min read
泛型接口的抗变(也叫逆变 Contravariance)和协变(Covariance)有什么区别? 先说定义, 协变和逆变能够实现数组类型、委托类

Unity::GC的实现
· ☕ 2 min read
GC的实现 实现GC的策略有很多种,其中最常见一种就是 Tracing garbage collection,或者叫 Mark-Sweep,这种算法会通过一个 root Object,

Unity::优化
· ☕ 2 min read
文件名称:优化.md CPU 耗时计算,渲染次数,算法, 计算hashcode GPU 静态合批,动态合批, DC图集 GC 创建新对象的时候,申请内存,执行gc操作