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:
“Automatic” mirroring: Most objects will be mirrored by a generic routine, that is, the game calculates the mirrored version of the object on its own. For simple objects this means, no extra code needs to be added for them
Specific mirroring: Some objects need to behave differently when mirrored and the automatic method is probably not a good idea. The trick would be to not actually mirror the object itself, but to use two object types, one is the mirrored version of the other one. When the players uses the “mirror” action, the object is simply turned into a new object type (preserving all other properties, of course). Hopefully, not many objects need to do this. The Pingus objects immediately come into mind. Here, a PingusWalkLeft can be simply turned into a PingusWalkRight when mirroring.
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.
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:
PingusWalkLeft
can be simply turned into aPingusWalkRight
when mirroring.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.