Meta Glitch Apps - Is it possible to create a Glitch that contains other Glitches?

Hello! So I’ve created a magical library and now I want to show people how to create even more magic. I have an idea to create a Super Mario Party clone, but with games made out of other Glitches. To do this, I’m imagining a “Main” Glitch app that loads iFrames of other Glitch apps…a meta Glitch!

Would this kind of thing be possible? Are there any obvious barriers I should consider? For simplicity I’d like to do this statically with no servers at all (even with the meta Glitch) by using iFrame messaging.

The Plan

The meta Glitch app would contain a board game. Players (on same machine for now) would take turns rolling dice and moving their pieces around a Snakes and Ladders type board. At the end of each round of rolling dice, players all compete for stars in a random mini game. These minigames would actually be iFrames to other Glitch apps. The game ends when one player obtains a certain number of stars.

These minigame Glitch apps would be remixed from Glitch Starter Kits which I would make that contain some boilerplate code + Handsfree.js set up with one other creative library like p5.js, three.js, magenta.js, aframe, etc. The boilerplate would have some basic gamification methods like gameEnd(), which would close the iFrame and tell the meta app which player won.

Why

I’m trying to explore ways to gamify the entire process of using my library, from learning how to use it, to making something with it, and then sharing it for others to play. Because people would be remixing a starter kit, they can focus on making a game with the tech stack that interests them. And as people play the meta game and come across interesting minigames, they can remix the minigame themselves!

The idea is that all of this will help grow a community around the library. I could write tutorials on the starter kits and showcase people’s minigames, and people could play and learn from each others minigames through the meta game. And even if people don’t use it, I would use it myself to continue experimenting with my library…so as long as it works it’s win-win!

What do you think?

1 Like

that sounds fun. use this Window.postMessage() - Web APIs | MDN to send messages between frames and the outer game

3 Likes

Oh thanks, that is a great link and has some good security info to consider too!