More of a Question - Physics related

This forum is currently in read-only mode.
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • This is more of a general "ideas" question than a help request... but this was the best place I could think of to ask.

    Trying to come up with ideas in order to build some simple objects using physics, as in objects made up of a single sprite... and have them "destructible". Whatever it is with me and destructible physics objects, I don't know.

    Anyway the idea would mainly consist of (multiple) simple objects of varying Mass and Size, colliding with each other at a variable "shoot" velocity. Upon collision, based on (velocity*mass) will determine which object will "break" (hense the destructible) and shatter into smaller physics pieces.

    I have already thought of ways this might work, but I was hoping someone out there might have some other methods I could try.

    Some methods I have thought of:

    1. Having the main (sprite with texture) object, upon destruction, spawn several smaller objects using smaller "chunks" of the original texture. IE. Having to cut the "bits" out of a full texture in Photoshop for each "chunk" of the original object.

    This would certainly work but be more time consuming than it's worth, since the amount of different/unique objects I would like to use, would be considered by most people as being "excessive".

    I was hoping someone had some ideas to improve this. I was thinking maybe I could use the canvas object to snapshot the texture before breaking, but I don't know how well 1000's of small canvas objects with physics on them would perform....

    2. Same as above, but the smaller objects are textured very generically instead of being composed of "chunks" of the original.

    This saves time, but doesn't look good at all... not for the final effect I would be looking for.

    That's about it really...

    Sorry if I haven't been very clear with what I am trying to get at. Sometimes it's hard to explain an idea you have in your head.

    If it helps, think of something along the lines of this as an analogy: A bag breaking open and fruit falling out of it... the bag goes into a couple of pieces and 5 random fruits fall out of the bag.

    Or, a wooden spoon gets smashed into 3 pieces.

    I guess if I figure something out in the meantime I will post it up.

    Cheers in advance for any help or suggestions.

    ~Sol

  • Do you want the pieces to have physics as well?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you want the pieces to have physics as well?

    Oops, yes... forgot to mention that part. xD

    I've been messing around for awhile now, and not getting anywhere past my original idea/method... which is going to be completely infeasible if I want a polished finished product.

    Also, would like to be able to "crush" objects as well.. using height and width would be fine but I think I can probably figure this one out relatively easy.

    ~Sol

  • You'll have to use some dummy sprites for that as you cant change width and height on a physics object.

    Now as to the breaking into smaller pieces, you will probably have to go with spawning new objects, as getting a group of physics objects to stay together is next to impossible... unless we some how get a way to disable physics when we want. There was some talk about that, but it was said it was probably not going to happen for the same reason you cant change width and height. Physics generates a map, and if you turn off the behavior, or change the attributes of an object, the map would have to be rescanned.

    So what you could do is have the main object have a bunch of image points, then when it breaks destroy the main, and have the new objects spawn at(random?) image points.

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