# Thread: Cutting pieces of a large image

1. ## Cutting pieces of a large image

So i have this mechanic where im cutting pieces of fabric like in pupeteer with scissors

What i want to know is if its possible to cut pieces of an active object, and have them drop down?

2. Sorry i worded that strange.

Imagine an active object with no animation just an image of a landscape. we'll call it active A

Another active object comes across that active A in a line, and it slices it in half. now Active A's bottom half falls down.

How would i slice that object in half? example i can think of is fruit ninja. The key is the player is doing the slicing so its creating a new object everytime thats sliced.

3. I posted a question like this a while back unfortunately no answer yet my original post does have a game that uses that concept called Ice Breaker by Nitrome

Here's the game: http://www.nitrome.com/games/icebreaker/#.WKKQK_mGPIU

Here's the post:

4. That game Ice Breaker is pretty good. I would like to know how that's done also. Been thinking about it , but can't come up with anything on how they did that. Anyone have any ideas? Danny boy, how about you?

5. How to do Icebreaker:..........

1. First make a graphic of a person trapped in ice.
2. Write a routine that will check to see if the start and end of the line your drawing is in open space....in other words you have cut through all the ice.
3. The Start area where the line "hit" the ice is stored in ISA (Ice Start A)
4. Also store the area where the line "leaves" the ice is stored in IEB (Ice End b)

IF you are making the placement of the frozen character random you can then write a routine to scan each pixel (starting at ISA) the area of ice and drop down once it reaches IEB. Keep repeating this until the scan completes a full line with NO hit on your ice graphic....this will find the end of the ice graphic.

OR

5. If you have designed the level and you know where the frozen character is and so you know the exact size of the ice block the player is going to cut out, then you can just grab that area starting from ISA across as far as ISB, and then down as far as the known size of the ice shape is.

6. once you have grabbed the area, convert it to a active object under physics control.
7. put the active object at ISA/ISB and also hide or erase the graphic under it.
8. The active object now falls down and interacts with the ground as it should.

6. Amazing idea, anyone care to do an example?

7. Im already on it :_)

8. Dex,.that is amazing. Thank you for getting an example together for us. Looking forward to it and seeing how it's coded.

9. I can't wait...

10. AHHHHHHH,..me either...!! LMAO

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•