Epic4x: Devlog #5February 28, 2017
More tests were on my list today. Got the rest of service classes covered with unit tests. Up to now I had generated all of the stars using tests and some maths and had no idea what they would look like when laid out visually so I created a simple method that would output an SVG file of the star map with the warp lanes between the stars. The results were a complicated mess of a 1000 dots that are connected to each other. This is what the galaxy would look like zoomed out quite a lot, but the in-game map will have support for zoom in so that you don’t have to look at that mess. At certain zoom levels I will also reduce the amount of information displayed on the map (like no resource info, star name, etc.). I also took the opportunity to optimize the edge generation for the MST warp lane builder. It was generating all edges between each vertex with is way over what actually needs to be done. With the closest N optimization from yesterday generating only K edges to the closest vectice sped up the warp lane generation even more. Now I can bump up the number of starts from 1000 to 10000 for normal game testing. All also went ahead optimized calculations on the next turn event after realizing that they were quite slow for 10K stars. Working on these issues I also realized that the application would benefit from hibernate’s 2nd level caching so I installed and configured that too while at it. I also fixed a bug where buildings on tiles that hadn’t finished construction yet were producing resources. Tomorrow I’m planning on thinking on some client GUI options and adding the building construction command to the client side.
Tags: #gamedev #epic4x #devlog