Microbe GUI


Good news everyone! I have a (barely) working GUI in-game!

Some parts are missing, such as the checkboxes next to the compound bars (which I didn’t have time to do) and the compound bars along the lower bar (because I have no idea how to make them). None of the buttons do anything yet. All the old elements are still there, they’re either invisible or moved off-screen. Anytime you see any glitchy rectangles, those are also old elements which I haven’t yet removed. The black box in the centre is the old quit button, which I put there for convenience.


I think I’ve hit an obstacle with the GUI in that I have no clue how to get some parts of the design to work, especially the lower compound bar and the editor button filling up. If anyone’s willing to help that’d be much appreciated, but if not we could go for a slightly simplified design until then.

The GUI as shown in the video above needs only one addition - a scrolling compounds list - to be adequately functional in-game, even if it’s not quite as intuitive as the hopeful final design. The editor might be a bit trickier but still not impossible.


Could you upload the image sets and layout files (and everything else that you changed for the GUI to work)? I’ll give it a goal next week.


Here are all the files I believe I’ve changed:

I might have a go at the editor and tutorial GUI tonight if I get time (I probably won’t at this rate).


Good news: I now have free time again. And I’ll be using a sizable chunk of it to work on a simplified version of the above GUI.


A couple of days of work further on from what I’d completed last time, I now have this:

Pretty much everything is in the right place now, but not much of it works yet (which is why I had to quit the game and come back in to remove the menu overlay). That’s what I’m going to have to scratch my head over for the next few days. You’ll notice I changed the menu button - that was on @TheCreator’s request, and it actually makes the editor GUI a lot easier to set up.

I’ve already said this, but it feels a bazillion times nicer than it did before.


Wow. Just wow. I’m at a loss of worda at how good that is. I know this forum is for constructive feedback, but I honestly can’t see what would make that better. Although you probably know cegui better than be right now, ask me if you have any questions, and we’ll ponder it together.


I think I’ve got most of the CEGUI stuff done now. It’s the Lua integration that’s the issue now - scrollbars, compound bars, animations, wiring up buttons to work correctly and so on.


It has a nice ksp-esque look, i like it :slight_smile:


Woo, I got the overlay menu to work properly! It pauses and resumes the game and everything. And I think everyone on the planet will agree the help panel text is a million times nicer than the old help panel. Using what I learnt today it’ll be a doddle to do the same for the compound panel and editor info panel (the one next to the editor button), and the symmetry button in the editor. That mostly leaves the organelle buttons and various scollbars/compound bars. I have absolutely no idea how I’m going to manage those, but I’ll find some way.


GUI Test IV: All the Buttons Work Now (I Think)

Apart from accidentally breaking the help panel from the last video (not sure how that happened, I’ll look into it when I get a chance) all the buttons which at this point are supposed to work now work. That means I have two parts left to do before the GUI is functional: the scollbars and the compound bars. Unfortunately, these are the two most difficult. Also unfortunately, I’ll be AFK until Boxing Day, so this is probably the last you’ll hear from me.


@Oliveriver the gui is looking awesome and really professional. Great work.


I’d hoped to do more to the GUI today but a couple of bugs with function references breaking due to my own stupidity meant it took a lot longer to get to this stage. The good thing is, all the buttons and tooltips definitely work. There are only a few things left to do:

  • Define a dynamic progress bar to use for all the health and compound bars, which can take particular images as input each time for the compound icon and compound bar colour
  • Create dynamic scrollbars for the compound panel and editor structure panel (I’ve put all the relevant images in for them, I just can’t code them)
  • Make the game pause when a game is loaded, which should be easy but I can’t find the setting anywhere
  • The escape button now opens and closes the overlay menus, but I can’t get it to close them as well
  • Copy the environment GUI over to the tutorial without breaking anything, which is harder than it sounds

I’ve come to the conclusion that all of the above are beyond me without help from proper programmers. With that in mind I might go ahead and fork a GitHub branch to add all the relevant changes so the others can help with those specifics. Is there a way to include new assets without changing the SVN for everybody (since right now that would break everyone else’s branches)?


You could create a lua table (see organelle_table.lua and configs.lua) that stores the image name, the color and some unique id. You can then have a function to change the size of the bar (similar to the current health bar) that takes the id and the new value. The ids could be the compounds ids for compounds and 0 for health bar.


Close what?

I can do this part once everything else is done.

Only dropbox and give everyone a link.


I tried that but it wouldn’t work for some reason. It worked for every other function I put it in but not load.

The in-game menu, which before was an expandable menu in the bottom corner but now appears over the top of the screen and pauses the game behind it.

  • Progress bar

Could you do a function to set the bar to the percentage of each compound compared to the “max” compounds, and set the styling as thecreator said with a table or array?


There already is a function, this is what’s being used for the progress bar in the game already.

I now have a health bar and an MP bar working, with one issue: I don’t know how to change the image/colour being used for the fill, which is why the MP bar uses green when it should be purple.

The compound bars might prove more difficult to sort out. The actual value in each case is easy, but at the moment not all of them have maximum values. ATP, for instance, doesn’t have a max. The rest of them share the same max storage space in the form of vacuoles.


All the compound bars work now! It’s fun, distracting even, to watch them go up and down in response to compound collection. I do have a couple of comments I need input on:

  • Since I’m using a blank 0.3.2 as the testing ground, the fatty acids bar doesn’t work. In my own copy of the file the relevant code is commented out, but the additions to GitHub haven’t. Providing fatty acids work the same as every other compound, this shouldn’t be a problem.
  • You’ll notice the CO2 bar flickering each time a clump of CO2 is emitted. I don’t think this can be fixed at the GUI end, since the bar just updates based on compound stores.
  • Most of the compounds never reach their totals because they’re all working from the cell’s overall storage. Once dedicated vacuoles are in this shouldn’t be a problem, but for the moment it might be more intuitive to make the amino acid and fatty acid totals the amount needed for reproduction.

That leaves just two things left for me to do: add scrollbars/scroll windows and clean up some of the code.


I think the new GUI is officially (kind of) done!

We encountered some weird errors with the scrollbars which is partly why this thread has laid bare for a while. In the end I decided for the sake of getting the release out soon I should scrap the scrollbars altogether for the moment. I made some small image adjustments to fill dead space and make compound bars more readable, and got rid of the editor info button because it was neither informative nor aesthetically pleasing. Maybe we have something else in future, but it’s fine for now.

There are still minor bugs here and there. Loading a game still unpauses it. A worst case scenario to fix it would be hiding the menu after loading a game, which isn’t all that bad. I’d like the editor help panel to show when the player enters it following the tutorial but not any other time, though this is a small thing. Other than that, the rest of the errors - CO2 flickering, compound totals balancing - can’t be fixed by editing the GUI and will have to wait.


I like what you got here.