Was using a ray-triangle intersect algorithm for picking in my game. I noticed that it was taking 222ms to run, then I realized that I wrapped it in a quadruple for loop. So I converted my tile and patch double arrays to single ones. Then I subdivide my patch to determine which quadrant Iāll be picking in(then subdivide that subdivision) and now Iām down to less than 1ms ;D.
Very nice! what strategy do you use for the flame generation? My current method is quite basic (texture billboarded and then put through a particle system animator)
I did some optimizations on the whole engine, but realized that my performance values were being skewered. An updated APU limited shader with 20% fewer instructions was running at the same speed as the old one sometimes. Seems like my computer is so full of dust that my GPUs are reaching 80 degrees and reducing their turbo clock rates to prevent overheating. Gonna have to dust it out before I can get accurate measurements.
Oops, accidentally hit Appreciate instead of Quote. Anyway.
My method is just to spawn untextured triangles that accelerate upwards and rotate. They have very low opacity so that you can only see colour when thereās like 100 of them overlapping. Currently there will be ~1050 triangles at one time.
Itās a lot more visible when I turn up the opacity
Iāve been reworking my path finding to give all terrain movement costs (no more blocked tiles) so in the future monsters can plow through terrain if they canāt find a clear path. I had to basically completely rewrite my path finding algo to use true A* pathfinding to do it correctly.
Hereās a gfycat of the new algorithm in action (still not complete). The terrain cost on the rocks are a bit low for testing. The final idea/plan is generally, a monster will look for a path with no trees, rocks or other terrain. (These terrains will have an extremely high movement cost) If that path is not found (IE: You blocked in your whole village), itāll start tearing through the high movement cost tiles to get to you.
Iāve been working on a project that was shelved back in November, I am doing a refactor and update on it and I was quite curious to just how flexible the Entity and Component code was.
So I made a new playable character that was literally a cloud, I was entertained for a whole 30 minutes just building playable objects.