As you gaze at the cathedral's vaulted ceiling (the pride of several surrounding villages), you notice something curious about one of the church's stained glass windows. While somewhat small and dim compared to those of other, grander temples, this one must have something the others don't: a clever enchantment! Before your eyes do the figures in the glass begin the move: knights charge, horses gallop, wizards chant and dragons attack! You find you can control the defense with the point of your finger, and you innately know you have but one task -- to stop the invaders at all cost!

Control your knight on the left with the mouse cursor and try to prevent the invading army from getting to the left edge of the screen. As the game progresses, enemy troops will move faster. Certain enemy forces have some tricks to keep in mind:

• Knights halt for a second after they enter the screen, then charge.

• Horses run wildly but have no rider, making them harmless., but distracting.

• Wizards summon two illusions by their side to trick you, but the true foe does not move vertically and the phantoms are dispelled upon crossing the middle of the window.

• Dragons spit balls of fire either straight ahead or angled. Do not touch! After a few seconds, the beast will charge and its weak flesh will be vulnerable.

Because of the experimental visuals, this game may run poorly. Press any key (excluding the numbers 1-9) to switch to a low-graphics mode for better performance. There is an indicator in the top-left corner that will flash when framerate dips below 25 FPS.

Pressing any of the number keys will advance the game forward, so that you can see what gameplay would look like with horses flying like airplanes and dragons breathing like flamethrowers.

Consider this game more of a tech demo than a final product. It was born of a strange idea I had: what if the pixels on-screen weren't regular rectangles, but instead were nonuniform polygons? This evolved into the stained glass aesthetic. The effect is done by drawing all normal game graphics to an off-screen canvas and then re-drawing them to the main canvas using an array to redirect each pixel to a new location. The redirect and the leading texture are generated using Voronoi polygons and Worley noise (super cool - I recommend looking those things up). There are some problems with this look, such as the super low resolution (32px by 32px), but I think the final product turned out pretty cool.

When I created this game, I didn't know anything about fragment shaders, but were I to make this again, that's definitely what I would use for the Voronoi effect. Funnily enough, though, I think the biggest hinder to performance is actually coming from the partially-transparent graphics that are layered on top of one another. Either way, could be much improved. If you think this is an interesting idea, I encourage you to try to make your own version of Glass Fantasy!

Music and sound effects credited to the following:

Background music (Greensleeves) - https://commons.wikimedia.org/wiki/File:Greensleeves.ogg

Background noise - https://freesound.org/people/shaunoboyle/sounds/472647/

Glass tapping noise - https://freesound.org/people/InspectorJ/sounds/318929/

Cloth noise - https://freesound.org/people/leonelmail/sounds/330638/

Leave a comment

Log in with itch.io to leave a comment.