Time Bandits (1981)
A young boy’s wardrobe contains a time hole. Through this hole an assortment of short people (i.e. dwarfs) come while escaping from their master, the supreme being. They take Kevin with them on their adventures through time from Napoleonic times to the Middle Ages to the early 1900s, to the time of Legends and the Fortress of Ultimate Darkness where they confront Evil.