Ruskul's Recent Forum Activity

  • I'll take a look if I get the time on Christmas eve. I'm at work right now so no construct

  • Colludium - spongehammer - I thought asm.js was supposed to run javascript box2d at near native speeds. Now I may have to break out a test and see if Colludium is right using my laptop. I switched to asm.js because I thought it was supposed to be significantly better (I get 1000ish objects active at once, but I have never tested it in comparison).

    I made a custom sleeper system that allows me to have up to 10,000 objects bouncing around in a layout (but I still can only have 1000 on screen. I have enabled some features, but I am hesitant to use the edited version of physics in my major project in case Ashley does release an update with more features than I have added... Then I would be stuck tediously replacing behaviors.

  • I would be happy to take a look if you would like. Unfortunately, I can't guarantee how soon I can get to it with the christmas season and all... but if the project is small it will be easy to check it out.

  • When testing make sure you use extravagant values to confirm you are indeed not getting what you expect. I should think that physics will be much better for this though. Even custom events would be preferable. Physics is a lot of fun to play with if you haven't tried it and in many ways more intuitive.

    I'm not sure what you are trying to accomplish exactly though... Do you want the rocket to change angle counterclockwise?

  • Okay so...

    You need to have an object that you can test for when touching. My guess is that would be the tree. Second you need an object to the left of the tree. that is invisible. Create a variable called touchdt.

    When you touch the tree, set touchdt to 0

    everytick add dt to touchdtt

    If touch overlaps the object on the left and touchdt < some value (0.3 seconds?) then play the animation.

    You could also do this by tracking touch location, adding up the change in position over x amount of time and if the change in position after touching the tree is greater than x, call it a swipe so long as the player never stopped touching the screen during the add up.

  • Is the "Inspektor" being touched when you touch "CovJek"?

    That is the only thing I can think of at the moment without a broader scope.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To start with, don't let box2d handle gravity:

    On start of Layout -> Set physics object World Gravity to 0

    Then add everything you want to be affected by gravity into a family and call it "anything".

    Everytick -> "anything" Set physics velocity to whatever you like per frame.

    You can get fancy and have gravity change strength, angle or both over time. Really, if you manipulate velocity rather than adding forces or impulses you can get very predictable results without compromising the integrity of the physics world. Using this method you can even have a max fall velocity.

    I am curious... are you testing for mobile?

  • Hey everyone,

    I am reviving this post, because the physics behavior has been updated (no new features yet, but a new build of ams.js came out). This is important, because it makes the adding of box2d features much more feasible and eliminates many of the reasons why we don't have these features.

    A fellow user of c2 described the physics behavior as a simple box2d demo. I believe this is a apt analogy and a major letdown of c2. Construct 2 is an amazing game creator. But honestly, in the world of collision detection and resolution, the backbone of any action game, Construct 2 falls helplessly short of amazing. You can only achieve average with construct 2. The moment you want more, is the moment you realize there is no longer a good reason to use construct. This is BIG problem. Construct 2 provides speed, and ease of use. If you can't make something out of the box, right out of the box, then the advantages start to disappear.

    I can list a number of things that you flat out CAN'T do with construct 2 and physics, only because those physics features haven't been exposed in the behavior. I can also tell you that a number of those features can be added in a few hours. I know because I have exposed them for my self. But the more I expose, the more I risk as any update to the behavior means alot of editor time work, or a lot of patching the behavior.

    I don't think Ashley understands the importance of just a few of the missing features. They aren't optional, or fancy perks, they are absolute necessities. The only way this can be shown is by volume of response.

    If you know physics isn't sufficient as it is then make this a hot topic.

    On the other hand, maybe Ashley is right, and the construct 2 community needs nothing more out of physics.

    But think about the following:

    Have you ever wanted to apply a tangent force to an object? Have you ever wanted to know what the angle of the surface you are colliding with is? Have you ever wanted to make one way platforms easily with physics? Have you ever wanted sliding doors, or elevators? Have you ever needed moving platforms? Have you wanted to know the force of impact that one object imparts to another? Have you ever needed to stop a collision from happening on a frame by frame basis? Have you ever wanted arrows shot from a bow to stick into the wall? have you ever wanted that arrow to partially penetrate the surface it strikes? Have you ever found yourself upset that ghost collisions occur on tilemaps?

    Enjoy hacking around the problem.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    TOP list of things I need and use. I look forward to seeing what else other people use and or need.

    1.a - Collision Filtering! It sure would be nice to say, hey these objects only can collide with these and so on allowing for easy environment manipulation and complex behaviors.

    1. Kinematic bodies - kinematic bodies cannot be moved by other objects but can still move themselves. This is very useful for moving platforms, elevators, physics objects that need to be moved but only in contrived ways...etc. I have this working in my own fork of box2d asm.js with no bugs.

    2. Prismatic Joints. - These joints are sliding joints. They can be constrained in a variety of ways but can be used for doors, pistons, and more. Personally I think they are more useful than revolute joints.

    3. ChainShapes and edgeShapes - These guys have no mass but provide a static collision surface. Instead of having to build your world out of dozens, if not 100s, of immovable physics objects, you can draw a series of points that act as an immovable solid. No object can pass across the line. MOST IMPORTANTLY, they eliminate ghost vertices responsible for internal collisions. Anyone who has worked with physics in complex ways understands the importance of this. It is necessary, not optional.

    4a. Weld Joints - I just want to stick things to somethings and have them stay.

    4. Box2d Ray tracing. its like lasers and math had mutant offspring. but better.

    5. Contacts. Information about the collision, from delta velocity at time of impact to the forces applied to the objects. I think surface normals are also included.

  • Hey,

    This one is for the math people...

    How do I find the best 2d coordinate that minimizes the sum of the distances between a bunch of other points where each point is weighted to give it more or less value and these weights can be negative acting as repellant?

    In other words, is it possible to calculate the best point on a gird that is the most optimized place to be given attractors and repellant coordinates?

  • Okay everyone. The answer to this might be easy or not...

    Given an object with the following variables:

    Velocity X

    Max Speed

    Rate of acceleration and deceleration

    Distance to target

    How do I know when to decelerate to arrive at the target and have 0 velocity when I do. Basically I have an object that needs to accelerate towards a target and then begin decelerating at the right time.

    I Was looking around and found some physics equations that give me things like distance = Acceleration * time ^2 but that doesn't help much... position = position + velocity is how velocity integration works in most games and that gives a different number than physics equations (euler explicit integration???) I don't know what I am talking about but all I know is I spent 3 hour trying to figure out how to calculate when to slow down with no luck and google didn't help

  • They are in families. Everything I make is always in a family, except for debug objects and such. All characters in the game (player controlled, and ai) have a physics object that is in the family Character_Coliders. Each Ground detector for every character in the game is of the family Character_StateManager. This manager controls numerous objects that check nearby for walls, cieling, and floor. It also runs some ray-tracing if needed.

    Long story short I run the following logic:

    For each Character_State...

    is overlapping (any object that should be solid including character coliders)?

    The problem is that will always be true because the state is overlapping its own objects collider. I need to somehow obtain a list of objects that it is overlapping and if it is only overlapping 1 object I can see if that objects uid matches the stored uid of the collider belonging to the character. Iv tried but somewhere the subtleties of the list of objects construct 2 selects has escaped me. I could program this in a heart beat but I can't seam to event script it.

Ruskul's avatar

Ruskul

Member since 23 Nov, 2013

Twitter
Ruskul has 2 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies