R0J0hound's Forum Posts

  • Hi,

    This worked only with a very early version of c2, and even then it didn't too much other that convert over layouts with sprites, tiledbg and text objects as I recall. It didn't do events, however I was able to convert some of the events in an unreleased version. To get it working with c2 now I'd have to reexamine the capx file format, update my capreader python lib to yield decoded events from cap files more easily, and add a table to help conversions from one event to another.

    The main issue is that c2 doesn't have some features of cc and some things work differently. I was initially waiting for more feature parity to update but I may not since this is something that will take a lot of tedious work for little benefit. However for the most part cc events are like c2 events so it's simple enough to as a user make events like the other.

    I may eventually update the capreader library some more. It provides a way to access the contents of caps which could be useful for making another exporter or IDE for cc. But then again it may be simpler still to start from scratch...

    Anyways to sumerize: an update is unlikely however you can manually convert over most projects.

    -cheers

  • I think you'll probably need to consider more than just the one closest wall. One works good like you said for outward angles, but for inward corners you could use the average of the two wall's angles as the angle to push out. Or you could pick the two walls in order of closeness and push out of of each one at a time. Of course with that you'd need to make your own "push out" events.

  • I found a formula for it called the Box-Muller transform, and it looks like this:

    NormalRandom = mean + sqrt(std_deviation * -2 * ln(1 - random(1))) * cos(360 * (1-random(1)))

    Works pretty good in tests:

    https://dl.dropboxusercontent.com/u/542 ... andom.capx

    Edit:

    didn't look at your link till now.

  • R0J0hound

    I assume there will be an option to change Mass at runtime ?

    yep

  • The only workaround is to use an array "for each element" to set the text on your own editbox.

  • Yes, "else" is bugged in some cases in CC, but "or" is worse.

  • Doc Ai

    You could use the Paster plugin so the object count doesn't increase.

    https://dl.dropboxusercontent.com/u/542 ... aster.capx

    Also it appears you need to use str(E_xdistance) when setting the text instead of E_xdistance. Would be a good topic for a bug report.

  • Uploaded beta #2.

    + Got circle and polygon collisions working. However concave polys are currently just converted into convex hulls.

    + It works now if the origin is off center.

    + Added joint I forgot (rotary limit joint).

    There were a couple issues that came up that took longer to work around than expected. As a side effect body sleeping may not be possible now, but we'll see.

    newt

    Don't need to teach a guy that can roundhouse kick his keyboard and get millions of lines of error free code.

    granpa

    Thanks.

    Joannesalfa

    SgtConti

    I'm not really going for speed, but function. But it could be interesting to benchmark when it's done*.

    SgtConi, changing the collision shape at runtime is more along the lines of changing the collision type. ex. None,Box,Circle or Poly. Changing the points of the collision polygon is another deal, which could prove tricky since chipmunk2d only works with convex polygons.

  • What is it?

    A new physics behavior that uses Chipmunk Physics instead of Box2d. It's built on a JavaScript port found here: https://github.com/josephg/Chipmunk-js which is based on Chipmunk2d 6.1.1.

    It differs from C2's physics behavior in a few ways. For instance this behavior works when you manually set positions at runtime and you don't have to wait a tick before adding joints. Also the Warp behavior will work with this one without a hitch. Another difference is when adding joints you use an object uid instead of picking the other object, which simplifies adding joints between instances of the same type.

    Features:

    * Collision shapes: None, Box, Circle, Polygon and rounded Segments. (Segments can't collide with other segments)

    * Support for concave polygons.

    * Support for tilemap object.

    * Standard object properties: Mass, Elasticity and Friction which can all be set at runtime.

    * Collision filtering:

    1. Collision groups that allow objects not to collide with other objects in the same non-zero group.

    2. Collision layers which is basically 32 different layers, and the object can be in any number of them, and will only collide with objects that share a layer.

    * Additional expressions: inertia, center of mass and area.

    * Every joint chipmunk2d has to offer is available to use. http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#cpConstraint-Video

    * Ability to specify where on the object's the joints are attached.

    * Ability to destroy individual joints, get the current impulse applied to a joint, and get the number of joints an instance has.

    * Global properties: Damping, Iterations, fixed timestep, and Gravity.

    * Ability to set and get: Velocity, angular velocity, force, impulse and torque.

    * All actions that set force, impulse, velocity, gravity, etc,... can be set with an xy or an angle and magnitude.

    * Force and impulse can be applied to an offset on the object.

    * Collision info with the "Post Collision" condition. With it you can get:

    1. Kinetic energy of collision.

    2. Impact of a collision.

    3. UID of other chipmunk object hit

    4. Number of contact points and the point, normal and penetration depth of each.

    * Closest point and Segment ray casting with expressions to get the point, distance, and normal with ray-cast.

    * Utility expressions to convert coordinates from layout (world) to local (relative to the body) and back.

    * Ability to set speed limits to objects and force limits to joints.

    * Chipmunks automatic object sleeping with actions to manually put to sleep and wake up.

    • As well as global properties to set the "idle speed threshold" and the "sleep time", which is the time idle before going to sleep.

    Download:

    https://app.box.com/s/jt9f8r1mqmq07pbthiydvrgzikp5d29f

    To install extract zip file into "C:\Program Files\Construct 2\exporters\html5\behaviors".

    Simple joints Example:

    https://www.dropbox.com/s/glddumkw3mt64 ... .capx?dl=0

    Conditions:

    Actions:

    Expressions:

    -cheers

  • DrewMelton

    If you set the layout width to 6000 and change the x expressions in events 37,38 from "(map.CurX-map.CurY)*75" to "(map.CurX-map.CurY)*75+3000" then the minimap will be more centered. You can do something similar for the vertical space.

  • DrewMelton

    I compared your capx to the original cap and found the issue.

    In events 7-10 you need to change the "miner.CurX" expressions to "miner.At(0)" or "miner.At(1)" like in the CC cap and it works.

  • I can't open the capx at the moment but you'll have to tweak your array events slightly.

    Construct classic arrays are 1 based so to access the first element you'd use

    Array(1)

    Array(2) for the second and so on.

    C2 uses 0 based arrays, so the expressions to access the first two elements would be:

    Array.at(0) and array.at(1)

    So I think if you subtract one from the array indexes throughout your capx it should fix it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • DrewMelton

    I'd go for using separate animation frames rather than separate objects.

    Here's a bitwise example here that uses the tilemap instead of array, but the concept is about the same.

    tilemap-auto-tile-help_p721581?#p721581

    I had a bit of a go at making an example in isometric. Art is time consuming for me and I wasn't able to find a free tileset that has all 16 combinations required for the bitwise method. I was able to use a modified approach with what I could find though.

    http://opengameart.org/content/cave-tileset

    https://dl.dropboxusercontent.com/u/542 ... tile3.capx

    I also found a useful general reference on isometric here that may be helpful:

    http://gamedevelopment.tutsplus.com/tut ... medev-6511

  • round(var*10)/10 should work for rounding to the nearest tenth.

  • For the first question it's pretty simple, just add a condition to check for when the score is 5 then add an action to set the bullet speed to 500.

    For adding 100 to the speed every 5 seconds you could make an every tick event with an action to set the speed with the expression:

    int(score/5)*100+initial_speed

    Where initial_speed is whatever the bullet speed started at, or rather what speed you want it to start at.