Development log
by Ivan Kravarščan
I did not rest for long. Well, time flies with kids so that was enough of a context switch to get back into UI.
I’ve finished porting information around the star on the map. All of it, size and order under the name, important state indicators to the left, and orbiting fleets to the right. Icon quality is not the best at the moment because I skipped a step in the process. I used ordinary raster format (PNG) instead of distance fields that are used for star images so fine details are getting lost if they are zoomed out. Sizes and spacing are also off and will need tweaking before release. What is important is that all icons have been made and I also have them in vector format (SVG) which is very convenient for applying polish. One day I’ll do a deep dive on my SVG to distance field conversion tool and make them look good.
#Fleet selection
Next thing on the menu was drawing fleets. The save file I had at the only had one stationary fleet, no moving ones so I worked on that case first. I had to rework map object selection to work with LibGDX’s UI component positions. It was a bit of work to get correct numbers out of it due to how map zoom works but now I can be carefree with using normal UI components and having custom click/tap logic. Normal UI click/tap works only within the component’s area, and only returns the topmost component. In the game clickable objects can overlap and fleet and even icons are rather small so they could be hard to hit. For those reasons map click in this game can find multiple objects and present you a list to choose which one you want. And it also finds objects in a wider area (configurable), simulating finger size on mobile.
With that settled I made the ship selection panel. Soon sending ships will be possible and then I could tackle the messy details of moving ships. I’ve already checked out how to rotate images. Movement path is an unknown for now, I need to see if the framework already has a solution for a repeating image.
The start menu surprise is not yet done. I did manage to move the green thing where it is supposed to be but I still need to morph it into a desired shape and give it some effects.
tags: