Planetary hitting Code Finally working!
TLDR; Beams (and everything else) finally hits the Terrain Surface properly! What this also means is the building code finally works again, because you can select a spot you want to build a building on the surface!
While the code to touch the surface immediately beneath something has existed for a while, tracking across a surface is QUITE different because of how mountains and other surface details work, and how much more complicated it is to do that.
There has been a LOT of work done in the past few months. Most of it on the underlying interface code for the screens. The Shipbuilder (which finally works with Load/Save/Clear) is functionally working (even if not graphically finished at all), but the infrastructure code, internally referred to as OmniGrids, is rather solid. Expect to see interface updates soon as the new screens are added and graphics more worthy of a public appearance are implemented.
Because that was done (or done enough), work has been done for weeks to update the terrain engine code and more importantly, to get the beams hitting the surface. This was no easy task since the old code referred to how the old terrain was stored (in squares). The new system, because it is all equilateral triangle based was far harder to track. The eventual system was to basically come up with a triangle coordinate system to handle things within the surface level triangle.
While the above image isn't how it completely ended up, it is most of it. Tweaks were done in code, of course. But by doing it this way, a lot of problems are made far easier to solve in the terrain engine. For example sewing up the larger triangles, so much of the terrain seam issues have disappeared. The changes were made more to accommodate the need for beams being able to track across the ground to find which sub-triangle it was hitting. The light blue triangle strip shows that path. The smaller red, blue and green triangles show which side and position the beam crosses to the next sub triangle. What you aren't seeing is the actual full resolution of the terrain itself, since these triangles represent the surface without the height map applied. The actual to hit uses the height map, which is why you are seeing it hit apparently above the surface. The full resolution surface is EXTREMELY jaggy right now, so it isn't practical to show it, but that is what the beams are hitting, hence being above the triangles shown. The larger white triangle is actually the lowest level of the high level triangles. It comes out to represent about 5 miles across. So those other pictures and video showing subdivisions eventually get down to what you see here. But since that needs further detail, you see the peril noise results (which still need to be dialed in better).
I am current working on ordering the builder bot to build a building. Which works. Kinda. It is going through all the motions and the building does appear where it should, the "process" animation doesn't seem to be working, so I have to figure out why. Always more things to do. But I am excited that this milestone finally works!
Print article | This entry was posted by Arthur M. on 12/02/18 at 11:19:00 pm . Follow any responses to this post through RSS 2.0. |