User Tag List

Results 1 to 4 of 4

Thread: Surface Object Data Restoration

  1. #1
    No Products Registered

    Join Date
    Sep 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Surface Object Data Restoration

    I'm working on a videogame where the player is stuck on a black/white background - depending on the colour of the player's ship he is either trapped between the black background spaces or the white, but he can destroy and flip between either. A better explanation and practical example can be seen here, using basic blank backgrounds [and the 'paste as backdrop' command].

    I'm working on an updated engine test, experimenting with more detailed backgrounds for both black and white worlds. For this I'm using two Surface objects overlayed on top of each other, Black on top of White for starters. Now what I've managed at the moment is to enable the player to destroy segments of the black Surface object [using a transparent-color rectangle fill], revealing the White underneath. That's all well and good. What I'd like to do now is to allow the player to fill the 'deleted' portion back in to restore the Surface object to how it was beforehand - the player should be able to wipe out, say, a large circle of the surface and then restore it piece by piece.

    How would I go about a 'fill restored segment' event?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Surface Object Data Restoration

    Hello,

    What you're trying to accomplish might be easily doable when both Surfaces are fully opaque. In that case, you can use their alpha channels. Just fill it black where you want to erase something, and fill it white again to make the stars reappear.
    I think I made an example of how to draw to an alpha channel in the official Surface object examples. Go grab them

  3. #3
    No Products Registered

    Join Date
    Sep 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Surface Object Data Restoration

    Looki I could almost kiss you, that idea worked out perfectly. Here's the test build so far. Thanks again for the help!

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Surface Object Data Restoration

    No problem - Since you're using rectangles you can simply draw to the alpha channel. To draw ellipses etc. you'd have to temporarily copy the alpha channel to another image and modify it there, which is a bit complicated :blush: That's an interesting looking game concept, I can imagine where it's going Cool to see my extension used in a creative way.

Similar Threads

  1. Replies: 17
    Last Post: 10th July 2013, 01:46 PM
  2. Surface Object
    By harrysgames in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 23rd February 2012, 02:37 PM
  3. Surface object
    By Looki in forum Released Extensions
    Replies: 4
    Last Post: 18th October 2010, 01:38 AM
  4. Surface Object
    By imothep85 in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 2nd October 2010, 06:24 PM
  5. surface object
    By imothep85 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 17th September 2010, 01:05 AM

Posting Permissions

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