the-butterfly-effect / tbe

The Butterfly Effect, a realistic physics simulation game
http://the-butterfly-effect.org
GNU General Public License v2.0
95 stars 13 forks source link

Allow to mirror objects #292

Open Wuzzy2 opened 8 years ago

Wuzzy2 commented 8 years ago

Some objects have a specific shape which would be useful “the other way” round but it cannot be achieved in a simple way: Pingus (currently only with editor), butterflies, toy chests, goals, etc.

I propose to add a new “mirroring” feature to the game which should become a core element, it would make a few things simpler.

The mirroring could be done in two parts:

Maybe a few objects need to have mirroring disabled completely.

Also, mirroring should become an in-game option which the player can use on specific objects. A new property called “Mirrorable” should be introduced which can be true or false. If true, the object can be mirrored by the player. The mirror option should be available by default for a few specific objects: Pingus*, Skyhook, ToyChest, Goal, assuming this doesn't make existing levels too easy.

The ramps, wedges and inclined planes could later on probably be simplified by removing the Left/Right variants and unifying them into one object each since the other ones would be redundant anyway.

I think the mirroring should only be on the horizontal axis (in the object's coordinate system) as I don't see much use for using the other axis and it might overcomplicate things. We just have to make sure that all important objects have a proper default rotation so mirroring them is meaningful. Luckily, most interesting objects like the toy chest already have a good orientation.