Latest 1.0.1
License MIT
Platforms ios 8.0, requires ARC
Frameworks SpriteKit


2D physical water simulation for SpriteKit


How to use

Add DynamicWaterNode.h, DynamicWaterNode.m, Droplet.png and Droplets.fsh to your project

Add to your scene:

- (void)didMoveToView:(SKView *)view {
     self.waterNode = [[DynamicWaterNode alloc]initWithWidth:self.size.width
                                                 fillColour:[UIColor colorWithRed:0 green:0 blue:1 alpha:0.5]];
    self.waterNode.position = CGPointMake(self.size.width/2, 0);
    [self addChild:self.waterNode];


Step the simulation in your scene’s update method. See demo project for an example of a fixed time step implementation

[self.waterNode update:dt];

Call render: after the simulation has been updated. Only call render once each frame.

[self.waterNode render];

Making splashes:

[self.waterNode splashAtX:100 force:20 width:20];

Various properties of DynamicWaterNode can be changed to control the feel of the water. The demo project includes a settings screen where you can alter these to see their effect.

Latest podspec

    "name": "SBDynamicWaterNode",
    "version": "1.0.1",
    "summary": "Physical water simulation for SpriteKit",
    "description": "Physical water simulation for SpriteKit with demo application",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Steve Barnegren": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "requires_arc": true,
    "source_files": "SBDynamicWaterNode/**/*.{h,m}",
    "resources": "SBDynamicWaterNode/**/*.{png,fsh}",
    "frameworks": "SpriteKit"

Pin It on Pinterest

Share This