četvrtak, 4. rujna 2014.
četvrtak, 14. kolovoza 2014.
I've made it with T4 which is kind of metawriting tool for writing code that generates text or in my case code. I've made text template with helper stuff for describing properties and classes and used it on each state data class. Each state data class is described by two or three files: text template filled with information about the class (which properties are there, how do they behave, does class need something extra, ...), C# code generated from template and optionally C# code with extra functionality that is either to hard to describe with template or doesn't belong there.
Programmer rant over.
Anyway saving game works, file management and GUI needs some work. Loading should be up and running soon.
srijeda, 12. ožujka 2014.
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.
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.
utorak, 11. veljače 2014.
Currently implemented construction projects are:
- Colonization - increases planet's population for a turn and produces no actual building (like housing and trade goods in Master of Orion II)
- Industrialization - produces workplaces for population, an actual buildings
Next on the menu is ship design. Yay, finally!
petak, 17. siječnja 2014.
With construction logic working for both colonies and star systems it's a time to do GUI for colony and star system details. Figure above is mockup of colony details GUI. It's considerably smaller compared to previous version (before rewrite). Spending control is moved star system view,calculation details will be presented in tooltips and there are no tabs, all is on a single screen.
Environment information is also redesigned, instead of five numbers (gravity, temperature, irradiation, atmosphere quality and density) there is one and a list of icons (in place of 8 sun icons). This also reflect the change under the hood. By default planets don't have any gravity and climate statistic but they can have traits (wrote about it in "Orbital habitation" post) and those traits can influence general environment statistic. Old environment model is basically repacked as planet traits. Good thing with new model is ease of adding more than n hardcoded environmental traits and possibility of combining one trait with another. For instance "high winds" trait my be stronger in presence of "dense atmosphere".
All of it holds true for star system details GUI.
Instead of explicit radiation stat there will be "low/medium/high radiation" traits. Compared to colony GUI it may not seam odd, but notice star system building list. Prerewrite version didn't have that.
And now, to finish the topic I'm going to plug in the real data to GUI.