minecraft-py / minecraft

A Minecraft-like game written in python3
GNU General Public License v3.0
157 stars 25 forks source link

Game settings #24

Closed dmarakom6 closed 2 years ago

dmarakom6 commented 3 years ago

I would like to have a game settings menu, where I can change the sensitivity or the brightness.

zhengxyz123 commented 3 years ago

A good idea! I'll try it.

Maybe we need help.

dmarakom6 commented 3 years ago

I'd love to help!

zhengxyz123 commented 3 years ago

Would you give me some advice?

dmarakom6 commented 3 years ago

Sure!

Visual Implementation

Just like the rest of the rest of the game menu, add a button labeled "Game Settings" along with the "Back To Game" & "Exit" buttons. This button redirects the user to a sub-menu, where he can find brightness or sensitivity sliders (if sliders sound like a huge leap, you can use simple input fields).

Functional Implementation

Depending on the user's input, change utils.brightness, or the variables that are responsible for the player's sensitivity.

I recently forked the project, so I can try working on these features if you're too busy.

zhengxyz123 commented 3 years ago

Use tk to implement? No, to copy the real Minecraft, I would use pyglet to rewrite the game settings menu(or start screen). I'll implement the slider soon.

dmarakom6 commented 3 years ago

Tkinter sounds like a good solution.

zhengxyz123 commented 3 years ago

Tkinter sounds like a good solution.

Did you play Minecraft? The Game Settings Screen and Game Screen are in one Window.

Maybe it's a good solution, in launcher.

dmarakom6 commented 3 years ago

I did try it, and I loved it. So, the menu can be an extra button in the same window. Alternatively, it could be a new tk() window from the launcher.