Skip to content

Instantly share code, notes, and snippets.

View sliminality's full-sized avatar

Slim sliminality

View GitHub Profile
@amirrajan
amirrajan / main.rb
Created June 22, 2024 16:06
The Ensign - Mind Games source
class MindGames
attr_accessor :message_history, :message
def initialize game
@game = game
@message = ""
@message_history = []
@random_tips = []
end
@amirrajan
amirrajan / readme.md
Last active September 28, 2025 08:50
xplat UI considerations for games

Things to consider when building a cross-platform game:

  1. Minimum button sizes for touch displays and small screen (eg steamdeck, mobile, nintendo switch hand held mode) is about 60 pixels. Anything smaller will fail lotcheck (Apple, Android, Nintendo).
  2. Visual feedback of UI interactions (Android, Apple -> they'll reject a feature/showcase of your game if you don't have this).
  3. Safe area/layout considerations. Avoid things like notches and app switch "chin". If you're making a game that can render edge to edge/without letter boxing, test at an aspect ratio of 21:12 (1680x960). Your safe are should be centered with an aspect ratio of 16:9 (placement of UI controls should always be in the safe area or they may be inaccesible because of notches and beveled edges).
  4. Button input detection with keyboard, touch, and gamepad. Navigation using keyboard, gamepad, mouse.
  5. Anything below 22px font size is pretty much unreadable on small screens (mobile, Steam Deck, Switch Lite).
  6. Text fields is a world of p