Archive<< January 2020 >>
- Next generation cross-platform components
- A Blog about the Blog
- Online training courses for TMS WEB Core at reduced price!
- Curious about our new technologies, new challenges & new products for 2020?
- Using EurekaLog with TMS Logging
- Adrian Gallero (21)
- Bart Holvoet (3)
- Bernard Roussely (1)
- Bruno Fierens (233)
- Gjalt Vanhouwaert (3)
- Holger Flick (15)
- Marcos Douglas B. Santos (5)
- Masiha Zemarai (33)
- Nancy Lescouhier (32)
- Pieter Scheldeman (24)
- Roman Yankovsky (2)
- Tunde Keller (3)
- Wagner R. Landgraf (63)
BlogAll Blog Posts | Next Post | Previous Post
Friday, December 19, 2014With 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
This blog post has received 1 comment.
All Blog Posts | Next Post | Previous Post