ASGE  3.2.0
Simple Game Framework in GL
ASGE::GameSettings Struct Reference

#include <GameSettings.hpp>

Public Types

enum class  WindowMode { EXCLUSIVE_FULLSCREEN = 0 , WINDOWED = 1 , BORDERLESS_WINDOWED = 2 , BORDERLESS_FULLSCREEN = 3 }
 
enum class  MagFilter : uint32_t { NEAREST , LINEAR }
 
enum class  Vsync { ENABLED , ADAPTIVE , DISABLED }
 

Public Attributes

int window_width { 800 }
 
int window_height { 640 }
 
int window_bpp { 32 }
 
int msaa_level { 32 }
 
int fps_limit { 60 }
 
int fixed_ts { fps_limit * 2 }
 
int anisotropic { 16 }
 
std::string write_dir {}
 
std::string game_title { "My ASGE Game" }
 
WindowMode mode { WindowMode::WINDOWED }
 
MagFilter mag_filter {MagFilter::LINEAR}
 
Vsync vsync {Vsync::ADAPTIVE}
 

Detailed Description

GameSettings allows you to configure the game window and its initial state upon construction of the game. You could easily use a GUI to create an instance of GameSettings and then construct the game using it.

ASGE::GameSettings game_settings;
game_settings.window_width = 1920;
game_settings.window_height = 1080;
game_settings.window_bpp = 32;
game_settings.msaa_level = 1;
game_settings.fps_limit = 360;
game_settings.fixed_ts = 240;
SampleGame game(game_settings);
GameSettings allows you to configure the game window and its initial state upon construction of the g...

Definition at line 45 of file GameSettings.hpp.

Member Enumeration Documentation

◆ MagFilter

enum ASGE::GameSettings::MagFilter : uint32_t
strong
Enumerator
NEAREST 

Takes the nearest pixel in manhattan distance.

LINEAR 

Takes the weighted average of all 4 pixels.

Definition at line 55 of file GameSettings.hpp.

◆ Vsync

Enumerator
ENABLED 

Forces vsync at all times. FPS will be controlled by monitors refresh.

ADAPTIVE 

Enables vsync when able to meet monitor's refresh, disables when below.

DISABLED 

Allow the game to run unrestricted.

Definition at line 61 of file GameSettings.hpp.

◆ WindowMode

Enumerator
EXCLUSIVE_FULLSCREEN 

Fullscreen without decorations.

WINDOWED 

Windowed desktop mode.

BORDERLESS_WINDOWED 

Borderless window desktop mode.

BORDERLESS_FULLSCREEN 

Borderless full screen window mode.

Definition at line 47 of file GameSettings.hpp.

Member Data Documentation

◆ anisotropic

int ASGE::GameSettings::anisotropic { 16 }

Improves filtering at oblique angles. Not useful for 2D.

Definition at line 77 of file GameSettings.hpp.

◆ fixed_ts

int ASGE::GameSettings::fixed_ts { fps_limit * 2 }

The delta between fixed time-steps.

Definition at line 76 of file GameSettings.hpp.

◆ fps_limit

int ASGE::GameSettings::fps_limit { 60 }

The engine will attempt to never exceed this tick rate.

Definition at line 75 of file GameSettings.hpp.

◆ game_title

std::string ASGE::GameSettings::game_title { "My ASGE Game" }

The window title.

Definition at line 80 of file GameSettings.hpp.

◆ mag_filter

MagFilter ASGE::GameSettings::mag_filter {MagFilter::LINEAR}

Textures will use this filter by default.

Definition at line 82 of file GameSettings.hpp.

◆ mode

WindowMode ASGE::GameSettings::mode { WindowMode::WINDOWED }

The window mode i.e. Fullscreen.

Definition at line 81 of file GameSettings.hpp.

◆ msaa_level

int ASGE::GameSettings::msaa_level { 32 }

MSAA can help with edges, but be lowered if FPS is poor.

Definition at line 74 of file GameSettings.hpp.

◆ window_bpp

int ASGE::GameSettings::window_bpp { 32 }

The Bits Per Pixel (BPP) of the window.

Definition at line 73 of file GameSettings.hpp.

◆ window_height

int ASGE::GameSettings::window_height { 640 }

The height of the GL Window to create.

Definition at line 72 of file GameSettings.hpp.

◆ window_width

int ASGE::GameSettings::window_width { 800 }

The width of the GL Window to create.

Definition at line 71 of file GameSettings.hpp.

◆ write_dir

std::string ASGE::GameSettings::write_dir {}

The default write directory for ASGE IO.

Definition at line 79 of file GameSettings.hpp.


The documentation for this struct was generated from the following file: