Pre-Order the Game!

Desura Digital Distribution

Friday, April 26, 2013

Shader and Shader Values working!

I know that this probably isn't very interesting to most people out there.  But for modders, this is important!  For stars in my game, they are colored using shaders.  While others may just create different sprites that already have colored stars, I use a greyscale star, and replace each shade of grey with the correct color using a shader.  Same for ships (replacing certain red shades with empire colors for example).  You can see in my last post that the stars drawn are grey.

So I went ahead and added support for shaders in the new UI's images.  I also added camera control to the "CameraView" UI Type that allows you to zoom in/out, and move around, and define the thickness of borders in where it start moving around.  So for now, that part of the galaxy setup screen is done!

Just one more step, that is loading in another script's UI...  Anyway, here's a screenshot of shaders and camera view in action (well, not animated, but you get the idea, it's zoomed out and I moved camera to left and down.  Note the colored stars, which proves that shaders are working correctly):

Since I'm just getting the new UI system to work, the UIType class is one huge class.  I plan on breaking it down to smaller classes after I'm done with the whole thing.  So for programmers out there, pardon my klunky code.

Oh, the "code" for this screen?

Yeah, 21 lines of goodness to generate the above screen!  Starting to see why I'm excited about this?  See how the galaxy preview part is just 5 lines, defining how each star is drawn?


  1. Ah, this looks fantastic! Dare I say it - dat 21-line operand!

    Before I pick up a copy of the alpha over on Desura, I was wondering if I could ask some questions/comments/recommendations? Keep in mind none of these are deal-breakers, I'm just interested how you'll go about them.

    One thing is terraformability. One of the things I disliked about MOO2 was that you could terraform every planet... Except 'toxic' worlds. That made no sense, especially as compared to that in MOO1, you could do just that! While I loved the improved economics of MOO2, the elegance of the former and the ability to make every land a lush gaian realm... Or factory world, or - was just fantastic. Is that possible in BB, or at least moddable?

    Secondarily - for any sort of theoretical queues, are their governers implemented? And if so - is it possible to select a pattern or sets of patterns that they might build by? Usually in most games I tend to find a set of builds I like, and focus only on micro-managing the worlds that are of current importance. Having options available to streamline this would put you lightyears beyond the two MOOs... And unfortunately, several modern games. ;)

    Thirdly - you say you're inspired also by Space Empires? Just take my money already. I'll be buying a copy when next I get paid! Thanks for keeping us informed and developing this!

    1. Sure, glad to answer your questions.

      1. Terraforming - This is determined by your data files. In regular Beyond Beyaan's game data, I'm going to follow MoO 1's terraforming method (slowly increase planet capacity, with several big boosts, despite the planet type). You can define a technology that can change from one planet type to another, and whether it's a planet- or system- wide project. So if you want to make a mod of MoO 2 in the game, simply have no technology that terraforms Toxic planets. Likewise with building planets from asteroids/gas giants. It's totally up to modders.

      2. Currently, there's no governors because I plan to introduce a revolutionary method of macromanagement: Managing your planets similar to how people manage databases. Let's say that you want to increase ship production by 15% across all rich planets? Set the right filters in planet list, make the change, and click on "Apply" button. Done! But in the future, I will look into adding assistant AIs that help you manage your empires, but no promises. Besides, the game's source code is open source, modders can add that feature if they want.

      3. Actually in beginning yes, but as the game evolved over 3 years, it's starting to become more of a MoO 1 clone. The reason for this is that I changed from a "closed source 4X game" mindset to "open source 4X engine" that supports different types of 4X games. As a result, I'm simplifying things (MoO 1-level) in order to get the basics of 4X engine working. Then later I'll start adding advanced features (fleet movement within a system similar to Space Empires, component damage, etc)

  2. These answers please me greatly. Better then expected in every category, heh! I'm generally of a mind that minimalism and simplicity - while still being able to do cool things/mod in aforementioned cool things - is the best path, and it sounds like you're doing just that. Anyway, thanks for the responses. I'll try to comment when I have more relevant to say, but I'm at my heart a lurker. Thanks again for the answers and the hard work!