CodeMasterMike's Forum Posts

  • All functions should work both in windowed and full screen mode.

    I havent tried it with Cocoon JS since I cant install their launcher on my android, but last time I tried it on appmobi and phonegap it worked. I dont own a Iphone either, but it should work there as well.

    But I have to wait until the hardware accelerated build wrappers on both appmobi and Cocoon JS are released before I can really say if it works in the native mode on mobile phones with their wrappers. In software mode rendering its working.

  • I have released a update on the Car Physics behavior!

    There is a lot of new functions and properties and much more is coming.

    The new version is (BETA) 0.06!

    See the orginal post for more information, or click here!

  • Yes, its a good temporary solution.

    But I went ahead and I created my own function to handle this. And it works perfectly.

    If anyone is interested in this function as well, I added it to my plugin. So go to System Manager plugin, or click on this link. The function is called "Allow physics rotation".

    Man, I just love the Construct SDK! So much cool stuff you can do with it!<img src="smileys/smiley1.gif" border="0" align="middle">

  • Hillstrom

    I'm glad you like my contribution!

    Hopefully many people use it and like it so much that they don't have time to write a reply!

    And with this reply I would like to announce that I have made some updates to the plugin! Current build is now v1.03!

    See Orginal post for more information!

  • sqiddster

    Thanks for the tip, but it doesn't work to 100%. A object can still rotate, even though its not by much.

    Disabling the rotation directly in the physics engine would be a much better option, because the physics still calculates the rotation, even if I set the angular velocity to 0 every tick.

  • Would it be possible to add "Prevent rotation" as action in physics behahvior,

    So you can change it in runtime?

    One reason for this would be, that I would want a family/object to be able to rotate in one layout (ex normal mode), but disable the rotation in another layout (ex easy mode), and without having to create a second family/object.

  • Nice behavior! <img src="smileys/smiley1.gif" border="0" align="middle" />

    But, when applying a color ("Apply color tint" function) to a object, all instances of that object get the same color. It would be really nice if you could set a different color, with the "Apply color tint" function, on each instance.

  • I would like to have a "recreateBody" flag in the physics behavior.

    At the moment there is a local recreateBody-flag that is only active when the physics behavior is updating, and then is directly reseted.

    I would like to have a flag, that is active until the physics tick function is called at the next update and then reseted, so I have the chance to react to a physics body rebuild.

    And to have this SDK bug fixed <img src="smileys/smiley1.gif" border="0" align="middle">

    http://www.scirra.com/forum/r90-code-error-in-physics-behavior-js-file_topic52256_post328631.html#328631

  • Function InitVelocityConstraints, in the realtime.js file in the physics behavior, line 9242, has a faulty variable decleration. This error causes the game to crash when running in preview mode and as a html. Happens probably on all kind of exports as well.

    The faulty decleration looks like this:

    var K = new b2Mat22();

    and should look like this:

    var K = new Box2D.Common.Math.b2Mat22();

    I tried with the new line and it does not crash the game when running in preview mode or as a html file.

  • Joannesalfa

    I have updated the tutorial, so the warning doesn't appear anymore.

    When you say it didn't work when you press the left and right arrows, was the car in motion when you tried? Did the forward wheels rotate to the sides when you pressed?

    Because the car needs to be in motion to turn and the wheels rotate based on the turn speed given.

  • <center>Car physics behavior</center>

    Current version is (BETA) 0.1!

    This behavior enables a top down-view car (body + 4 wheels) and a side-view car (body, 2 wheels and 2 axles) to act as a car, fully integrated with the Construct physics world.

    This is a very early version, and it does miss certain functionalities and performances that I am hoping to add/fix in the near future. But I thought I would release it as it is now, to let people try it on and play around!

    V.0.1

    • Created a tutorial page for this behavior plugin:

    http://www.scirra.com/tutorials/323/create-car-physics

    • Code structured and optimized for better performance.
    • Added extra actions to enable more dynamic settings specific for the sideview car physics in real time.
    • Added extra properties variables to enable more dynamic settings specific for the sideview car physics.
    • Added Sideview Car physics. A sideview physics car is based on a body, two wheels and two axels combined together.

    The sideview car physics reacts just as the topdown car physics with wheel friction, linear dampning etc etc.

    [ISSUES]

    You cant change the friction of any of the wheels or car body in real time. If you change the friction the car will fall apart and will not be usable. This is because when changing the friction, Construct 2 destroys and rebuilds the physics body for that specific sprite.

    The physics do make a rebuild call, but its resetted internally inside the physics.

    As it is now, there is no way for me to catch that rebuild call, without altering the source code of the physics, which is not allowed or recommended!

    I have added a request to change that in the SDK forum, and hopefully the nice people at Scirra can add a flag, allowing me to catch a rebuild call.

    <center>Download Car Physics behavior v.0.1

    Very simple top-down car physics example for v.0.1

    Very simple side-view car physics example for v.0.1

    </center>

    For more information and a tutorial how to create car physics, please

    visit the tutorial:

    http://www.scirra.com/tutorials/323/create-car-physics

  • The problem with using == as a condition, is that its practically impossible to exactly get a situation where the values are "equal", due to the time calculation is calculated in milliseconds, and the values can be very high. And since the engine doesn't run once per millisecond, a equal condition might never be true, because the update might have taken 1 millisecond too long to be a match.

    but I'm willing to test a equal condition, but its little different than a "ordinary" equal. I have added that if the time value is higher than the time at the previous update, and lower/equal to, than the current time during the current update, its considered equal and returns true.

    I don't know how well it will work, so this needs to be tested properly before it can be accepted into the final code. But I'm releasing it now anyway so you can test it and see how it works.

    I also added "Less or equal" and "Greater or equal" to the "Check counter value"-function.

    New update is online! The latest version is now 1.07!

    Check Counter Value

    I added '==', '<=' and '>=' to the conditions in this function.

    Although these conditions are still under testing (read above for more information), and they might change in later updates.

    Remove Single Counter

    his function removes a single counter from the Time Manager. I added this to get the option to remove unwanted timers that would only take up a spot in the Time Manager list and, in larger amount, more time to calculate active counters.

    I hope this update will be of big use for all of you who uses this plugin. To get the whole change list and more information, go to the top original post and get the new update now!

    Orginal post

    Thank you everyone for your feedback, suggestions and support! <img src="smileys/smiley1.gif" border="0" align="middle">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The specs in your mobile are a lot weaker than on a computer, therefor when running a html5 game directly in a browser on your phone, it will be a lot slower.

    See this entry: http://www.scirra.com/manual/134/performance-tips

  • I did this too in a game, and it worked quiet well, at least for my game.

    I put a "Scroll To" behavior on the player and then I used the following calculation:

    clamp(1 - Distance / (LayoutHeight + LayoutWidth), 0.10, 1.0)

    Hope it helps!