Just a quick intro for those who replied:
First youll need a control of class OSXLibSKView (or iOSLibSKView, for that case).
Besides most of the Responder and View events (Klick, Touch and Gestures are supported), it features 5 main events that fire consecutively once a scene is presented where you can attach your game code:
UpdateScene (starts before any automatic calculations are applied)
DidEvaluateActions (actions attached to nodes have been processed)
DidSimulatePhysics (you name it!)
DidApplyConstraints (Yes, a bit like iOS autolayout: Constraints can hold nodes in a certain distance related to each other or change their orientation in relation to their positions)
FinishedSceneUpdate (everything automatic has been done)
EDIT: And you dont have to use them. You can create a game with Actions only and leave the events untouched as well.
How often these events are called depends on the AppleSKViews preferredFPS property. Usually it tries to reach 60 FPS.
The AppleSKView is the object itself, OSXLibSKView is just a control container for it. You access if via OSXLibSKView.AppleObject (and I want to forward conversions to Xojo classes and convenience methods to the container later).
Like written above, a SKView is used to present a scene. A scene has a certain size that you define when creating one, and it can contain different kinds of SKNodes. These are the basic building blocks, and they come in different flavors: SpriteNodes to draw sprites, LabelNodes for Text, AudioNodes for sound sources bound to a certain spot of the scene, CameraNodes, EmitterNodes for special mass effects and so on. A scene itself is a node too.
You add nodes with their AddChild method and can build tree structures if you like. Nodes can be connected by the use of Constraints, ReachConstraints (that help to define the movement of connections like ankles), and you can attach PhysicsBodies to them to make them subject to gravity and different kinds of forces.
These PhysicsBodies can be used to build joints of different kinds between them, from the PhysicsWorld property of the scene.
And then you have a myriad of Actions that you can attach to these nodes, and which you can group, play in order or call another block once they finished. PhysicsBodies are used to detect collisions too. For these, you have different kinds of 32Bit bitmaps you can use to define which type(s) a body belongs to and to which type(s) of other objects it should react. Contacts are forwarded to the control as events which feature a PhysicsContact object that tells you which two objects collided at which point with which impact.
As a very short intro:
Sub Shown() Handles Shown
me.AppleObject.ShowsFPS = true
dim scene as new AppleSKScene (me.AppleObject.Frame.size_)
scene.BackgroundColor = AppleColor.FromColor (&cCEFFE100)
me.AppleObject.Present(scene)
dim label as new AppleSKLabelNode("OSXLib SpriteKit", "Helvetica-Neue")
label.FontColor = AppleColor.FromColor(&c0E77B200)
label.FontSize = 80
label.Position = scene.Frame.Center
label.PhysicsBody = new AppleSKPhysicsBody (label)
label.PhysicsBody.Mass = 0.01
scene.PhysicsWorld.Gravity = FoundationFrameWork.CGMakeVector(0.0, -0.1)
scene.AddChild label
label.RunAction(AppleSKAction.Group(AppleSKAction.ApplyImpulse(FoundationFrameWork.CGMakeVector (0, 0.5), 4), AppleSKAction.ApplyTorque(0.03, 4)))
End Sub
in the Shown event of an OSXLibSKView shows this:
https://dl.dropboxusercontent.com/u/21200221/Xojo/SpriteKitRotate.mp4
(completely smooth in reality, stops only due to the screen recording software)
And Apple explains a lot more: https://developer.apple.com/library/prerelease/content/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40013043-CH1-SW1