Blog

All Blog Posts  |  Next Post  |  Previous Post

Using the new iOS Sprite Kit from Delphi, a little XMas gift from the TMS team

Bookmarks: 

Friday, December 19, 2014

With iOS 7, Apple introduced the new SpriteKit framework for game development on iOS 7. This framework manages things like graphics, animation, physics, particle effects, gravity, ... all things typically needed for game development. The full documentation for SpriteKit can be found in the "SpriteKit Programming Guide"

We did some research here on using the SpriteKit framework from Delphi XE7 and that triggered the idea of creating a small demo with it in XMas spirit as it is the time of the year for it.

In the little demo, we use an XMas tree with gifts under it as background. This is provided as 4 PNG files, a retina and non-retina version for both portrait and landscape mode. The snowflakes in the demo are particles and therefore we need to create a SpriteKit particle file which can be done from XCode. The SpriteKit particle file contains the PNG for a snow flake and the "snow" particle type is chosen. The result is a .SKS file that is linked as resource with the application.
To make the app a little fun, we added a MotionManager. The snow starts falling when you first shake the device. This is accomplished by handling the motionEnded method at UIViewController level. The motion manager is used to make the snow fall faster according to the angle with which you hold the device. The Delphi TMotionSensor makes this possible.
Finally, to stay in the XMas spirit, we added an MP3 files as resource that plays Jingle Bells as background music.


Video demonstration of the application:


Have fun exploring the iOS SpriteKit framework with the full source code for Delphi XE7* of this gift you can download here.

Note: you'll need to add the SpriteKit framework to the Delphi XE7 IDE to compile the app



Bruno Fierens


Bookmarks: 

This blog post has received 1 comment.


1. Wednesday, December 24, 2014 at 6:36:02 PM

A skiing physics engine would be nice ;-)

A happy new year to TMS, one of the greatest third party component developers in this galaxy!

Aschbacher Peter




Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.



All Blog Posts  |  Next Post  |  Previous Post