Load another project from within the game?

0 favourites
  • 6 posts
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • Hi there.

    I'm making a set of 4 games that are accessed through a common menu.

    Is there any way I can make each game a different project and load each project from the same main menu? Would I have to put links to the urls of each game in the menu buttons? Or is there a way to do it more integrated in the projects themselves?

    I'd like to avoid putting all 4 games in the same project because of the mess. Unless anybody has a good idea to organize a lot of layouts and event sheets within a project.


  • I can't help you in this issue, but if you want make a game with many layouts and each one calling a event sheet where you do a different type of game, then, yes, you can call all the games (layouts) by doing a main menu. It helped?

  • mmarcati

    I have an untested way to go about your problem. I was hoping to produce a tutorial about it in the near future if successful. It requires the following:

    -That your game be played through an iframe

    -All your games are hosted at the same domain

    -All games are the same dimension

    You first load up the url, which loades up an iframe with a 'Menu' project. Then from inside the project, the player selects the game they want to play. This creates an event to change the url (I.e. change webpage) in the same window as the C2 game (Iframes are like a layer above another webpage). You remain on the same webpage (due to iframe), but the webpage within the iframe changes. If this works, the result is, your first project acts like a menu.

    Hope that helps,


  • TELLES0808, thanks for the response, but that is what I'm trying to avoid . :) I don't wanto to work with a lot of layouts within the same project for organization reasons.

    That's what I need! :) But it's more complicated than I thought then. That means I can't just use the button on my Main Menu to link to another URL and that's that? What would happen if I did that without an iframe?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mmarcati

    The purpose for the Iframe is really to position the game on your webpage to where you want it. As well as for asthetics.

    If you are just running the game and nothing else, having a menu button which changes the webpage for that window/tab, will just change the webpage. Maybe that's all you want. Its worth exporting a small project and playing around with it live on a website.

    I think there may still be the limitation of keeping all the games on one domain. If I recall my experience when I tried to call urls external to my domain, I had to use a work around where I would call another url on my domain which then forwarded the client onto an external site. Otherwise it didn't work. But that was several C2 versions ago.

    If I get time I'll experiment. Otherwise the best thing to do is just play around with a few simple C2 projects to see if you can change url the way you'd like.

  • Thanks, Andemig! That was very helpful! I'll experiment with linking then, and see if it does the trick.

    Thanks again!

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