Main Menu - Options Menu


So I’ve been working on the code for the Options Menu. I know that the GUI will be changed and so I haven’t focused to much on the small details. However I’ve set up a lot of buttons and some nice features.

Here is the latest video, and picture, which shows the controls section.

Its not hard to code all these buttons, however it can be time consuming as I have to set them all up in the .layout file with XML, them root them in the .lua file, if they are a button I have to set that up as well in the lua as well as their function, lastly I have to make sure they all show/hide when ever a button is pressed. So a lot of copy/paste is being done. But I think it looks nice and gives a feel of a real menu.

Options Menu Discussion

It sucks that I can only give you one like. You’ve done a great job with this so far. For the controls, you can easily just modify the controls.lua file (at least I think that’s what it was called) in the root of the scripts directory using simple streams. If you have any other questions just ask.


I’ll take a look at the controls tomorrow, how does the text look? Would a different font work better, also should I left align it?


Used the Symmetry Buttons for +/- would like the minus button to be a real minus.
I didn’t spend a lot of time making the buttons look nice or putting them in the right place as the GUI is going to change soon.

However one thing I would like to do is increase the middle “buttons” and give them a spot to displace the volume level. IE: 100%. However I’m also considering replacing the buttons with a field or label instead.


You can dynamically edit the button label text, so you can do something like “<-> Master Sound (50%) <+>”


Oh okay. I still need to set up a variable and how to call the sound first. I have no clue how to do that. And tbh would need someone to walk me through each step.


Just message me on slack if you need any help. Did you already register the + button to call a function whenever it is pressed?


Yes, but the function is empty


Started working on setting up toggleable buttons:

And got the sound working, here is an example to mute, max it. Going to change it so you increase/decrease by 10.


Okay here is a video of the sound set up better. You can adjust it by increments of 10, and it displays it for you as well.


Could I also get a list of everything that wants to be done for the Options Menu for 0.3.3? There are some things I can do easily and others that require new learning new things. I’d like to be able to get as much done on it as possible, and such was thinking about prioritizing the list.


Things to include:

  1. Everything that is in ogre.cfg
  2. Separate sliders for overall sound, music, and effects
  3. Everything that can be found in keymap.lua
  4. Graphics quality (so that we can turn off unnecessary effects for people with bad videocards).
  5. Languages

Things to not include:

  1. Level of difficulty, this is done after pressing New Game for the first time.
  2. Similar gameplay related items.


Here is everything from those first two files:

Colour Depth=32
Display Frequency=N/A
Fixed Pipeline Enabled=Yes
Full Screen=No
RTT Preferred Mode=FBO
VSync Interval=1
Video Mode=1366 x 768
sRGB Gamma Conversion=No
kmp.undo = {“ctrl”, “U”}
kmp.redo = {“ctrl”, “R”}
kmp.remove = {“R”}
kmp.newmicrobe = {“C”}
kmp.vacuole = {“S”}
kmp.mitochondrion = {“M”}
kmp.oxytoxyvacuole = {“T”}
kmp.flagellum = {“F”}
kmp.chloroplast = {“P”}
kmp.togglegrid = {“G”}
kmp.rename = {“F12”}
kmp.gotostage = {“F2”}
kmp.forward = {“W”}
kmp.backward = {“S”}
kmp.leftward = {“A”}
kmp.rightward = {“D”}
kmp.shootoxytoxy = {“E”}
kmp.reproduce = {“P”}
kmp.togglemenu = {“ESCAPE”}
kmp.skipvideo = {“ESCAPE”}
kmp.gotoeditor = {“F2”}
kmp.altuniverse = {“F1”}
kmp.screenshot = {“SYSRQ”} --printscreen button = {“EQUALS”}
kmp.add = {“ADD”}
kmp.minus = {“MINUS”,}
kmp.subtract = {“SUBTRACT”}

I’m going to get buttons set up for Music and Sound effects, then we can do sliders for them all. Which I might need help on.
Also what graphics qualities? Be specific as I can get the layout set up first then start coding it all.

With the controls, do you want them to be able to remap the keys? If so would we have to adjust what the tutorial/tooltips say based upon what keymapping is set? I think it could be done, just need some extra variables and some switches (if/if elses)

The other thing is Langauges?


Yes, definetely languages. I forgot about that. Thanks for reminding me!

For now, the only real graphics thing we have is having the membrane be fluid. We can also increase the spawn radius, which will allow people to zoom out more.

I think we need to have the keys some of the keys be remapped. Others, like print screen, shouldn’t change. And others, like toxin emission, will be edited within the microbe editor. So I’m guessing these ones:
kmp.undo = {“ctrl”, “U”}
kmp.redo = {“ctrl”, “R”}
kmp.remove = {“R”}
kmp.newmicrobe = {“C”}
kmp.togglegrid = {“G”}

kmp.forward = {“W”}
kmp.backward = {“S”}
kmp.leftward = {“A”}
kmp.rightward = {“D”}

kmp.reproduce = {“P”}
kmp.togglemenu = {“ESCAPE”}
kmp.gotoeditor = {“F2”}


Okay sounds good, I was also using the Options -> Controls section to “DISPLAY” all the controls, or would that be somewhere else? Thanks for the reply I’ll try to get the layouts set up this week and we can go forward with that.


With the keymap, since it’s a lua table we can edit the values in the keymap dynamically so they appear immediately in-game. I don’t think it’s a good idea to have scripts edited by the game so you’d have to save the keymap to a save file (plaintext key-value list) much like the other options; maybe make it a separate file so you can have multiple independent control schemes, even.