Plan for allowing other screen resolutions

From OHRRPGCE-Wiki
Jump to navigation Jump to search

Non-320x200 resolutions are already supported nearly everywhere in Custom and are quite usable for games too, except by the battle system and builtin menus.

There are various obstacles in the way of supporting other resolutions:

Multiple resolutions[edit]

James added an undocumented "set screen resolution" command in 2017.

Some games could tolerate a variable resolution while any not designed around it need a fixed resolution.

In order to support different aspect ratios we might have a mode where the vertical resolution is fixed and the horizontal one adjusts to the screen

Battle System[edit]

  • The battle system is hard coded 320x200, making the resolution larger leaves empty space around its edges.
  • Battle backdrops would need to support larger sizes
  • the Battle formation editors would need to support larger sizes.

Built-in Menus[edit]

Built-in menus were hard coded to 320x200. This can be resolved by converting existing menu screens to slice-based menu screens. (Partially done)

  • Inventory (done)
  • Status (done)
  • Spells (started)
  • Equip
  • Buy menu
  • Sell menu
  • Save/Load
  • ...

Fonts[edit]

  • A new text rendering system has been implemented, but the font editor and file format still need replacing to allow non 8x8 pixel fonts

Backdrops (done)[edit]

  • All backdrops, whether for battle backgrounds, textbox backgrounds, or scripted backgrounds are all 320x200.
  • Our current file format is not flexible enough to support other sizes.
  • However a better file format would be fairly easy to implement. It should be RELOAD based to handle variable size backdrops. (done)

Portability and Backcompat (abandoned)[edit]

  • We would like to support portable versions like Android and iOS sometime in the future, and we don't want to allow people to use resolutions that couldn't work on those.
  • We want to make sure we have thought out all of the backwards compatibility issues with this before we proceed

A Proposal (abandoned)[edit]

What if we added a menu to custom that allowed the author to change their game's resolution?

  • They could choose a width and a height.
  • Depending on the resolution they have chosen, a list of warnings would be displayed.
  • If any size larger than 320x200 was chosen:
    • Warn that the battle system doesn't support other sizes
    • Warn that built-in menus don't support other sizes
    • Warn that backdrops don't support other sizes
  • If a size is chosen that is not in a list of well-known common resolutions:
    • Warn that full-screen may not work in some backends
    • Warn that future portability to mobile devices might be lost
  • If a very large size is chosen:
    • Warn that the game may not be playable on smaller screens
    • Warn that the game may display too slowly on slower devices

A menu like this could be implemented now, without solving any of the previously-mentioned compatibility problems. Unfortunately this menu would only really be useful to game authors who plan on plotscripting almost everything. Any game author who wants to use the standard battle system and standard menus would only be mocked by the existence of this menu :(