Copying data from other projects. We need to make this simpler.

1 favourites
  • 7 posts
  • Everything in C3 is awesome.

    One thing that I think could be improved is copying and pasting from other projects. I ran into this problem while trying to create a game with a small group.

    Here is what I would like to see.

    The ability to export event sheets and layouts.

    If you could do this then you could import them to another project. Let's say I want to export 100 levels to another project, this would be a good way to do it.

    I think a major roadblock to copying and pasting is when one of your projects doesn't have the right objects with the right behaviors. I would love to be able to paste an event sheet, and if I am missing an object, let's say it's MobileIAP, then a dialogue box can come up saying "Do you wish to add MobileIAP to copy this data to the project?".

    This way it would be really easy to copy and paste over data.

  • I think there are some long term plans of adding the ability to kind of create your own custom plugins with events, in Ashleys latest blog post. A bit far off in the future though, but I completely agree with this.

    I mostly focus on touch based games, and I have a set of events that handles my touch controller which I'm often reusing in many projects with some tweaks.

    A pretty neat feature though is that if you copy a sprite object from a project you get this code:

    {"is-c3-clipboard-data":true,"type":"world-instances","items":[{"type":"Sprite","properties":{"initially-visible":true,"initial-animation":"Animation 1","initial-frame":0,"enable-collisions":true,"live-preview":false},"instanceVariables":{},"behaviors":{},"world":{"x":339,"y":218,"width":59,"height":59,"originX":0.5,"originY":0.5,"color":[1,1,1,1],"angle":0,"zElevation":0}}],"object-types":[{"name":"Sprite","plugin-id":"Sprite","isGlobal":false,"instanceVariables":[],"behaviorTypes":[],"effectTypes":[],"animations":{"items":[{"frames":[{"width":59,"height":59,"originX":0.5,"originY":0.5,"originalSource":"","exportFormat":"png","exportQuality":0.8,"imageDataIndex":0,"duration":1}],"name":"Animation 1","isLooping":false,"isPingPong":false,"repeatCount":1,"repeatTo":0,"speed":5}],"subfolders":[]}}],"imageData":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAA7CAYAAADFJfKzAAABWUlEQVRoQ+2YQQ7CMAwE25fwBA6VOPB/ceMRvAQUiUocEnU3dtI4bM924vWsk8B63W7v5U++VWInJS2yk4JdRFZkJ+iAbDwBxKyEJmSfr8eyXe7D9ex0sT0bA4tlimoVa7WKu9gkNH2ojZnGSCzRgSZkUaqpzvBkJTZjN3a+Ccfa7lnEbmzxbHx4sYzlJZbogOtpjFh9r623hdO+EptzBkINifkl23NeabLIeKACmMYg+yIxbjZmZzC8WJRq72fiTt2VrMQWhkk2Rk4ZQ4xszN6z7ElsgGNKdSErsSYGbZLdyDLXThspx6tKbM0BJbIDPSjoXz0leuxriI0/nkYswjyzNdeOxGJwTFEw2dIuNZRqckwqv8mniPUovGYNiWW6dpYlmRrpfyo8Z7amUI8c2dijiyOuYSY7oqhSTRIbiRZTq8gy3YoUK7KRaDG1iizTrUixIhuJFlPrB+AqbBi/tecfAAAAAElFTkSuQmCC"]}

    If you paste this in a brand new project you will get a sprite :D One idea would be some kind of ability to add an event sheet as part of a container to an object. Or some way to along with the sprite, also copy all events, and other dependacies included with the sprite.


    If you then take this and paste it to event sheet you will get some events for that object.

    So the idea is that, when you copy over an object (maybe with a modifier key like "alt") It also includes all the events containing that object, and all the global variables and other things the events are depending on.

    When you then paste in your other project (with modifier key) it would paste everything related to that object...

    In theory the solution could work, but I don't know how hard it would be to paste both events and objects at once... :)

    Even better would be if you could select an object, and choose in contect menu, Export "Sprite" with all dependencies, and it would bundle events and image data to a file for you which you could store somewhere and reuse in other projects.

  • I believe the reason to this is that when you copy an object or a few events, it really just copies the plugin name, plugin/object type/class and the event data into the clipboard as a JSON string.

    It doesn't store references. And I don't think copying references into the clipboard is practical. Mind that these include the instances, layout the plugin types/object classes belongs to, events on other event sheets and plugin properties. That's a lot of data.

    I highly think it is fine the way it is.

    The Construct Team could make a data export/import of layouts and event sheets. But I doubt that would be simple anymore.

    So, yeah, again, I highly think it is fine the way it is.

  • Something like an event sheet include as an edit time import makes the most sense.

    Layout information would be secondary, especially since all that(instantiating?) information could be in the event sheet itself, just so long a the plugs are available to the editor.

    The trick would be making sure plugs are set up to allow that. Any plug that only allowed layout editing wouldn't work.

  • You can already copy things around by their contents, with select all (Ctrl+A), copy, and paste somewhere else. Admittedly copying and pasting entire layouts or event sheets is something of an oversight (feel free to post to suggestions platform for that). But I must point out that moving events to other projects is extremely complicated. This comes up with pasting events. What if you paste events that refer to a number instance variable, but in the project you're pasting in, it's a string variable, making some of the expressions invalid? What if Sprite.Foo is a behavior in the copied events, but an instance variable in the project? The sheer number of difficult edge cases is itself a significant barrier - if you think Construct can "simply ask the user what to do" then that is a huge amount of work with potentially Construct asking you all sorts of complicated, difficult questions about how to tie together the pasted events and the project.

  • Ashley

    The current system is good, but I just think it could be easier. Here is a simple example

    Let's say you have an IAP page that you want to use in multiple games. It has several text boxes and code to go with it. It would be awesome to just export an event sheet and then import it into a new project. All of the text boxes would get copied. Then, you could export a layout and import it. Very easy and simple.

    Just a thought.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Currently that should work if you first copy and paste the objects, then copy and paste their events. I guess a "copy events and also referenced objects" could help - but again you run in to similar problems with tieing together references - particularly with families, existing object types that have the same name but are from a different plugin, global variable names using up the name of an object type, etc. etc...

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