DiegoM's Forum Posts

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

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

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • That's not a good way of getting around things in general. It's all mostly in your head, the possibility of someone actually stealing your stuff and then go on to make it big because of it are quite slim, almost non existent.

    No one wants ideas, most people want results. Thieves don't want to put in the hard work. Ideas while great on paper, need the hard work to realize them, which is what gives them value.

    If you are still worried, get feedback from people you trust, like friends and family. You might also consider people who are NOT into software development as they would be less likely to take interest in the nuts and bolts of what you are working on, and just look at the flashy colours on the screen.

    On the same note, feedback from people who are only consumers of software, tends to be more honest because they are not aware of the struggle of game development. In short, they are more likely to say something that you might not want to hear, just because they have no idea how hard it is :P

  • I found a couple of things with that project of yours.

    1) The track for the instance was disabled, that means it wouldn't do anything at runtime. You can see if a track is disabled by either clicking on it and checking the properties bar or by looking at it's corresponding check box in the timeline bar. You know all the check boxes to the left most of the bar? They are from left to right Visibility, Locked, Enabled, Show UI Controls.

    You can read more about those in the manual entry https://www.construct.net/en/make-games/manuals/construct-3/interface/bars/timeline-bar

    2) You almost got everything right with the Set Instance action, but you missed setting the track id property.

    You can view the track id property by clicking on the track in the timeline bar and checking the properties bar. That value has to match the one you use in the Set Instance action.

    The manual has more information on the action https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/timeline

  • jobel

    Have you checked the values held in the first X and Y keyframes? You can do so by clicking on the keyframes in the timeline bar and then checking the properties bar. If those values are not 0, when the timeline starts playing, the affected instance will have a slight offset.

    I am guessing you must have changed the initial keyframe with the layout view controls to adjust the starting position of the animation. Normally this works properly for all keyframes, the first one has a little gotcha if the timeline is using relative positioning though.

    Because the values held are relative, by default the first X and Y keyframes have a value of 0, which just means "the initial position at the moment of playing". This allows for the animation to be played starting from the position of the instance, rather than a fixed value. If they change to something different to 0, then the animation will start from the instances position plus that offset.

    Of course, this is all technical mumbo jumbo and you really shouldn't be thinking about it. I have been meaning to fix this for a while because although it is not a bug, it is a very awkward behaviour which really isn't very helpful.

    Hope that helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a quick example. https://www.dropbox.com/s/7003e5c4ajmdbjg/KeepTrackOfClicks.c3p?dl=0

    Notice the instance variable ClickCount in the Sprite object type.

    Additionally I used containers as a clean way to output the ClickCount variable of each instance to a different Text instance.

  • Use the On click and the Cursor over object conditions together. Then setup your sprite with an instance variable and add to that variable after each click.

    Each instance should be keeping track of the number of times it was clicked on.

  • I assume the name in this case is an instance variable.

    If so, you can use the Pick last created system action.

    From the manual.

    Pick last created
    Pick the most recently created instance of an object type or family. This is useful with the Create object (by name) system action. For example if you know the created object must belong to a family, then you can use Pick last created to pick the created instance from the family.

    https://www.construct.net/en/make-games/manuals/construct-3/system-reference/system-conditions

  • There are a few things to explain here.

    First, if your follower objects already have offsets assigned to them in the editor you can skip steps 3 and 4. Those where in case you wanted to give them a random offset at runtime.

    Keep in mind that for 4 objects you are going to need 4 sets of coordinates that will make up for a total of 8 values. To clarify:

    Follower 1
    Has offsetX instance variable and offsetY instance variable.
    Follower 2
    Has offsetX instance variable and offsetY instance variable.
    Follower 3
    Has offsetX instance variable and offsetY instance variable.
    Follower 4
    Has offsetX instance variable and offsetY instance variable.

    What I mean by relative to the target is that the offsets are values that you add to each coordinate of the target to obtain a result. This table has a few examples using actual numbers to show what I mean.

    Follower Offset (X;Y) Target Position (X;Y) Target Position + Follower Offset (X;Y)
    0 ; 0 100 ; 100 100 + 0 ; 100 + 0
    20 ; 10 200 ; 200 100 + 20 ; 200 + 10
    -10 ; -10 100 ; -100 100 + (-10) ; -100 + (-10)

    "add the offsets of the instance" means exactly that. At one point in your event sheet you must be using the Find path action of the Path behaviour and you are using the coordinates of your player object. Instead of just using the coordinates of the player object, add the offset values as well. Here is another table to try to explain this better.

    Target Position (X;Y) Target Position with offset (X;Y)
    player.X ; player.Y player.X + follower_object.offsetX ; player.Y + follower_object.offsetY

    What should happen is that, let's say your player object has a position of X = 200 and Y = 300 and a follower has offsetX = 10 and offsetY = 20, the values that you end up sending to the Find path action would be 200 + 10 for the X coordinate and 300 + 20 for the Y coordinate.

    Hope that helps.

  • The way I was thinking about implementing it was like this:

    1. Add a couple of instance variables to your follower object, call them offsetX and offsetY, or something to that effect
    2. Spawn follower
    3. Assing offsetX of the spawned follower as a value relative to the target position Ex. -10
    4. Assing offsetY of the spawned follower as a value relative to the target position Ex. -10
    5. When you do find player X & Y, add the offsets of the instance to those coordinates

    Everything will still be working the same, but instead of having the followers go directly to the player, they will go to a position with a slight offset.

    Make sure that each follower has different offsetX and offsetY values, otherwise all of them will go to the same place.