Firstly, it's great that you want to open-source your code! It's a communal good that benefits all other software developers (not necessarily just Swift developers, although we will especially benefit).
Documentation and testing are good development practices, regardless of whether the source code is publicly available, and it sounds like you recognise that. Documentation, especially for public APIs, helps developers learn how to use your library, and creates a behaviour contract which gives you freedom to change the details of the implementation. The extent to which you should document non-public APIs is somewhat up for debate and depends on the specific APIs. Personally, I tend to over-document those things, which can be just as bad as having too little documentation (if the docs become stale, they're effectively useless and can also lead to bugs).
Testing helps validate the correctness of your code, and gives assurances to people who might want to use your library that it does what it says on the tin.
It is a lot of work, though. It's no problem to make it an aspirational goal and even ask for help to get it done.
I wouldn't worry about it. Not to say that it won't happen, but I've been quite active in the Swift community since the beginning, and I've only ever seen well-intended discussions and comments about code which people volunteer to open-source. Nobody expects perfection - the compiler and standard library are not entirely bug-free (otherwise bugs.swift.org wouldn't exist), and really no large software engineering project is. You make your best effort, things continuously improve, it takes time.
You shouldn't have to put up with insults or harassment (if it does happen). If anybody doesn't like what you've created, they can use something else. If they want to take it in their own direction or make changes you disagree with, open-source code allows them to do that; they can fork the project and change it to suit their needs. You have a game, which shows that the code does something useful; therefore it has value.
Instead of worrying about criticism, look towards the good things that open-sourcing your code can bring, and focus on making it easier for contributors to add value (if you're accepting PRs). It can connect you with other developers who are interested in the same topics, and you can work together towards making all of those improvements that are difficult to manage on your own.