Skip to content

Fix screen size handling and improve game responsiveness#2

Open
madhurajayashanka wants to merge 1 commit intospacegpu:masterfrom
madhurajayashanka:improvements
Open

Fix screen size handling and improve game responsiveness#2
madhurajayashanka wants to merge 1 commit intospacegpu:masterfrom
madhurajayashanka:improvements

Conversation

@madhurajayashanka
Copy link

This commit addresses several issues related to screen size handling and improves overall game responsiveness:

  • Added checks in all drawing functions to prevent writing outside the visible screen area
  • Implemented flexible layouts for title screen, game over screen, and settings menu to accommodate various terminal sizes
  • Used max() and min() functions to ensure calculated positions are within screen boundaries
  • Applied string slicing to prevent writing strings longer than the screen width
  • Simplified the settings menu layout for better compatibility with smaller screens
  • Fixed issue with arrow keys not working for bird control
  • Improved game state management for smoother transitions between screens
  • Adjusted difficulty and game speed settings for better gameplay experience

These changes make the game more robust across different terminal sizes and improve the overall user experience. The game should now gracefully handle smaller screen sizes without crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant