Raquet / Wiki / v1x / Defines

Defines

Table of Contents

What are they for?

 Raquet has a few different defines in the Raquet.h file that we encourage you to modify for your specific preferences. These can alter the way the engine handles rendering, audio, and a few other features.

Screen Settings

 The SCREEN_WIDTH and SCREEN_HEIGHT defines will set the default window and rendering size. The default resolution is 256x240, which is a tribute to the Nintendo Entertainment System.

SCREEN_SCALE will set the default scale of the window, multiplied by the screen width and height.

Finally, ALLOW_FULLSCREEN will allow you to press F11 or Alt+Enter to fullscreen the window.

/* WINDOW CONSTANTS */
#define SCREEN_WIDTH 256
#define SCREEN_HEIGHT 240
#define SCREEN_SCALE 3
#define ALLOW_FULLSCREEN

Rendering Settings

INTEGER_SCALING is enabled by default and can be commented it out if not desired. Integer Scaling will scale the internal resolution only to multiples of its original size to prevent mixels.

VSYNC is enabled by default and enables the internal SDL hardware V-SYNC support. This can be disabled if you want to have your game run faster internally than the maximum refresh rate of your monitor.

DELTA_TIME will enable Raquet's Raquet_DeltaTime variable, and disable the internal capped framerate.

 Finally, BACKGROUND_CLEARING_COLOR is disabled by default and will set the background of the window's color to be the same as the one set with Raquet_Clear()

/* RENDERING SETTINGS */
#define INTEGER_SCALING
#define VSYNC
#define DELTA_TIME
#define BACKGROUND_CLEARING_COLOR

Misc. Settings

 There's some extra settings that we recommend looking over in case you need them changed. GAME_NAME is the default window header name, and should always be a string.

AUDIO_SMAPLE_RATE is the audio quality. A bigger number for the sample rate results in higher quality, so if you need more than 44K quality for some reason then you should modify this.

Finally, FRAMERATE_CAP caps the internal framerate. Any framerate higher than 60 should disable the VSYNC define in order to allow the game to run faster than 60 ticks per second.

/* MISC SETTINGS */
#define GAME_NAME "Raquet Game Engine"
#define AUDIO_SAMPLE_RATE 44100
#define FRAMERATE_CAP 60

Debug Settings

 Debug settings allow you to better visualize any issues that might be a problem at any point in time.

VISUALIZE_BBOX will draw a colored unfilled rectangle around all actors in a scene that are drawn with the Raquet_DrawActor function.

PRINT_DEBUG will print out various messages to let you know when or if something is going wrong, usually giving an error message when something happens internally. This will also include the stdio.h header file.

/* DEBUG SETTINGS */
#define VISUALIZE_BBOX
#define PRINT_DEBUG