DiegoM's Recent Forum Activity

  • 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.

  • 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:

  • This is a difficult problem.

    The gist of it is that the client should never be trusted, the server is the only source of authority. As such the server should always perform validations on a score before it deems it valid.

    That is the difficult bit, what is a valid score? That is completely tied to each game and depending on it's logic it might be impossible to determine if a score is fake or not. Even if you can determine if a score is fake, how can you handle a client sending the maximum valid score every time?

    Short story, validating a single value sent over a single request is difficult if not impossible.

    Possible solution:

    I guess you could try using web sockets so the client communicates constantly with the server about what it is doing, sending messages each time the score increases. When the game ends the client could send a message saying the game ended and the server can tally the final score.

    If a client get's funky and starts sending too many messages to increase it's score, you can determine it is trying to cheat. Sending messages with score amounts you know can not happen in the game? Cheater. Like that there are many things the server could do to spot unusual behavior on a client.

    The problem with that approach is that to send a valid highscore you need a stable internet connection, if you don't the server can't make real time validations, so it won't accept any scores. This might be a compromise you are willing to make, you could have two modes, "For fun" which does not perform real time validations and can not save highscores, and "For score", which does all the validations but needs the stable connection.

    Maybe there are easier solutions, but can't think of them right now. Good luck!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, at the moment only the sprite plugin supports this new functionality. It's a big feature so we are taking small steps to be able to catch problems more easily.

  • Coincidentally this feature has been added to Timelines, and will be landing at the start of the next beta cycle.

    It was implemented by means of the "initial frame" property of the Sprite plugin. This means a timeline will interpolate the value of that property and assign a new frame as the timeline progresses. There will be a few things to look at for when using it.

    Because the timeline will be changing the frame of the animation, the plugin itself will not be playing the animation, so all triggers and conditions that the plugin would normally execute, will not happen. Instead you will need to rely on similar triggers and conditions on the timeline itself.

    The only exception to this, is the On frame changed trigger that the sprite plugin will execute while being animated by a timeline.

    Furthermore, attempting to play a Sprite animation normally while it's current frame is modified by a timeline will result in strange behaviour. So it will be a case of picking one or the other, but not both.

    I doubt this will be added to Tweens, it is a rather specific behaviour and while it is possible to implement it, it would be a pretty ugly monkey patch.

DiegoM's avatar

DiegoM

Member since 24 Apr, 2015

Twitter
DiegoM has 1,401,082 followers

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies

Blogs