Pandy's Forum Posts

  • Thanks for clarifying. My bad.

  • R0J0hound

    Not sure if this is a bug or not, but it seems in Chipmunk the 'angular velocity' set is twice as fast as it should be.

    I used speed=distance/time. Constant time, a set target angle, I calculate the angular speed. I used a timer to stop the rotation after the set time.

    In standard C2 physics behavior it reaches the target angle as expected, but in Chipmunk it would over rotate, then I just divided it by 2 and then it worked fine. Both C2 Physics and Chipmunk is stated as degrees per second.

    This does not need any updating of the behavior as we can simply just divide by 2, but I thought I'd put it out there.

    Also Chipmunk crashes if I make an object rotate past its min or max angles set in its limited rotary joint.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh ok I'll look into it then. i wasn't aware of a motor strength option. Thanks.

  • R0J0hound

    I added a motor joint to yellow, and it did stop it from getting displaced, but red still gets displaced, and yellow also gets displaced if I make the black sprite collide with yellow directly.

    From what I can see the C2 Physics just stops or slows down its rotation to prevent displacement while Chipmunk just rotates regardless, which I guess is a more consistent but with the side effect of displacement.

    I guess it is how it is. Only if the standard C2 Physics had collision filtering per instances of the same object like Chipmunk does. And looking at the files It looks impossible to hack it into the C2 physics behavior.

  • R0J0hound

    Please check the attached gif

    i.imgur.com/LK2sMIq.gifv

    Attached capx

    cdn.discordapp.com/attachments/498916402195857408/499148545769734144/StdPhyVsChpmnkPhy.capx

    I know you are not developing the behavior anymore, but I wondered if you can give any feedback on this. I'm not sure if I placed the joints correctly in chipmunk, but it seems there is no way of getting similar non-breaking rotation as the standard C2 Physics behavior. Is there anything that can be done? Thanks.

  • Colludium

    I want to buy this, but I'm not sure if it will do what I need. How can I contact you now that pms have been disabled.

  • blackhornet

    Yeah I had to resort to using an extra variable that was incremented by 1 and then divide that by 10 to get exact single decimal place values. I at first resorted to comparing ranges but it seemed so cluttered and annoying. I guess I was taking variables for granted all this while. At least whole numbers should be exact, right? :P

  • Hello all.

    This is kind of a bug but It was simple enough to replicate that I didn't want to go through the hassle of reporting it in the bugs section and having to upload a capx.

    The bug.

    Whenever I add 0.1 to an instance variable, the value does not increase by exactly 0.1. Let an instance variable be 0. Add 0.1 and it becomes 0.1, add 0.1 again and it becomes 0.20000000000004, add 0.1 again and it becomes 0.300000000004 and sometimes adding 0.1 again makes the value exactly 0.4 or it continues to have those extra decimals. And after a lot of loops through adding 0.1, the value becomes totally different like 0.3999999999987 instead of 0.4 for example.

    I found this out because I was setting a condition where the instance variable should be equal to 0.9, but it wouldn't fire and after checking in debug I saw that the value was actually 0.899999999999999 instead of 0.9. I don't get how such a thing could happen.

    I tried multiplying and dividing by 10 and also with other objects' instance variables, but the same result.

    Can anyone else replicate this and see if you're getting the same issue?

    Thanks

  • Katala Lunarovich

    Anyone got links to the capx in this post? New forum has removed them all. Thanks in advance.

  • rexrainbow

    I'm not sure if I haven't understood the way the behavior works or if a bug, but if an object has 2 FSM behaviors, and when "State Transfer Logic" is triggered, it gets triggered for both the FSM behaviors.

    For example, a sprite has FSM1 and FSM2 behavior.

    On FSM Tranfer logic > Add 1 to Variable.

    On FSM2 Transfer logic > Add 1 to Variable.

    On Start of Layout > FSM2 Request.

    This results in Variable = 2.

    Or just add 1 to Variable on FSM Transfer logic, and it triggers on FSM2 request.

    I don't understand if this is how it is supposed to happen or a bug.

  • Pandy here is a new link. I also included the 2 example files.

    Have fun!

    https://www.dropbox.com/s/6q739tvpe933y1m/rojoCustomDraw.zip?dl=1

    Thanks a million!

  • R0J0hound

    Moving to construct.net has broken all the links I think. I can't find the link to the plugin, anyway to fix this?

  • Hi

    This is rather confusing for me. I'll admit I still don't have my head around the relation between window size and performance but can someone please explain why the below is happening.

    So I started out my project with a window size of 1920,1080 and after putting in sprites and events and previewing I get a image memory usage of around 19mb and stable 60fps and 20%cpu

    Later I played around a lowered my window size to 1280,720. And to my surprise this increased image memory to around 22mb and my fps fell to a stable 58 and cpu increased to 26-28%

    So I played around more and halved the 1080p resolution to 960,540 window size. This lowered the image memory to 16mb and cpu fell back to around 21%.

    Lastly I set the window size to my system's resolution which is 1366,760. And this totally obliterated my fps and cpu usage. Image memory increased to 25mb and fps fell to 54% and cpu increased to near 30%

    I don't understand why this flip flop in performance occurs for different window size. Can anyone explain this please. I'm using scale outer and fullscreen scaling is at low quality.

  • Thanks R0J0hound I'll look into it. Always end up learning about new stuff with you.

  • Imagine a random number of square sprites of any size are created in random positions like so

    https://i.imgur.com/JcJgOGW.png

    Now I need to find a way to create a sort of perimeter with the arrangement like so

    https://i.imgur.com/RQtHCpc.png

    The sprites could be overlapping and in completely random positions. How can I go about doing this? I want to avoid checking for any kind of collisions or overlapping for performance reasons.

    A basic perimeter is also fine, doesn't have to touch each corner of the square.