Coder Social home page Coder Social logo

ksboingball's Introduction

KSBoingBall

Challenged by Xamarin's Recipe Cook-off (http://blog.xamarin.com/xamarin-recipe-cook-off/) I wrote this little demo app for iOS 7 which covers the following topics:

  • SpriteKit in general.
  • Creating a UIViewController and adding an SKScene to it.
  • Implement interaction with the scene by standard UIControls and device shaking.
  • Demonstrate how to use the physics engine of SpriteKit to make a ball bounce realistically.
  • Show how to use SKShapeNode
  • Show how to load an animated SKSpriteNode from individual textures.
  • Demonstrate loading and using particle systems created with Xcode's particle editor.
  • Show how to implement collision detection using the physics engine.
  • Show how to play sound effects.

You can find a more detailed post about the project on my blog at http://krumelur.me/?p=164.

The recipe's idea is based on the good old Amiga Boing Ball demo from the 1980s. I found a very good animation of the ball at http://www.amigalog.com/amiga-boing-ball-logo-and-animation/ for downloading to get me started.

The result looks like this, but you have to see it in action. It is running at constant 60fps on my iPhone 5.

Without particle effects: KSBoingBall

With particle effects enabled: KSBoingBall

The project was built using Xamaring.iOS Indie edition 7.0.0.11.

// Author: // Krumelur Soft // René Ruppert [email protected] // // Copyright (c) 2013 // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE.

ksboingball's People

Contributors

krumelur avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

anshpat2826

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.