george-lim / smooth-sketch

An open-source Swift framework for realistic freehand drawing on SpriteKit Games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpriteKit Smooth Sketch
GitHub downloads GitHub release GitHub issues GitHub pull requests license

This project minimizes lag with free hand drawing SpriteKit apps by optimizing to decrease the number of nodes that are drawn on the screen from finger movement and eliminating the use of SKShapeNodes to output the lines. It uses bezier curves to calculate the movement of your sketch lines to produce the streaks that follow your finger.

  1. Inspiration
  2. Demo

Inspiration

Freehand drawing is surprisingly difficult to implement properly on SpriteKit. That's because SKShapeNode is currently plagued with memory leaking bugs, meaning your overall game performance will degrade exponentially as the user continues drawing, until their device inevitably crashes.

I came across this issue when developing my Traffic Pal app for iOS, which required free hand drawing. After developing this framework to maximize freehand drawing performance in my app, I decided to open source my work so that nobody has to spend countless hours researching and optimizing freehand drawing anymore.

Demo

Demo

About

An open-source Swift framework for realistic freehand drawing on SpriteKit Games.

License:MIT License


Languages

Language:Swift 100.0%