Stars and A-Star

August 18, 2012 General News 0 Comments

I implemented proper billboard stars last night, including a nice Gaussian falloff and angular rays for dramatic effect. It beats the heck out of my previous solution, which actually used spherical geometry (a very bad call when a quad can do the same job). For fun, I also threw together a "lo-fi" post-process, which just adds some grit and vertical lines.

Here's a new star with the lofi filter:

And one without the filter:

In other news, I finally got around to doing some algorithmic work. I implemented A* pathfinding and a procedure to build a navigation graph for systems. The algorithm was surprisingly easy to implement...I was expecting that pathfinding would be harder! Seems that many people have already thoroughly solved the problem. Works for me 🙂 Some initial tests have shown that everything is working properly, and my ship is able to use trade lanes to navigate itself from planet to planet using the optimal route, including jumping into the middle of trade lanes (which is often the optimal solution when you're not right by a planet). This is a great step in the direction of AI players!