Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: cave in calculator  (Read 895 times)

winner

  • Bay Watcher
    • View Profile
cave in calculator
« on: January 23, 2010, 07:04:46 pm »

For fun I'm trying to make a little (2d side view) tiled physics simulator so I can have fun collapsing mountains.  The problem is I'm having trouble coming up with a simple set of calculations for the physics, so that blocks store up momentum as they fall and arches collapse when their strength is exceeded.  I'm hoping that one of you has a better idea of how this could be done.
Logged
The great game of Warlocks!

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: cave in calculator
« Reply #1 on: January 23, 2010, 08:11:41 pm »

Tiles are not really a good way to do rotations and arcs like that...
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Realmfighter

  • Bay Watcher
  • Yeaah?
    • View Profile
Re: cave in calculator
« Reply #2 on: January 23, 2010, 08:17:01 pm »

It all depends on how big the tiles are, really.
Logged
We may not be as brave as Gryffindor, as willing to get our hands dirty as Hufflepuff, or as devious as Slytherin, but there is nothing, nothing more dangerous than a little too much knowledge and a conscience that is open to debate

winner

  • Bay Watcher
    • View Profile
Re: cave in calculator
« Reply #3 on: January 23, 2010, 09:42:55 pm »

I know that they are not good for rotation and arcs so I am willing to do without those things.
Logged
The great game of Warlocks!

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: cave in calculator
« Reply #4 on: January 24, 2010, 01:08:36 am »

I imagine you could work this using classical physics and simulating friction between adjacent tiles.  You wouldn't have a frictional "force," per se, since a tile system doesn't naturally allow for continuous things like forces.  But adjacent tiles should retard movement some, enough to allow for stalactites and small caves.  I don't think there is a simple, cellular-automata-like method unless you want to go for some serious oversimplification.  But I'll keep thinking about it.
Logged
EMPATHY - being able to feel other peoples' stuff.

eerr

  • Bay Watcher
    • View Profile
Re: cave in calculator
« Reply #5 on: January 24, 2010, 10:05:37 pm »

What about using hexagonal tiles?

Like nestling egg cartons together. Side by side.

If a boulder falls upon the tip top rock, it falls to one side(perhaps even depending on rock rotation!)
A rock can fall straight down, to the side, or any combination of the two you can program.


Logged