samedi 28 février 2015

xCode Swift: Developing a Random Point game with progressively harder rounds

Using: xCode 6, Swift /w SpriteKit


Prompt: I am developing a game and part of it requires that a point that is randomly sized between 32 x 32 and 64 x 64 is randomly generated around the screen with a number inside it.


Basically the user then needs to tap the dots in the order they appear. Once the dots run out the user wins (Dots remaining number is in the corner)


Issue: My issue that once the point is generated I need the next point to appear while the the proceeding point is still active.


--



  1. While point 1 appears point 2 is fading in.

  2. Randomly generated around the screen.

  3. Number ordered.

  4. Optimized for performance in mind


--


EDIT: Realized I forgot to post some code!


Basics that I have:



let screenWidth = screenSize.width
let screenHeight = screenSize.height
var x = arc4Random() % screenWidth
var y = arc4Random() % screenHeight


All ideas and theories are welcome! Thanks for all help that is given.





Aucun commentaire:

Enregistrer un commentaire