4 ms·
Great job! A few suggestions: 1) You may have better results with your pixel art if you change the filteringMode of your SKTextures to SKTextureFilteringMode.
by lyinsteve 12y ago
Great job!
A few suggestions:
1) You may have better results with your pixel art if you change the filteringMode of your SKTextures to SKTextureFilteringMode.NearestNeighbor instead of .Linear.
2) You might want to store SKTextures in your imageDict instead of full SKSpriteNodes. It seems you aren't reusing those nodes, just the textures.
3) Maybe use a plist file to store the level data instead of hard-coded array constants? It's a little more flexible once you abstract the data outside of your source code.
- KennyCason 12y agoThanks a lot, It was certainly a battle of figuring out Swift while making continual forward progress. Thanks for the suggestions. I didn't even know about the filtering mode! I also agree on only storing the SKTextures. In regards to the level data. I hated storing hard coded arrays but couldn't figure anything else out in time :) I would 1000x prefer to use a plist file to store the data. That way I could also more easily parse the common level formats. For example: http://www.ne.jp/asahi/ai/yoshio/sokoban/handmade/soko001.txt http://www.ne.jp/asahi/ai/yoshio/sokoban/handmade/soko001.tx... Thanks for taking time to read through the code!