Man, I love old flash games, so hearing you say that means a lot!
There is an end state. If by "boy in the cap" you mean the guy to the left some screens of the starting area, then after bringing him something to help him mine, an entrance to a cave should open up! If you mean the guy looking thing to the right of the starting area, then bring that to the final house of the village.