DiegoM's Forum Posts

  • Something like this https://developers.google.com/web/tools/chrome-devtools/javascript/snippets could also work, and would be much less troublemsome than an extension

  • Of the top of my head, I would write a Chrome extension. I would also need to look up a guide, because I can not remember at all how those work.

    Assuming the extension can have access to indexedDB, which is not too far fetched, it should be possible to programmatically find the data that needs to be deleted.

  • This problem is strictly related to what C3 does to restore the main layout of panes. It is a long standing issue, and we haven't been able to pin down what causes it, mainly because it is very difficult to reproduce, personally I have never seen it.

    By deleting the information from the browser's storage, the problem can be avoided. With no pane state data, C3 will just load with the default pane layout. Of course this is only a stop gap measure and the problem will eventually resurface.

    The easiest way to "fix" this is by deleting all the browser's storage, but that is not always desirable, as you loose other setting which have nothing to do with this. To delete just what is causing the problem do the following.

    In Chrome:

    1. Open Developer tools
    2. Go to the Application tab
    3. Expand the indexedDB entry
    4. Expand the PersistantMap entry
    5. Click on keyvaluepairs
    6. Right click and delete the "UI_STATE" entry

    That should get rid of only the part that is causing problems, instead of all the settings.

    It would be very useful to get a copy of the data that is causing problems, but I just realized that it is quite difficult to copy data right out of developer tools.

    I wrote the steps very quickly, so if you need any help finding any of those things just post back.

  • If you are specially interested in targeting mobile make sure you test what you are doing on a real device on a regular basis.

    It is quite easy to get carried away and develop only with the editor preview, only to realise later down the line that the project doesn't work quite as you would expect on a real device.

  • Jerbens Yes, because it is a rather large feature we decided on working on the runtime first, so we could get something out to the public as soon as possible. After the new feature becomes stabilised in the runtime we will start working on the editor tools.

    There will be specialised UI to be able to setup structures in the editor. I imagine there will be some extra work to integrate timelines, like being able to add all the instances in a graph to a timeline at the same time, instead of one by one.

    Asides from that, I have a feeling it is just going to play very nicely with timelines. Modifying a parent instance through a timeline will automatically affect all of it's children if it has any.

  • Just remember about the Set Instance action of the Timeline plugin.

    If you don't use it, playing a timeline will only affect the instances that were used to setup the timeline in the editor.

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/timeline

  • Picking has no effect on timelines, the only thing that is payed attention too are the tags. So if you have a bunch of timelines playing with the same tag, when you pause using that same tag all of them will be paused.

    One way of uniquely identifying a timeline is to give them a unique tag, possibly based on the UID of the instance involved. Then when you want to pause a specific timeline, recreate the tag after picking the instance you are interested in.

    Can you post your project or a sample of what you are doing so I can understand better what you are trying to do?

  • Consider adding this to our suggestions platform https://construct3.ideas.aha.io.

    I know it looks like we don't pay attention to it, but we do, it's just that the amount of ideas in there is huge and we can't keep up. If something gains enough traction though, it is more likely that something will be done about it in the future.

  • It shouldn't be a problem.

    This kind of designs basically doubles your workload though, as you are effectively working on two different games at the same time.

    If that is not a problem...

    You could have a layout in which you explore the world in a top down fashion, when you find a dungeon in the over-world your game logic could go to a different layout in which the side-scrolling portion takes place.

    When the side scrolling level is complete, by either winning or loosing, the game takes the player back to the over-world layout.

    Different points in the main exploration layout could take you to different side scrolling layouts. It should work just fine.

  • Rory You really want that Prefab goodness don't you? :P

    There will definitely be an editor tool to build hierarchies that can later be used at runtime.

    As for reusing a hierarchy... I think it could work like the Set Instance action of the Timeline plugin, where you can define a base timeline in the editor and then at runtime use it with different instances other that the one used in the editor.

    Something similar could work in this case.

  • TackerTacker We initially imagined the feature as a way to build structures of instances, with no connection to rendering... having said that, a couple of actions to control the z indexing of related instances sounds like a pretty sensible idea.

  • dop2000 newt

    The next beta adds the option to choose what should happen to a nested child if it's parent is destroyed. It will either be destroyed with the parent, or just detached.

    As for containers, as I said, nothing has been even tested, just don't take what is said in this thread as a final answer. The next beta introduces a few new conditions to pick parent's and children so that will give more control.

    We are trying not to get ahead of ourselves, because it is not clear what the best approach is in some cases, we are trying to cover the basics and only after that is working look into the issues that people might have from actually using the feature.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mikal I think what you did to build the hierarchy would be pretty much how it would work... as far as a pure runtime actions solution goes.

    What you did with instances variables will eventually be covered by a tool in the editor which hopefully will be more friendly, but ultimately will do the same as you did, tell each instance who is it's parent. Later that information will be exported to the runtime and you won't even need to set it up in events, the whole thing will be built automatically to mimic what was configured in the editor.

    The editor tools are still a bit far way, so for now this is the best we have.

    I do find the two family trick a little bit weird myself, I wonder if it could be promoted from hack to feature just for this purpose... we'll see how that turns out.

  • There isn't anything implemented yet, but containers do sound like a logical choice.

    Chances are high that when a hierarchy between instances is established, all the instances involved will be automatically added to a container, so picking will work as expected from that point onward.

    None of this has been tried out yet, but it sounds like it should work.

  • Introduction

    As some may be aware of, the latest beta introduced the first pieces of Construct's own implementation of a scene graph.

    Some people are excited, for good reasons. But I read from quite a few that have no idea what the fuss is all about. Allow me to explain...

    First, what is a scene graph?

    Scene graph is a fancy name for a tree structure, in which a root parent object can have children and then those, children of their own. A quick search in Google let's me find an image to convey this, here it is.

    In the context of Construct, this new feature allows you to establish that kind of relationship between plugin instances (at the moment only Sprite instances).

    With that hierarchy created, it is possible for the runtime to calculate translations, rotations and scaling of a child based on that of it's parent.

    • Example 1: a parent is translated in X for 100 pixel, all it's children will follow to ensure they maintain their relative position to the parent.
    • Example 2: a parent rotates then all children will adjust their positions to rotate around the parent's origin as well as adjust their own rotation.
    • Example 3: a parent changes it's scale, all children will adjust their positions as well as scale in response to the parent's changes.

    The most common case would we for any of this things to happen at any given point and Construct will calculate the correct position, rotation and scale for all the instances involved.

    Keep in mind that all child transformations occur around the parent's origin. I think this is better demonstrated by this small example project.

    https://www.dropbox.com/s/etwun316sox4lne/SceneGraphExample.zip?dl=0

    New runtime actions

    The latest beta introduced 3 new actions, Add Child, Remove Child and Remove From Parent. To make things easier on ourselves, at the moment these are only supported on the Sprite plugin, as the feature matures and we iron out bugs and implement user feedback more plugins will be supported.

    • Add Child: This one is used to add a child to another instance. It's pretty straight forward. When an instance is added as a child of another one there is no immediate change, it is only when the parent is modified that the child will respond accordingly.
    • Remove Child: This is pretty straight forward as well, remove the specified child from the picked parent.
    • Remove From Parent: This is similar to Remove Child, but allows you to remove the picked instance from it's parent, without knowing to which instance it belongs.

    I think this is it for now, I will update this thread as more features are added. If you have any questions I'll try to answer them here.

    Tagged: