R0J0hound's Forum Posts

  • You can, but it's mainly up to you to make the pieces.

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

    My workflow:

    1. clone the object that I want to fracture.

    2. open the image editor and draw lines on it to split it up into parts.

    3. duplicate that frame for every part.

    4. Then I edit each duplicate frame and erase each other part off the image.

    5. Adjust the collision polygons and crop. (don't touch the origin point)

    6. After that I had to click the Make 1:1 to fix the scale.

  • Here is a way to do it very smooth, although not terribly useful in your case.

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

    For your idea just break it down into smaller problems.

    * For any given pipe section you need a way to find connected pipes. My capx did it by storing the uids, but you'll probably want to do it with an overlap check since you'll be adding sections when the game is running.

    *After that the filling is much easier. You can do a method like I did or just make an animation for each section of the pipe filling from either direction. Then starting with some pipe, set it to fill. When it's full start filling the connected section.

  • vtrix

    You could use the canvas for that. You want to be able to change the tile graphics at runtime right?

    One thing to keep in mind is you should only have only one canvas instance per texture to save vram and just position and paste into every location.

    The "paste" action already does the relevant calculations so the pasted object at the correct location on the canvas. As far as seams, if they show up you could make the tiles slightly bigger so they overlap a bit.

    For performance the tilemap object would be the best way to go, but you do get more flexibility using the canvas.

  • Here is an example of an orbit based on Newton's law of universal gravitation.

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

    Basically it means that the velocity of the moon is taken into consideration.

  • If your graphics card supports a texture of that size and it has the available vram, then yes it should work.

  • xeed

    You can't change the collision polygon with this. It is possible to do per-pixel collisions by accessing the pixel data, although it is pretty slow. It doesn't work with polygon collisions so other work would be needed to make them work together. There is an example on the forum of per-pixel collision that uses the tilemap object with 1x1 tiles. It still is a bit slow but it does work with polygon collisions.

    megatronx

    For the first part you can split it up by pasting the larger canvas onto a smaller one. If you resize the canvas objects in the event sheet you may also need to use the "resize canvas" action to change the canvas' texture size as well.

    For the second part, yes the canvas object should be drawn.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's just the plugin's forum topic currently.

  • I fail to see how it's like spaghetti however after re-reading your op I also see I missed some details.

    -Cheers

  • I'd like to point out that the hash plugin jayderyu mentions wasn't made by me. On another note, Yann has made a json plugin that may be useful.

  • Would it work to use the action in your first post under a every tick event, only change 30 to 30*dt?

  • One way could be to do this. Each is a seperate event.

    Global number numPicked=0

    Every tick -> set numPicked to 0

    Family: is dead -> add family.pickedcount to numPicked

    Family: is running -> add family.pickedcount to numPicked

    NumPicked=family.count -> trigger action

    Or you may be able to do this with two conditions in one event.

    System: pick family by comparison family.dead+family.running>0

    System: compare family.count=family.pickedcount

    ->trigger action

  • It's basically a flood fill. For the wires start at the power source and then power all the connected wires, then loop over those wires and power what is connected to them and repeat. To address wires being cut you can set everything to be not powered before spreading the power from the source.

    The hull breach can be done similarly, only the fill starts from outside the ship.

  • The function is cr.angleTo(x1, y1, x2, y2) and it's in common_prelude.js. It's a helper function that is used throughout the runtime, so the likelihood of it breaking later on is near zero. There are also a lot of other functions in that file that can by useful.