Depending on the target system (e.g., a high-powered desktop PC or an embedded handheld system with a slow CPU and no FPU), various options can be set in libcrtxy. On a slow system, fancy visual effects intended to simulate an arcade experience can be disabled (anti-aliasing, blurring, etc.).
Screen-size shouldn't matter to game-play, so physical screen size in pixels (e.g., 640x480 or 1280x1024) is up to the end-user, or person packaging your software for a particular target, as well. Your game logic is based around a virtual canvas size, and line positions are given using fixed-point values.
The options that can be set at runtime include:
- Screen width & height
- Screen depth (16bpp, 24bpp or 32bpp)
- Window or fullscreen (requested or required)
- Todo:
- Utilize SDL_ListModes()
- Todo:
- Native screen resolution when in fullscreen
- Alpha blending (on, off, or "fake")
- Anti-aliasing
- Gamma correction
- Todo:
- Support gamma values
- Backgrounds
- Bitmap scaling (fast or best)
- Todo:
- Implement best scaling
- Blurring
- Todo:
- Implement blur effect
- Additive effect
- Todo:
- Implement additive effect
- Todo:
- Persistence-of-vision effect
The options that get used are determined by the following, and should occur in this order:
- Hard-coded defaults (set at the time libcrtxy is compiled)
- System-wide "libcrtxy" configuration file (e.g., "/etc/libcrtxy/libcrtxy.conf")
- User's own "libcrtxy" configuration file (e.g., "~/.libcrtxyrc")
- Environment variables (e.g., "CRTXY_SCALE=FAST")
- System-wide configuration file for the application (e.g., "/etc/some_game/some_game.conf")
- User's own configuration file for the application (e.g., "~/.some_gamerc")
- Command-line arguments (e.g., "some_game --crtxy-bpp 32")
See also:
Setting Options