Ruskul's Recent Forum Activity

  • Ashley (do I need to add Ashley, or do you see these posts anyway?)

    The contact class contains a set friction and reset friction method. When you change the friction on a fixture, you then iterate through all contacts for that body and call reset Friction. You can do this at the time of friction change (best) or during presolve or really at any time. The contact class can be used to manipulate a lot of things, including overriding default mixtures for elasticity, density, friction and so on. You can even use it to ignore collisions on a frame by frame basis for oneway collisions and also use it to create tangent forces/impulses.

    contactClassObjectInstance.resetFriction();

    Also, isn't whether or not something can happen in the real world is somewhat immaterial, as we are not making real world simulators? At any rate, I can think of instances where friction seems to change at run time in the real world- or at least simulating it as such is the most elegant way to program it . Friction on ice increases as the temperature drops, friction of a wheel on a road increases on a warm road compared to cold.

  • Absolutely, shameless bump... (I changed the op)

  • At this point with the new ams.js build, there shouldn't be any reason we don't get a few new physics features. Kinematic bodies and prismatic and weld joints being at the top of the list. Also, they would be stupid simple to add...

  • Full Box2d Web physics, instead of the current physics setup which is limited like a demo version.

    enough said.

  • Problem Description

    When friction is changed on an object at runtime, that change in friction is not reflected across current contacts. That means if you change friction of an object in contact with another physics object, that object will continue to resolve collisions with the current object using the old friction, until it leaves contact and touches again.

    In this post:

    I mentioned that, "...you also have to update contacts that are already occurring between the object being changed. Box2d stores the friction in the contact and does not regenerate that information on continued contacts." This is the case. In the behavior, friction is set, but contacts are not updated. I am not certain, but I believe not updating contacts when setting density, elasticity, etc, may also have unintended results, in the same way setting friction does.

    I have enclosed a CAPX file, though you probably don't need it. Use A and D to control angular velocity. The object defaults to 0 friction so it shouldn't roll any where. If you press H the objects friction is set to 1. But it still won't go anywhere...

    I am using, the latest version of construct (beta). Browsers affected and windows version is not applicable.

  • I feel like it's Christmas all over again, thanks!

  • I have also been looking into this as of late. I actually feel the primary weakness of construct 2 is the fact that it is javascript/html5 only, which is a weak language (as far as games go) and was never meant to run games. The fact that it does run games, is something to brag about.

    I think c2 (as much as I complain on the forums) is the best 2d game development bar none. Its fast, flexible, and intuitive... It gets harder to work with bigger projects but that can be fixed.; what can't be fixed though is a javascript game... oh it's fine and dandy for every flappy bird bird game that will ever be made... but idk.

    I just get gut sick when I watch the game janking and have no power to stop it. And then I find myself in unity, wishes construct didn't output javascript. The real question is can you live with the limitations jscript sets. If so, nothing to worry about.

    ... but will it ever beat c++?

  • heliogame the use of 2 tilemaps is a good idea and is common practice. Really, anytime you have tilemaps and need some to be solid and others not, this is fine.

  • QuaziGNRLnose - I am referring to behaviors under the attributes section in the behavior adder.

    Have you read how solid, or jumpthrough, or shadowcaster, are handled in the system js files? (preview.js) Because you can only use push out of solid (instead of push out object with <attribute> there is a lot you can't do. So much of the core of c2 can't be accessed, instead of simply adding things you have to start adding stuff that already exists.

    Push out of some object is basically the same thing as push out of solid. Except the later ties your hands.

  • heliogame - it looks like you got it working in the example, which is cool. Now make a level at the size you want and see if it works. You'll probably wan't to line up the boxes using snap to grid though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • heliogame - they do say optimizing too early is the worst sin you can commit in programing. I didn't think this would be that hard on first thought. R0J0hound provided good examples and can be learned from. It might not be a bad idea to just make the game with sprites and see how it works. C2 can handle thousands of sprites, but if you are making for mobile then that might not work.

  • mudmask I was hoping for a more elegant solution. I had originally tried to project the bullet along its current path and see what tile it was overlapping ((b.x + xprojection) / tilesize)... but this doesn't work at shallow angles.

    Your proposed method is almost like classic nes collision case scenarios. You look at the tile you are in and then look at the tiles surrounding the bullet. then bases on movement and penetration you figure out what the bullet has hit.

    This can be done, but it will basically involve rolling your own collision code. Worse yet, this doesn't account for non-square tiles. If you wanted slopes that would further involve more cases to test and resolve. If I had to do that, I might as well not be using construct... lol (if the goal is to save time, right)

Ruskul's avatar

Ruskul

Member since 23 Nov, 2013

Twitter
Ruskul has 2 followers

Trophy Case

  • 11-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

18/44
How to earn trophies