At least I was able to make the engine work under a pseudo objective programming design. Here is the demo, every screen is loaded as described in the post of the forum, you will move the screen position
with:
UP: left key up
DOWN: left key down
RIGHT: left key right
LEFT: left key left
DEEP: right key up
CLOSE: right key down
As you will notice if you run the demo in rdragon, each char and bgmap is reused if the entity isn’t animated (cactus, castle, ball), but the mario character’s chars and bgmap are defined for each entity because it will have different animation frames.
Other things are the entity’s dynamic allocation, and state management.