Settings - UQdeco2800/2021-ext-studio-2 GitHub Wiki
The provided game contains support for user settings, which are accessible through the Settings screen.
Key Components
UserSettings
: Contains functionality for loading, storing, and applying settings.SettingsMenuDisplay
: Logic for the Settings screen, which shows how to work with UserSettings.
Adding required image assets
Image icons must be properly named in camelCase
format and committed in the images/assets/settings/
directory. Add the assets to be loaded in string format as shown.
Changing settings background
Settings background can be changed as shown below. Note: Try to avoid using a background with resolution over 1080p. This might cause slower asset loading and caching issues.
Adding respective icons for settings
Pass the name of the asset in the getIconImage
method
getIconImage
method returns a IconImage. Note: make sure the icon assets are properly sized. LibGDX scaling wont work.
Common Questions
I changed my resolution and now I can't see the game! How do I get back?
You can manually modify your settings file. This is stored in your home directory under DECO2800Game/settings.json
.
On Windows, this would likely be C:/Users/[username]/DECO2800Game/settings.json
.
You can manually make changes in the file, or delete it to revert to default settings.
The game runs too slow on my computer, what should I do?
The purpose of the settings menu is to let you adjust your graphics to keep the game running smoothly. Try:
- Lowering the FPS cap to 30. This controls how fast the game tries to run.
- Lowering your resolution (if running in fullscreen).