Feature request: Allow to create custom grounds
Add creation of custom grounds, with some properties as follows.
Properties: -string ground_type. The new type of the ground. We could also allow to override built-in types of ground for custom ones. -boolean is_solid_ground. If true, it will automatically save ground for the hero in case he falls in bad ground or not. This can be set to false to create bad grounds similar to lava (acid grounds, etc). -walking sprite (optional): to change the stopped/walking animations of the hero temporarily while walking on this ground (like the swimming one). -additional sprite (optional): like the ones of grass and shallow water, to display a sprite over the hero. -collision event (optional): called in case the hero or other entities (enemies or custom entities) walk on it. This could be used to draw temporarily the footsteps on sand or snow grounds (for the hero or enemies). Also, this (combined with the property "is_solid_ground = false") can be used to create new types of bad ground, like acid ground, or custom water/lava/hole grounds. Also, we could choose dynamically if this ground is bad ground or not, depending on some variable (for instance, we could create an item that allows to swim on custom lava grounds when you have it, and otherwise you die in lava with the usual behaviour). The usual behaviours of entities and enemies falling on it can be coded (like when they fall on water/lava/holes), but we could make different behaviours if we want. -integer speed_modifier (optional): to modify the speed of the hero temporarily while we are walking over this custom ground. This can be positive or negative, to increase or decrease speed of the hero.
This would be useful for: -creating new types of ground, like sand ground and snow grounds (that create footsteps and slow down the walking speed), diggable grounds where we can use the shovel, acid grounds (similar to lava but with some differences for behaviour), etc. -overriding built-in grounds just in case they are not what we want or if we need some slight change of their behaviour. -creating several grounds of the same type but with different walking sprites (like different types of grass ground in the same map). -dynamic behaviour and more customization with the collision event. -also useful for moving platforms if we do not want to save ground on them. -etc.