tarek2's Recent Forum Activity

  • actually my problem is not dino. background and tree obstacles are not moving smoothly and they are hanging out. thank you

    You know what you are right, yesterday I never manage to test it on any phone I was just pointing things that can cause performance Drops, I was pretty sure that will be the restart button the problem,

    but today I tested on Iphone6 over Wifi and the Performance is terrible but is nothing to do with the (Fps or Cpu) those looks ok,

    The Moving objects like trees, obstacles, etc... are the ones causing the problem (They Move too jerky) they all have Bullet behaviour so it may be something to do with that?? I have no idea but it shouldn't do that, even after I removed all the events and extra things I just left the moving objects Nothing more to check just destroy outside Layout it didn't help is still doing the same

  • lokmanocek

    If you mean that the Dino is not moving smoothly the reason for that is, that you had the animation (Image Points Off) in some frames

    Now For Optimization Issues, I noticed that you don't use:

    -Triggers

    Example

    instead of checking every thick if the Player is jumping you could just use the trigger (On Jump) to set to jump animation

    To reset the Level you have again is touching Reset Button when you could replace it with "On Touched Restart"

    -Families

    You have 7 events just to check collisions against Obstacles were you can change it to one event with families

    The is outside of layout "same as above"

    Another Think you know even if you set an object invisible is still active? the Button "Restart" is on the Middle of the screen invisible but is still active whenever someone touches it even if is still invisible it will fire up the event Restart as you are continuously checking every thick if the player is touching this button.

    you should use something like Booleans to avoid this,

    example "IsActive" and turn it on only when Player loses

    I modified it your capx have a look

    https://www.dropbox.com/s/shg5sr22hiwl5hu/AutoRunner%20Dino.capx?dl=0

    Last think use sprite fonts instead of Txt that uses a lot of resource on the Phones

  • mongoose665

    You can use Timers as Kriand said or you can do maybe something like this

    https://www.dropbox.com/s/p9u40s8hpoxkubi/LoopAnimation.capx?dl=0

    You need to tweak the (speed Frame or repeat count) to your needs to rich your desire Timing between animation swap

  • > ...Construct 3 Export to Xcode, running on iOS 11.2

    >

    Can you give us noobies a how to on what to do in xCode to get it ready for the app store once it is opened in xCode?

    Hi Boxels Have you tried this tutorial

    https://www.construct.net/gb/tutorials/ios-application-development-and-publishing-with-xcode-25

  • SKuirely

    I Made while ago this Capx for someone here on the forum that it may help you

    Note: in this capx I use the Platform Behavior, not Bullet behavior

    https://www.dropbox.com/s/qykbfd9utqqlwgk/GravityPlanets2.capx?dl=0

  • Thank you everyone for your help and responses!

    I never used the loopindex before, it seems like something I need in this case

    but what I still don't understand, is how I can make a reference to a certain position of the first object in the lay out?

    So the position of the first instance of the object is fixed at X,Y

    The following instance is Y+75, the third is at Y + 75 + 75 and so on..

    thanks anyway!

    To Reference, the First object you can use many ways to achieve this its only depends on how your Game Design is, Example if the first object is gonna change locations often then one way to reference him is ad an instance "Variable" or a "Boolean" to make the Picking easier

    Here Two examples

    1- https://www.dropbox.com/s/mnsbzjm5nurukpa/Multi%20Create%20In%20a%20Loop2.capx?dl=0

    2- https://www.dropbox.com/s/rhed9cfzsz7y5ps/Multi%20Create%20In%20a%20Loop3.capx?dl=0

    On this two examples, we wanna Pick the Middle Green Sprite as Reference and Create the object underneath,

    so I add a "Boolean" = "Selected" to the sprite

    Note: The Middle Sprite Green is the on only one that has "Selected" To True so C2 can Pick the right one

    Another thing you have a Global Variable "SpawnObjects" just to make it easier to modify how many objects you need to spawn, as sometimes you need to spawn different amounts of objects so this will help you to modify the amount in the Runtime

  • Hello there

    I'm still a beginner so maybe this question is easy for a lot of people

    I would like to create a bunch instances of the same object using loop. The position of the first instance is a certain point in the lay-out between each new instance there is a different distance of 75 on the Y-axe.

    I've tried to use loop to make the event efficient but I could'nt manage to find it working...

    Thanks in advance

    This is one way of doing it

    https://www.dropbox.com/s/umz9604dhu0w77z/Multi%20Create%20In%20a%20Loop.capx?dl=0

    I If you need exactly 75 distance between objects counting from the edge of the objects you can just ad half of the with from the two shapes wich is in this case 25 + 25

    so you will have to replace the 75 * (loopindex + 1) For 125 * (loopindex + 1)

  • Closing as not a bug. From the manual entry:

    [quote:hgbt12gt]On timer

    Triggers either regularly, or once off, after a timer that was started with the same tag has reached its duration. NOTE: this trigger can fire with multiple instances picked, if their timers all reach their time in the same tick. This can sometimes work unexpectedly if the actions expect there to be just one instance picked. The workaround is to add a For each condition after this trigger to ensure the actions run once per instance.

    Hahaaah you know how many times I read the manual part of the "Timers" and I missed that part.

    Every day you learn something new, I thought the Timers were exclusive to the UID of the object maybe that's why it didn't stick on my head that part.

    Anyways thank you for looking into this, and sorry to waste your Time

  • Problem Description

    The Timers are calling a Function passing the UID of the object, in this case, the Function has one Action to change the animation of the object, but after the Timer triggers one of the objects fails to change his Animations.

    Note: in this capx, the action is to change the animation but it can happen with any type of action not just related to change Animations, so basically I'm saying the function fails to execute any type of actions

    Attach a Capx

    https://www.dropbox.com/s/vsr9i466imls7i2/TimerBug1.capx?dl=0

    Description of Capx

    On Start of the Layout, each object Activates his Timer, on Timer finishes it calls a Function to change their Animations

    Steps to Reproduce Bug

    • Step 1 >>> On Start of the Layout, each object Activates his Timer
    • Step 2 >>> On Timer finishes it calls a Function to change their Animations
    • Step 3 >>> Just Keep watching until all the Timers Runout & keep an eye if the Object changes his Animation

    Observed Result

    One of the tree objects fails to change his Animation

    Expected Result

    Each object by the end of his Timers run out and triggers the call Function to change their animations then the function should run his Actions and change the Animation, but one of them fails

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer:

    Operating System and Service Pack

    Windows 10 x64

    Construct 2 Version ID

    r250

  • Try Construct 3

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

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

    After the Animation finish, I use the Trigger "On Animation Finish" to change the Animation & size to 64x64 but is not working as intended

    Attach a Capx

    https://www.dropbox.com/s/m3698pqez19euyn/Animation%20Bug1.capx?dl=0

    Description of Capx

    Left click Mouse to start the animation & on animation finish, you can right-click on any tile it will update the text object to display the UID & Size of that tile

    The size of the tiles after animation finished it should change to 64x64 but it doesn't work

    Steps to Reproduce Bug

    • Step 1 >>>Left click Mouse to start the animation
    • Step 2 >>>Wait till the Animation Finishes
    • Step 3 >>>Right-click on any tile it will update the text object to display the UID & Size of that tile

    Observed Result

    The Animation doesn't Reset the Size after the animation Finishes

    Expected Result

    ____ What do you expect to happen? ____

    After the Animation Finishes the Trigger "On Animation Finish" Should Run his actions and change the animation Size to 64x64

    Affected Browsers

    • Chrome: Yes
    • FireFox: Yes
    • Internet Explorer:

    Operating System and Service Pack

    Windows 10 x64

    Construct 2 Version ID

    r250

  • faulknermano

    Awesome Explanation Thank you, That makes a lot of sense now,

    you see I have to admit that the two years using construct I never understood why the Animation sizes changes after you swap the animation, for a long time kept me really confuse I thought is the way I did the Events and I just keep changing Events Until I finally get them to work with a lot of work arounds, I tried many times to research this topic of the Animation problem but no one seems to talk about it as I didnt find any threads related to this, so I thought it must be the way I do the events and I keep going hhhh

    Now with your explanation, I finally see that they are more things involved that I didn't know like the scale. This will definitely help me a lot in the future if I ever run again in situations like this

    [quote:1i4n0fwh]

    N.B. I'd consider this a bug in Set Size, not Animation Trigger. Who wants to report it?

    I totally agree, something that simple as to Set an Animation size it shouldn't involve any extra calculation for scale etc.... If the action it says set Size then whatever size you enter there C2 it should apply all the scale and anything that needs automatically

    [quote:1i4n0fwh]My recommendation is to compute for scale based on your expected Sprite resolution for a particular animation, then use Set Scale instead of the Set Size.

    That sounds like a great idea for now until this gets fixed if ever gets fixed

    Thanks a lot for confirming them, I can now open a Bug Report, I wanted to make sure before that it wasn't me that I was doing something crazy with settings or something like that.

  • I guess is the Triggers Month as I still have weird things happening with the triggers

    Here is another one with (Timers & Functions) I remember many times in the past I did the same thing and it worked so this one at least I know it worked before

    https://www.dropbox.com/s/vsr9i466imls7i2/TimerBug1.capx?dl=0

    At the start of the layout, it activates the Timers for the three sprites to change their animation

    The first animation at the left has the timer for 5 seconds

    The other two have the Timer for 15 seconds

    The Last Sprite at the Right it never triggers after the Timer for 15 seconds runs out, so the same question is this a bug??

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies