Skip to content

[macOS] Fix SDL threading issues and add full macOS support#19

Open
codearranger wants to merge 2 commits intoDavidebyzero:masterfrom
codearranger:macos
Open

[macOS] Fix SDL threading issues and add full macOS support#19
codearranger wants to merge 2 commits intoDavidebyzero:masterfrom
codearranger:macos

Conversation

@codearranger
Copy link
Copy Markdown

  • Move SDL operations to main thread to fix NSWindow threading errors
  • Add SDL_MAIN_HANDLED macro for macOS builds
  • Implement proper event processing in main game loop
  • Update documentation to reflect working macOS status
  • Add .gitattributes for consistent line endings across platforms
  • Add CLAUDE.md with project instructions for AI assistance
  • Ignore custom font file in .gitignore

The SDL version now runs correctly on macOS with all threading issues resolved. Font fallback system automatically uses system fonts when custom font is unavailable.

🤖 Generated with Claude Code

- Move SDL operations to main thread to fix NSWindow threading errors
- Add SDL_MAIN_HANDLED macro for macOS builds
- Implement proper event processing in main game loop
- Update documentation to reflect working macOS status
- Add .gitattributes for consistent line endings across platforms
- Add CLAUDE.md with project instructions for AI assistance
- Ignore custom font file in .gitignore

The SDL version now runs correctly on macOS with all threading issues resolved.
Font fallback system automatically uses system fonts when custom font is unavailable.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@CyberShadow
Copy link
Copy Markdown
Collaborator

Hi, cool use of Claude!

Though I'm not the maintainer, I've contributed a little to this project to add Linux/SDL support. Here's my two cents:

  • The newline change makes the diff difficult to review. It would be nice if it was in its own commit.
  • Even when comparing while ignoring whitespace, the diff is still very large and difficult to review. The description has seven bullet points of changes - ideally, those would be seven commits.
  • One criteria for accepting this would be to make sure that this doesn't negatively affect the Windows build, especially non-SDL. However, I don't have an easy way to test that, as I don't use Windows either. Perhaps a GitHub CI pipeline could be created to validate this requirement.
  • It would be nice to understand how this interacts with Fix CI #17, which also fixes a POSIX build issue and adds CI.
  • I'm not sure about the CLAUDE.md addition. At the very least, it should use the agent-agnostic AGENTS.md name; but, even then, it looks a lot like a second README.md. I think all relevant documentation should be either in the usual human-targeted documents (README.md, CONTRIBUTING.md, etc.), and if there really is any information that is useful only to agents and never to humans, that could go into an AGENTS.md file. If Claude needs specific instructions (e.g. how to use the specific functions that the Claude Code agent host makes available to the model), then that could go into a section of that file.
  • I'm not sure about the change in font file handling. As far as I know, the custom font file is required for correct visuals. Unfortunately it can't be redistributed along with the source code due to being based on a non-free font, however, it's still easy enough to obtain. Automatic fallback may make it too easy to accidentally run the game in a way that it was not meant to be run.

I may be able to comment further on the code changes if they are made more atomic and easy to review, but here's my feedback so far. Either way, I'll leave the final word to @Davidebyzero.

🤖 Generated with Claude Code

Just wanted to note, thank your for the disclosure. I've seen too many PRs with drive-by "contributions", created entirely using LLMs, but don't fix any real problems and are submitted by folks who neither understand the code changes nor disclose the use of LLMs!

- Replace CLAUDE.md with AGENTS.md to be agent-agnostic
- Remove duplicated documentation from AGENTS.md
- Make font fallback warnings more explicit
- Clarify that custom font is required for authentic visuals

Co-authored-by: Code Arranger <codearranger@users.noreply.github.com>
@codearranger
Copy link
Copy Markdown
Author

@CyberShadow I asked @claude to address your concerns in codearranger#1

@codearranger
Copy link
Copy Markdown
Author

@CyberShadow You might also like to see the Snipes inspired game I'm creating using Claude Code. https://app.websnipes.com/

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.

2 participants