lassefolkersen / highfrontier

The goal of High Frontier is a civilization-like game, which uses more realistic modelling of economy, climate, research and migration. Uniquely this game starts today - the initiation date of a game is todays date and the existing world is the world as we know it today, complete with cities and countries and people. The aim from there - that is whatever the player thinks the aim is for the world. Developing of the underdeveloping world, action against climate changes, expansion into the rest of the solar system, or just racking in a lot of money.
13 stars 3 forks source link

GUI ideas/approach feasibilities. #10

Open JonathanLochridge opened 5 months ago

JonathanLochridge commented 5 months ago

Since I seem to have hit a wall with basic functionality I decided to try looking into how the UI code is setup.

I had extra time and felt like working on this more, but wasn't sure exactly how to fix the issues I had narrowed down, and was hoping to come back to them after getting a little feedback on the approach.

it looks pretty sensible. I haven't completely looked over it, but I think I could make small changes to it now.

Doing images specifically to fit each button shouldn't be too hard without a performance drain using blit: https://www.pygame.org/docs/ref/surface.html#pygame.Surface.blit

Transparency is going to be harder, Since in pygame, you can set the transparency of a surface or layer. But not the actual things drawn. (Excepting images.)

If all the GUI are on a separate layer. Then we might be able to make it transparent. Although Ideally we would want the text to not be, but the rest of it to be, which might be a bit further trouble to do.

Depending on how it looks to be structured after further looking, It might be easy, or it might take restructuring to an extent. If it is the latter case than that approach will have to wait till later.

Making is so that more nested elements of the UI have a different shade, like we see in the discord or github UI is still feasible without transparency.

Or potentially something more ambitious with the images.(Which might work well for making some of the full-screne menus look good at least, or give options if we wanted to do something a little more art-intensive. I am leaning towards a simple color change to start with though?

Could start with multiple grey tones? Or go for like blues perhaps?

I should be able to preview some of the color changes on the main menu. I am not planning to move it off a branch on my own fork probably until after we get some of the bigger issues handled and I can properly test this.

JonathanLochridge commented 5 months ago

We could probably make the main menu look slightly better with a fancy title for the game too. I love the planet spinning though. That could probably be a single image made by editing the words in a font we like a little perhaps?

JonathanLochridge commented 4 months ago

I noticed a potential small U/Ximprovement. Allowing the esc key to bring up the file menu would be more natural in a lot of cases, we can still have the button though.

Ideally it would be context-dependent, although being able to bring up the file menu from anywhere wouldn't be terrible. (So long as it didn't cause glitches.) But making it also work as an "exit" screen button could be intuitive to an extent.