Snipes icon indicating copy to clipboard operation
Snipes copied to clipboard

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

Open codearranger opened this issue 5 months ago • 3 comments

  • 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

codearranger avatar Sep 16 '25 03:09 codearranger

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 #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!

CyberShadow avatar Sep 17 '25 09:09 CyberShadow

@CyberShadow I asked @claude to address your concerns in https://github.com/codearranger/Snipes/pull/1

codearranger avatar Sep 19 '25 04:09 codearranger

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

codearranger avatar Sep 19 '25 05:09 codearranger