četvrtak, 10. svibnja 2018.

Preview release v0.6.6

Welcome migrants to more desirable world of tier 3 animations. I think I got it all in one sentence.

Download Stareater v0.6.6-alpha

In the last release animations were introduced but nothing new was done with them, only existing animations got rewritten. Now that foundation is used to create whole new intro animation when the game program is started.

Interesting thing about how it works under the hood is that specifying when and what happens with animation eerily looks like electric circuit schema. There are resistors (delays), parallel and series circuits, only batteries are missing. Here is a bit exaggerated figure (in reality parallel and series circuits are not physically connected but series "resistor" is big enough to simulate the effect):

One more feature from old CroVar version returned: interplanetary migration. Population from more populated worlds would move to less populated ones inside a star system. This is combined with planet desirability score. For now it's just a function of current and maximum population (less crowded is better) but when I implement more functions for formulas I'll add planet traits and technologies to influence it. I'm eagerly looking forward to a day when tooltips get implemented so I can show you how underlying "spreadsheet" works.

And as usual content update for release is 3rd tier of technologies. This bring along some new ship components, updated calculation formulas and brand new colony construction project: soil enrichment. Upon completion it gives a planet the "fertile" trait which is a new thing buildings can do now.

srijeda, 28. ožujka 2018.

Preview release v0.6.5

New update, finally. In fact a bombastic one! One with splash damage torpedoes and navigable combat map.

Download Stareater v0.6.5-alpha

 Missiles were already present in the Stareater but they were technically limited ammunition beams. Torpedoes are true "fly over there" missiles and they have Expanse inspired look :). They also pack a splash damage which hurts multiple ships in a stack and multiple stacks in the same location. For this to happen stack health has been expanded a bit, now there are armor and shield points for a unit on top of the stack and armor and shield points for the reminder of a stack. Splash damage hits both top and reminder of a stack if the splash is big enough. Once the stack's top unit is destroyed a new top unit will not start with full shields and armor but with what was an average of the stack. Additionally splash damage treats chance to hit a bit differently then direct attacks (like beams and old missiles), torpedoes who are the sole users of splash damage (for now) have two attack kinds: direct and splash. If attacker wins chance to hit roll then top of the target stack is struck with direct attack, otherwise the top is struck with splash damage. So the top of the target stack is always hurt but the difference is by how much. If the splash is big enough (maximum number of targets a splash can affect) then the rest of the stack gets splash damage proportional to number of affected units. And if stack is smaller then splash size then other enemy stacks get splash damage too.

Splash damage is one part of torpedo implementation, the other part is, well, the projectile itself. Launching a torpedo will show a projectile on the map and over turns it will close in to the target. For now it's as simple as that, you can't target torpedo stack and attempt to destroy it before it destroys you but there is a plan to rework how combatants and projectiles are handled under the hood which will make such feature possible if it turns out to be necessary.

For now under the hood changes revolved around certain AI vs AI (or AI vs natives because natives are just different AI under the hood) behavior. Previously the communication between an AI player and the space combat controller (part that decides who is on the move and when a battle is over) was synchronous. Controller would call AI function for playing a unit, AI would then call controller function for a move it chose, controller would call again call AI to play a unit and so on. Once the battle got resolved controller's function would exit and return to AI's function which called, it would exit too and return to controller's function which called it and so on until whole call stack gets unrolled. If something goes wrong and I have to debug it, I'd see kilometer long call stack with a lot of repeating uninteresting entries and if there are too many units this synchronous communication would overflow the stack crash the game. Asynchronous communication, as anything multi-threaded, is bit more complicated but solves those issues and allows AIs to process the battle independently. Also it makes enforcing some move validity checks easier.

There is no new content in this release but I've compensated that by adding zoom and pan to combat map. Now you can zoom in and read unit numbers :). I've also improved how animations work and refactored selected unit pulsing animation to use it so for now this visually changes absolutely nothing but as previous additions in this release, allows for more goodies in the future.

Finally, sorry for delayed release, real life got really busy. The situation will remain like that for a few more months but I'll will continue to work on this game.

petak, 26. siječnja 2018.

Preview release v0.6.4

Now that holidays are over it's time to get back to work. And what a better way to kick off a new year by doing something crazy: own GUI engine.

Download Stareater v0.6.4-alpha

Making own mouse and keyboard event handling, element positioning, drawing variable length borders, state handling, positioning text and images inside elements and many more gotchas sound like a lot of complicated work. But when you look at the project code you'd see good deal of that already implemented. Turn number on galaxy map and bombardment buttons in postcombat bombardment are the most prominent examples, galaxy map scrolling and interaction is a subtle one which also uses most of aforementioned features. So it was mostly a matter of restructuring already existing code and thinking through some details. And think it through I did, after all, I've abandoned very first Stareater incarnation due to GUI logic getting too complicated. Since then I've seen a lot of GUI code, both in use and details under the hood. I saw a lot of interesting approaches and a lot of bad realizations.

I've looked for existing solution I could use but they were either one of bad realizations or couldn't smoothly integrate with C# and OpenTK. Still, I have to give credit for an effort to Gwen.Net, a port of C++ library to C# with OpenTK. It's easy to integrate and emulates WinForms quite well. And that's the problem, I want to get rid of WinForm's look and feel. Gwen's skinning support looked very convoluted, you had to look through code to figure out which pixels on texture did what and documentation is practically nonexistent. Also I'd like to work with more modern layout mechanisms, something where it's easy to say "put this button at the bottom right corner" and have a framework calculate exact (x, y) coordinates and update them when window resizes. Something like GUI framework in Unity Engine and Android framework. WinForms is very limited in that area and from what I managed to dig out from Gwen.Net the situation is not much better there either. So I rolled my own framework and replaced old end turn button. Visually it needs more time in the oven but that's a challenge for another time and it would be an issue with any GUI framework, all of them expect you to bring your own artwork.

Core game feature in this release is colony maintenance, bad planet traits increase maintenance cost per population and it's payed up by whole nation. If maintenance cost is greater then 50% of nation's productivity then colonies in the worst shape will suffer population loss. Reason for including this mechanic is to make bad planets less desirable since they are going to put a burden on all of your colonies, to make star "catalysis"(afflicted by stareater's native organisms) bigger problem for a player and to make terraforming and building up more desirable. This also gives me an opportunity to fill some gaps in tech tree :).

Finally, another tier of technologies has been worked over and again it took more time then expected. In fact it took more time then making new GUI framework. Reason this time around is that I decided to make few changes to the tech tree: to remove limited use technologies. In Master of Orion 2 when you research new type of armor all previous types become obsolete. New ships are automatically built with the best armor and there is no trade-off between lower and higher tier armor. In Master of Orion 1 there was some nominal trade-off, lower level tech costs less and takes less space but even then I rarely went more then one tier below highest available. Something similar was in old concept of Stareater tech tree plus the fact that techs in Stareater can be upgraded with more science investment. I don't think it would play well "dead end" techs. Why would you invest a lot in an item that would go obsolete. In case of armors I've removed all techs that unlock particular armor type and replaced them with two techs: one which unlocks new types of armor material as you level it up and other which improves armor quality (level within armor type). Ditto for reactor technologies, reactor type tech and reactor level tech instead of one tech for each type. For computers, sensors and interstellar drives I'd make a mix of cumulative upgrades and special abilities. Quantum computer would increase instead of replace electronic computer bonus, lidar would add up to radar bonus and provide "telescope" ability for increased detection strength in a narrow cone, inerstellar drives would have unique movement abilities, etc. Thrusters are still one foot in old concept and one foot in new one, there will be less thruster types and upgrading them will provide some economic bonuses like lower space lift penalty due to gravity and increased migration capacity.

This left a few holes in a tech tree and by moving few items around I might go back to originally planes 7 tiers per field. Physics is still cramped full for 8 tiers while biology and sociology are very sparse, sometimes having only one item in a tier. Work on tech tree is still in progress, I hope to fill the gaps with techs for missing features (trade treaties, espionage, fuel range) and end up having 3 items in every tier in 7 tier model.