Open lspacenl opened 8 years ago
This idea needs more thought. What about large glass panes? Should damage anywhere destroy the entire glass pane?
We also need to decide under what precise conditions to destroy it.
You mentioned:
I think collisions are very reasonable, I am not sure about weight. A glass which could support any weight but not any collisions would be interesting. I could also add explosions as a condition to destroy glass.
The next question which arises is how it should appear in-game. We would at least need images for the glass in unbroken and broken state. I would also like to see some sort an animation, even just a simple one. Having the glass just change its image on destruction might not look so pretty IMO.
As for implementation, I think this could be implemented as a RectObject-like object with special features (as described in the issue).
I think you have some very good points, @Wuzzy2. I would like to see the glass shatter under too much static load, though. I do want the shards to be modeled, so they can fall down and destroy balloons or trip a seesaw. Once the shards have had their impact, they can be removed - like balloon and the explosion splatter of dynamite.
Technically, I'd suggest to make the pane indeed of a rectobject with overridden collision and normal impulse reporting. Once broken, replace the rectobject with as many shard objects - circleobjects with the "sharp" collision property.
Shards are cool, why not? But better be careful not to make it too chaotic, or else level design could be annoying as too much randomness or chaos and unpredictable courses of the shards is involved.
I would not exactly replace the RectObject by shards only. This implies the RectObject is gone for good. What I meant to say, I would turn it into a Scenery background thing, something like the remains of the broken glass on the wall, so it just doesn't turn into shards alone. It is just for eye candy and doesn't do anything and nothing collides with it, like a Scenery. The shards you suggested can still be added on top of that.
I like the way you guys are thinking. I would prefer to make the shards quite small though. about the size of a popped balloon. and it may even be fun to let them continue to exist. You might be able to fill a pit with them so e.g. a bowling ball might roll over the top of them.
I have been giving some thought to the animation and what it would look like. But after watching a few videos (don't you just love youtube) it seems that the pattern of the shattering appears virtually instantaneous after which the piece of glass divides itself into shards along the lines of the pattern. . The type of glass (tempered or not) seems to determine the average size of shards. This could also be an alibi to make glass that shatters on impact or on overload. As I am writing this it occurs to me that we would always see the glass edge on. It would be weird to suddenly see large triangles appear were there was an almost linear shape to begin with.. Anyone got an idea of how we could see the face of the glass? as for animation, we might introduce a old school batman style CRASH balloon not unlike what we use for explosions. You could even predifine the shards and make them lose cohesion on meeting the shatter conditions.
Maybe we could add a pane of glass It can be used as a floor or wall but it would shatter on heavy impact or collapse under heavy load. So e.g. it would stop a tennis- or volleyball but a Petanque- or bowlingball would go through. Or it might support the weight of only a limited number of penguins.