Posts by ruddy_salt

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.

    Thanks Danjo for your reply. However, I think we may be discussing two different things. I know about the movement controller, but my issue for circular motion is I need to dynamically update DURING runtime the various values of the X and Y axis, the radius, the starting position, the velocity etc. These values are originally established in the property's section for the object before the game is even loaded into a phone, but I believe they need to be repositioned relative to the pixel dimensions of the individual's phone. An Androd phone may be different than an iphone, so I need to recalculate the location of the circle on which the object travels. If I am mistaken in that, let me know, but it seems logical to me. BTW, this is my first game for a phone so maybe I don't know what I am doing.

    Won't be the first time. Anyway, thanks for responding to me when nobody else has over the last couple of months.

    Ruddy_salt (Pat)

    Circular motion requires the input of X and Y coordinates (among other values). But different phones are of different sizes, so if you want, for example, the center of your circle to be in the center of the frame, how can you provide those coordinates without the use of variables. Circular motion will only accept actual numbers, entered in the property's window for an object. If you enter a variable calculated from something like frame width / 2, it will insert a zero for the X coordinate. How do I solve this problem?

    The property's window requires angular velocity, radius, centreX, centreY, and starting angle. These values must be entered before runtime except for angular velocity which is set by a "speed" command. I know of no way to change the other values at runtime unless you code the formulas. Did Andrew Mather (the author of circular motion) leave behind any documentation, especially, it is hoped, actual available code.

    Thanks!

    Thanks Jennetta5 and Linky for responding to my issues. Sorry I have not responded sooner but I have been on an RV trip and currently I am in the wilds of the Oregon coast (USA) with limited cell service.

    In short, my problem is this: in old programming language, I need to call a subroutine to execute some code. Once the code is executed, I need to return to the main logic. All of the subroutine's code needs to be executed before any additional main logic code.

    In my game, I am colliding objects and then the subroutine needs to be called to reposition other objects. I originally used a fast loop to do this thinking that all the objects would be repositioned before the next frame is drawn. However, on occasion, and randomly, an object will not be repositioned correctly. I have assumed it is because not all the objects get repositioned in the 1/60th of a second between re-drawing of the frame. Consequently, I have tried to use "groups" in hope that it acts like a subroutine in old programming language. In other words, the logic will not return to the main logic until the subroutine (groups) executes.

    Clearly I do not understand groups. Clearly I do not understand how to initiate a group. Below is an example of the code I have used.

    * collision between object1 and object2
    > start loop "reposition" 1 times
    * REPOSITION
    * on loop "reposition"
    > activate group "reposition"
    > reposition object3
    > reposition object4
    > etc
    > deactivate group "reposition"

    I have tried various variations on this logic but none have worked except for when the group is declared "active" when defined. However, it only works on the first iteration (at least 20 times). It does not always work subsequently. Even when I deleted the deactivate group "reposition", and kept the group therefore active, I got random errors. I think the problem here is that to learn something new you have to unlearn something old.

    I hope you have some thoughts. Thanks.

    Thanks Janette5 and Linky for responding. I have been thinking of trying the group feature instead of fast loops because I have additional logic also involved. I think I understand groups except I do not know how the individual objects and events know they are part of a group that is being activated and deactivated. I know how to create a group, activate a group, and deactivate a group not only via the event editor but also as runtime code. But I cannot find where to assign events and objects to the group. Sorry for the imposition, but sometimes I find that mmf2 does not provide the best of documentation. Thanks!

    Suppose there are three pairs of objects: green1 & green2, red1 & red2, and blue1 & blue2. Suppose green1, red1, and blue1 travel in the same orbit. Further suppose that green2, red2, and blue2 also travel in a same, but different, orbit. At times these two orbits will overlap. Objects will also sometimes collide. When the same colors collide i.e. green1 & green2, they destroy each other. Immediately a fast loop is executed to reposition the other objects to their original position and speed.

    My understanding of a fast loop is that displaying a new frame will not occur until the fast loop has been completed. Consequently, the remaining objects (in my example) should always reestablish their original positions and speed relative to each other. However, sometimes one object closes the gap on the other. It always seems to be the distance, not the speed. I don't know why. Any ideas would be appreciated.

    Suppose there is a circle, eventually to be a sun with planets revolving around it, that has a diameter of 220 pixels.
    I want the right edge of the sun to be exactly coterminous with 320 pixels (the midpoint) on the X axis. So, I make sure that the
    hot spot is perfectly centered on the sun (at 110 pixels on the X axis, and then place the object on the X axis at 320 - 110 pixels.
    In other words, the X position of the circle should be 110 pixels to the left of 320 pixel midpoint, or at the 210 X position.
    For a point of reference, I placed a vertical line 10 pixels high but only 1 pixel wide at the 320 X position.

    Although, when I run a test of the program, the right edge of the sun shows it to be 320, exactly as expected, nonetheless it came up short by about 10 pixels of the midpoint of the vertical line's X position of 320 pixels (the vertical line was verified by the program as X position 320).

    I have approached this dilemma using various methods but it always ends up unbalanced. It is like being in the Twilight zone.

    Any ideas as to why my brain is so scrambled on something seemingly so simple? Thanks.

    Hello! To gather some metrics, I have accumulated data into an array which I have subsequently saved to a file using mf2's save to file function. I would like to view the data and then analyze it, perhaps using a spreadsheet. However, when I try to open the file, I get nothing although I have proved I am saving data (by loading the data back into the game). I have tried extensions like .ini and .arr, but neither show anything. I am looking for a simple file dump. Any ideas?

    My collision detection for a circle seems off, so I set up an experiment. I created a small line just 1 pixel wide and 6 pixels high and placed it in a frame at position 320 x 240, exactly at the center of the frame. I then created a circle with a diameter of 48 pixels using circular movement and placed it at X=420 and Y=240 with the radius of 100 pixels. When the frame was executed, the circle easily overlapped the line and destroyed the circle in a collision. So I assumed the problem had to do with the centering of the circle so I offset it by half. In other words, I shifted the starting position of the circle to half the diameter (24 pixels) to X=444. The circle was still destroyed when I ran the frame. To shorten this description, I then made X=463. The circle was not destroyed, but it was when I backed it off 1 pixel to X=462. So, to summarize, if I shifted the X value 42 pixels to the right of the radius of 100 pixels it works but not 43 pixels. Why 42? I might understand 24 pixels or perhaps 48, but why 42? Any ideas?

    HELP!! Imagine a state fair arcade game in which 5 plates are rotating in a circle and a BB gun is shooting at them. A teddy bear awaits a successful killer of all 5 plates. The arcade barker, however, can speed up or slow down the plates to make it more difficult to hit the plates. In addition, when one plate has been destroyed, the remaining plates are repositioned around the circle. The problem is that, on occasion, and seemingly randomly, when the plates are repositioned, one plate will jump ahead twice what is should. In other words, instead of moving forward the programmed 36 degrees in the circle, it moves ahead 72 degrees. This does not always happen, but when it does it evidently happens after the second plate has been destroyed by the BB gun (I am not absolutely sure of that, but most likely). The expression used to adjust the position of each of the remaining plates is:

    CIR_CurrentAngle( "Clickteam Movement Controller", Fixed( "active object" ) ) + 36

    I have tried everything I can think of, including fast loops and no loops at all. I have tried both positive and negative numbers as the angle adjustment for the plates, and I have even tried to use multiple loops to segment the position adjustments. Using the event list editor, I made sure that the adjustments ran first before any other events occurred. At one time I used the global event editor, but then moved these events back to the frame editor because it didn't work either. I both increased and decreased the frame rate, but that had no affect. At one time I thought the speed (angular velocity) of the circle movement controller might be causing the problem, but, of course, angular velocity and position are two different variables.

    So I am stuck. If anyone has any ideas, I would be most grateful. Thanks. Pat Vaughan

    p.s. At one time I used trig to rotate the plates in the circle, trying to gain greater control, but it is a bit choppy, especially compared to the clickteam's circular movement extension.

    The expression "set current angle to CIR_CurrentAngle( "Clickteam Movement Controller", Fixed( "active object" ) ) - 36" does not always work as expected. I have several objects that use this expression, and most of the time the object advances around the circle the expected 36 degrees. But on occasion, an individual object will advance around the circle double the amount expected. In other words, it will advance 72 degrees instead of the expected 36 degrees. I have tried everything I can think of to debug this problem, but without the ability to see the C++ code, I am unable to figure out what is going on. Any Ideas? Thanks.

    I have recently posted to get an answer on how to retrieve the current angle for a moving object in a circle.
    there seems to be no answer using circular movement so I tried to use standard trig to manually compute the movement.
    I was able to retrieve and update the current angle using that method but ran into a new problem - speed.
    When using the circular movement features provided by MMF, the speed variable is part of the parameters input.
    But the standard trig function using sin and cos do not provide for speed. It is possible to adjust the speed using this
    method by adjusting the position of the object, but the movement is jerky and irritating. So my question is: does anybody
    now the formula used by MMF and Andrew Mather for circular movement? I would appreciate any help you can provide. Thanks.

    p.s. back in 2014, there was a thread discussing the same problem I have had trying to acquire the current angle of an
    object moving in a circle, and then it was terminated because the person said, "No worries, I fixed it. Was able to use
    the Clickteam Movement Controller to retrieve one of the balls' current angle and apply it to the other ball".
    I don't know how he did it. If anybody knows please let me know, but I do not believe the movement controller any
    longer provides this functionality.