Split object

This forum is currently in read-only mode.
  • Hi,

    I don't know, how slip one sprite into two innregural objects.

    Here's an image:

    <img src="http://i.imagehost.org/0241/Foto.png">

    I think, that this picture explains everything

    How can I split?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The only feasible way is to do it like puzzle pieces.

    You start with not one object but many.

  • Hi,

    I don't know, how slip one sprite into two innregural objects.

    Here's an image:

    <img src="http://i.imagehost.org/0241/Foto.png">

    I think, that this picture explains everything

    How can I split?

    you need to use canvases, but its by no means easy, and itll eatup VRAM if the objects is being split many times/ alot of canvases

  • You would have to use a distort map I think, as the fx method would drive the vram even higher.

    The funny thing is you can disintegrate the image and have a sprite for each pixel, and still have less draw on the system.

  • Yeah, object splitting that doesent eat up your whole VRAM would be nice addition to construct, ive seen some examples in flash games. Maybe it would be easier when Construct could support vector graphics, or at least have some "create polygon with texture" expression. Another thing are custom collision masks for sprites with physics ( I suppose You would like to see splitted parts respond correctly to collisions), I dont know if You could make them during runtime but that would be very usefull.

    The example : http://armorgames.com/play/6375/faster-miter-master

    EDit:

    Actually it could be done with displacements, i will make example later

  • distort maps have their limit aswell, it would turn into a hopeless garble after only a few cuts and getting a texture to look right would be very difficult on pieces, not to mention distort maps dont have collision detection which adds even more complexity. if you use canvases and your objects arent to big (128x128 lets say being the max) the vram usage wouldnt be that big even with many since the more, the smaller the canvases are, and you could probably have up to 20 on screen with a decent card and absolutely no slowdown.

    wtv way you do it, it requires some trickery.

    something like that game would never use more than 4 "canvases", hence the reason its lag free.

    or for example chisel http://www.nitrome.com/games/chisel/

    even though it may seem like the world is always being destroyed and eventually it would use way too many canvases, you have to think about it in a smarter way, only 2 or 3 are needed, one or two to recieve "cut pieces", then a giant one to capture it all once it stops moving, and then those 3 keep repeating the cycle, notice how you cant make two cuts at once? its because it needs time to make sure you dont reveal the "cycle" as the pieces converge.

  • You can get collision detection on a distortmap if you paste it into a canvas, and the texture can be done using u, and v.

  • You can get collision detection on a distortmap if you paste it into a canvas, and the texture can be done using u, and v.

    t may work just fine

    but I'm not sure if distorted sprites paste correctly to canvases

  • It worked a few builds ago, I haven't tried in a while.

    Keep in mind a distort map will be very chunky, all you can do is basic polygons.

    Quasi's method would be best for the game he referenced.

  • Thanks for the help anyway, I guess Construct is not really suited for such tasks.

  • if your looking for someone to do it step by step, im not sure someones gonna take the time to do that for you, so were trying to help you along by telling you what plugins you could use to reach your goal.

    im sorry im not being enough help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)