srijeda, 12. ožujka 2014.

Ship designs

As promised I've started to work on ship design feature. First thing on "to do" list for the feature is a list of ship designs. Figure above is a mockup and figure below is how it looks now.

The list works and "info panel" (details about selected design ) will have to wait. Currently ship design data has very few attributes: name, size (hull type) and image. Once I implement the rest (weapons, mission equipment, special equipment, shields type, armor, reactor, engines, sensors and maybe something else that I can't remember right now), I'll implement info panel. As you can see there is a lot of different component types, it might take a while. On the other hand I have a template that I can reuse, hull type data so it might as well take 2-4 days. What really slows me down is designing GUI for making ship designs.

This is what I have for now. It's missing few stuff (interstellar drive on/off, short info about armor, mobility, sensors and cloaking) but that's no-brainer to add. What I can't decide is how to present equipment (both weapons/mission and special) selection. Previous version had a slider for dividing space between primary and secondary weapon/mission and I wanted to get rid of it this time. It didn't reflect the decision making process very well (player would think in equipment quantity rather in percent space occupied) and made certain complications for design update logic. So I was thinking about predefined ratio (let's say 2:1) or limiting ratio selection to only few options (let's say 2:1, 3:1, 4:1 and 5:1). I had more radical ideas such as allowing more than two types of weapons/missions with predefined ratio (let's say 1:2:4: ... : 2^n or simply 1:2:3: ... : n). I'm still not satisfied with any of it. Maybe in the end I'll do it MoO way, by letting player to enter desired quantity.

Since it took me some time to write this post, mockup has been changed.

Now all elements are there and I think weapon/equipment list looks OK. Quantity manipulation controls are still work in progress but the basics are there. MoO 1 & 2 had simple +1 and -1 buttons which were not so elegant for adding dozens or hundreds pieces. I came up with few idea, one is to add or remove multiple pieces by "shift" clicking a button and the other is to allow player to type the number directly. On the mockup the "up" arrow button is supposed to open such window but now that I think of it I could as well place a text box beside "+" and "-" buttons. Another thing I'm not happy with is info at the top right. It's crammed and I've just noticed it doesn't show combat speed (mobility is currently evasion score).

Anyway I'll work on it some more and in parallel implement parts that are good (image and hull selection). And one more thing, predefined designs are essentially implemented. See the "Interceptor" on the second image? It's predefined design. Those designs are automatically added to design list as player acquires necessary technologies or at the beginning of the game it they have no requirements. I say essentially implemented because designs themselves are missing 80% components but as new components are added, predefined designs will get updated.