Browsed by
Author: fnaith

Reflect is just too slow

Reflect is just too slow

After reducing collision objects in previous article and optimize memory usage, I think it is time to do some pressure test. So the entire scene is frozen when spawning 1440 bullets. The profile info looks like: The profile shows that every access operation rely on ‘Type.getClassName’ function, because Entity object uses [Class => value] Map to store components in traditional ECS framework. But Reflect is very slow, it takes 18% execution time just for adding components to Entity. There is second part: Because Bullet Entity use…

Read More Read More

Reducing AABB by combining tiles

Reducing AABB by combining tiles

Recently I make a terrible mistake, create AABB collision rectangle for each tile, in my wip game. The collision system contains 3941 object and takes 63% of execution time. The debug draw looks like a spider web: The most straightforward method is merging small tiles into larger rectangle to reduce total collision object number. This problems is very similar to Algorithm for “healing” multiple rectangles into a smaller number of rectangles . The algorithm has to step: for each row combine continuous tiles into stripe shape…

Read More Read More

The motivation behind Microsoft acquiring GitHub

The motivation behind Microsoft acquiring GitHub

Picture a future that every machine Windows server and all company pay for Microsoft. It sounds disgusting but is actually ongoing process. According to recently the effort Microsoft puts into Linux, Kubernetes and Docker, it becomes totally achievable future by following two concepts : Makes Windows docker image can run on Linux seamlessly Improve the management tools of  Kubernetes to guide users to use Microsoft solution Through docker image, every server in the whole world is ready to run Microsoft solution. Then…

Read More Read More