Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a game settings tab in the settings view and add a difficulty … #5655

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JonBooth78
Copy link
Contributor

…slider to it

Difficulty is stored 2 ways, once for the Engine as a config value that will apply to any new game you start.

A game itself (so a savefile) will persist it's own difficulty and if it's not available on load, will use the engine configured value.

Within lua code the Game.difficulty attribute can be used to determine the current difficulty level, from 0 to 1, easiest to hardest.

Also, separate out settings persistence from closing the window, so now if you open the settings window, change the settings and then save the game they are persisted in the saved game state.

image

Note: This currently has no effect at all on the way the game plays, this will come later, however, I believe there is enough here to have a good conversation on the direction this is taking.

…slider to it

Difficulty is stored 2 ways, once for the Engine as a config value that will apply to any new game you start.

A game itself (so a savefile) will persist it's own difficulty and if it's not available on load, will use the engine configured value.

Also, separate out settings persistance from closing the window, so now if you open the settings window, change the settings and then save the game they are persisted in the saved game state.
@impaktor
Copy link
Member

Will the player be informed what will change with added difficulty?

My main concern is that adding difficulty level adds more complexity and difficulty to balancing the game, but if you think you can pull it off, I'm happy.

@JonBooth78
Copy link
Contributor Author

@impaktor, great question.

I didn't really think about it this way until you asked. Do we want 'one difficulty setting to rule them all', or would we be better off having multiple different sliders for things like

  • Number of pirates
  • Likelihood of pirate attack
  • Equipment level of pirates

etc, etc, and then a few buttons for 'Sightseeing', 'Easy', 'Medium', 'Hard', 'Insane' that sets them to presets?

Re game balance, I kind of feel that so long as we get the balance right for the default settings, then the point of this setting is to allow people to tweak the balance more to their preferences and if they've changed it and find the balance off, they can always tweak back. I don't know if that's the right perspective though, it's not something I've much thought about.

Also, if that is the case, then perhaps having multiple sliders and presets allows folks even more customization opportunities to set the balance the way they like. It also allows us to balance that small set of presets. I guess it depends on how much we want to control the experience vs, how much we want players to be able to experiment.

That second approach would also be great for the developers to find the right balance, rather than trying to get a single slider working...

@JonBooth78 JonBooth78 marked this pull request as draft November 8, 2023 06:26
@JonBooth78
Copy link
Contributor Author

Changing this to a draft, I'm experimenting with something different for now so will revisit later.

@mwerle
Copy link
Contributor

mwerle commented Sep 30, 2024

From a historical perspective (Elite), players could "choose" their difficulty in-game by the government type of system(s) they visited - Democracy being safest to Anarchy being most dangerous. This was also tied to the commodity/mission markets with less safe systems generally having higher potential profit margins.

Not sure if this is already factored into Pioneer? I see systems have a large variety of government types and economies.

(in my latest PR I also added a general "Settings" tab to the options window for a new setting.. I should have looked at this PR before doing so!)

From a technical perspective, I would generally never use a float/double to store data if an integer can be used instead. In this case the code is even performing floating point rounding operations to ensure things work correctly. Why not just use an int and values from 0..100? I doubt difficulty would ever need to be a fractional part of a percent, and even if, just go from 0..1000, or 0..10000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants