Running a game within another game

0 favourites
  • 2 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Here's a pretty odd problem that I've been considering for a while...

    I'd like to make a sort of mini-game collection that other folks can contribute games to. There would be a "framework" project to handle menus, but I'm having a hard time thinking of a way to add the games that's reasonably easy to maintain. My two theoretical options are 1) merge the mini-game project file with the framework and 2) run the exported mini-game in an iframe within the framework project (and communicate states between them with AJAX calls).

    I spent a fair amount of time attempting option 1 (wrote a Python script to shuffle two .c3p folders together) but that got messy quickly and ultimately felt like it wouldn't be a sustainable approach.

    So, for option 2, I'm curious is anyone has any experience doing anything like this and if it sounds plausible. It would be nice to handle this project entirely with Construct 3, but I'm also open to making the framework portion in some other engine/language if this doesn't work out.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Merging project files would be a nightmare, since every game will be using its own object types, its own event sheets, etc. So no, anything is better than this solution, even with your python program I don't see how this would be practical.

    Since construct apps are just a canvas on a webpage, the iframe solution is great. You can create a javascript app that would run/stop your games.

    If you need the games to communicate with each other or with the main app, a solution is to have a server with which the games communicate using AJAX. I worked on a project where I did just that, except I didn't use AJAX (async- javascript and xml) but rather AJAJ (async javascript and json).

    Inside Construct you would need a custom addon that exposes the API of the server in the form of actions, expressions and conditions. You can require the people who are making the games to implement your addon in order for their games to access your platform's features.

    Basically, you're making a game portal, just like Scirra Arcade. However, with some careful planning and javascript-jutsu, you can have everything in a local server and have smooth transitions between the games to make it look like a giant uber game to rule them all and in the darkness bind them!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)