gameba's Forum Posts

  • well... its using chimpmunk physics behavior... not sure how different that is from the original C2 one... maybe call R0J0hound on this one?

    but in the default physics you wold increase decrease the joints stiffness... by increasing or decreasing the update ratio of the joints... if you have such thing in your capx...sadly i cant open it ... dont have the behavior installed im to lazy to search for it at the moment. but the idea is basically the same and i think you should have a parameter for Joint Update Ratio:0.3 or something by default

    Sorry, I forgot to remove it before upload. My capx is not use chimpmunk, I use default physic behavior in C2. I update link, thank you

  • Any suggestions?

  • Hi guys,

    I use "Physic: create limited revolute joint" to create revolute joint between "Dot" objects to make a shape by the "Dot". Please,see the movie:

    Subscribe to Construct videos now

    I think the connection is supposed to be stiff, but it is not - it behaves like spring or rubber.

    How do I increase stiffness of revolute joint? Any Ideas?

    My capx https://drive.google.com/uc?export=down ... VZXbWNTTVU

    p/s: I must keep density of red-Dot is 1 and blue-box is 50, because this is necessary for my game

    update:

    If you Set stepping iterations (Velocity iteration: 10000, Position iteration: 5000). It will stiff and stabilized. This is exactly what I need, but poor performance, so I need a better way.

    video compare between "Set stepping iterations" and no "Set stepping iterations"

    https://youtu.be/fZetqciO_fk

    Here capx I had "set stepping iterations" https://drive.google.com/uc?export=down ... HBBTzFIeUE

    Please, excuse my poor English .

  • bump

  • Hi guys,

    I use "physic: Create limited revolute joint" in my app, it's work like this video https://youtu.be/WonE-b3XIaQ

    It's look like a "rubber-bar". I want to the joint harder, hard as steel.

    I try to set "Elasticity" to 0, but not work.

    So, How do I make the joint "harder"?

    My cap here https://drive.google.com/uc?export=down ... VZXbWNTTVU

  • Hi, guys

    I try to convert a C++ code to C2 code, It is a Recursive Function.

    code here

    void mergeSort(int array[], int first, int last) {
        if(first < last) {
            int middle = int((first + last) / 2);
            mergeSort(array, first, middle);
            mergeSort(array, middle + 1, last);
            merge(array, first, middle, last);
        }
    }[/code:43xwtj4z]
    
    I try to
    [img="https://drive.google.com/uc?export=download&id=0B8g2b8f9ktNBVVpubG01OVJ4Yk0"]
    
    but I receive a bug "Maximum call stack size exceeded".
    
    Its seem I can't call 2 times mergeSort Function. Someone can help me!
    
    Please Excuse my poor English
  • Do you really need to smoothly scroll to get into next level for your game? Do so if you feel that will give good immersion to the gameplay. Another suggestion, use transition even each level were in different layouts so the player have a clue whether he/she were on different level.

    Thank you for your reply!

    Does it mean that If I have 100 levels, I will create 100 layouts ?

  • Should I use this way to make the levels for puzzle-game?

    Hi, guys

    I have a puzzle-game with many level and many sprites, It mean that if I use code to set position sprite for each level, I think I must create a lot of codes to set position of them. So, I use a big layout and "System-> Scroll to position" to move to the next level.

    Here is My Capx. https://drive.google.com/uc?export=down ... zZTSDFqT2M

    I want to know, Should I use this way to make the levels?

    Please excuse My poor English <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • I try to tickcount same as image , but not work

    How do I measure time taken by a function to execute?

  • C2 doesn't let you pick newly created objects until the next top level event. Add a second On start of layout, and move your a2 loop there. It then works.

    Thank you for your reply, I try to call "a2" loop by a function, nothing happened. So, I want to know what is "the next top level event"

  • The problem with your setup is the second pick condition.

    The first pick condition

    Pick Sprite where Sprite.ID = loopindex("a2")[/code:2eygwdiz] works fine and selects the corresponding Sprite.
    
    The thing is that the second pick condition [code:2eygwdiz]Pick SpriteFM (family) where SpriteFM.ID = loopindex("a2")+1[/code:2eygwdiz] from the previously picked objects picks.
    This means that the first pick reduces the picked objects to one Sprite that has the right ID.
    The second pick condition picks the Sprite that has a different ID.
    Since there is no Sprite which has two different IDs at the same time, there isn't any Sprite picked and that's why the text doesn't change.
    
    Now to fix this, you could either just disable the second pick condition
    or
    you could add a second text object, then move the second pick condition to be checked after the first one (as sub-event to the loop) but not as a sub-event of the first pick. You would then change the second text to the second Sprite.ID.
    
    Hope I could help.
    

    Thank you for your reply. I think all the Sprite are created in the first for loop(10 Sprite with instance variables ID: 1 to 10, I see them in the debug mode). So, I think I can pick them in the second for loop. But nothing happened.

    What is wrong with my thinking?

  • pls, help me?

  • Hi, guys

    I use for loop to create multiple objects and set instance variable that called "ID", I want to pick two consecutive objects, so I use "pick by comparison" to pick them. But I can not pick them.

    Something was wrong?

    Here is my capx https://drive.google.com/uc?export=download&id=0B8g2b8f9ktNBLTd1T2xWam9QX1U

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I receive a bug when I run my code

    I want to know, Is there any ways to increase limit 16 vertexs to 32 vertexs?

    Thanks!

  • OMG, I am stupid. Thanks! :XXX