Jump to content

How to simulate sands in game Sand Slides

- - - - -

  • Please log in to reply
2 replies to this topic

#1
bmeson

bmeson

    Newbie

  • Members
  • Pip
  • 1 posts
I was playing the puzzle game Sand Slides on iPad where coloured sands fall from the sand chutes. I wondered how to simulate the movement of sands in such games. Does the program need to simulate each and every particle of sand? If that's the case, that sounds like a lot of computation for iPad CPU. Or is there other strategy to simulate this?

#2
Smilex

Smilex

    Learning Programmer

  • Members
  • PipPipPip
  • 84 posts
If each 'sand corn' needs to act differently to the world, then each 'sand corn' must be an object for itself, which means have it's own physics computation. I would love to hear if there's some other logic too it though.
Since such physics seem to be very small and many, something like a GPU would most likely run it better than a CPU, I have no idea how the iPhone works though. What I mean is a GPU usually has many cores while a CPU has less, but bigger ones.

#3
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Owen Piette's wxSand
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users