Walk behinds with masks

  • #1, by LebosteinFriday, 16. January 2015, 17:28 6 years ago
    Why it is not possible to create walk behind images with simple greyscale mask images?

    1. So it is not necessary to redraw all the mask images of a scene if the background image was changed or repainted in detail during development.
    2. Such png mask images are very, very small, because 8-bit only (large areas of the same color reduce the size additionally). This could reduce the size of a scene with some walk behinds by 50 % and more.

    Visionaire could automatically generate (stamp out, äh "ausstanzen" in german) the needed walk behind images temporarily with a simple mask operation (most of the common sprite/image libraries can do this with a simple function call). With these temporarily generated images the engine could work without changes.

    Example:

    Key Killer

    601 Posts


  • #2, by afrlmeFriday, 16. January 2015, 18:02 6 years ago
    You are referring to a similar system as used by the AGS engine? In that engine the developer of the game has to draw a mask over certain sections of the scene that the player can walk behind as well as define the point on the y-axis which determines if the player should be in front of, or behind the masked area.

    I believe both methods have their own set of pros & cons, besides it's always a good idea to work in layers when creating artwork, so it should be as simple as only selecting the layer you want, exporting to .png & then overwriting the previous file - maybe reposition a little bit in Visionaire Studio, if needed.

    Imperator

    6846 Posts

  • #3, by gustyFriday, 16. January 2015, 18:29 6 years ago
    He ment uploading alpha mask instead of artwork (because same artwork is already part of the background). But there is even better way as you suggested. Myself I always thought that AGS feature for this is very very clever. But we could kind of do the same in VS I mean we can already specify in VS polygonal objects boundaries, right? We can also define objects center point so character can walk around the object (like a column in middle of the scene - you can go infront of it as well as behind it). So what is the point of uploading graphics on top of the EXACTLY SAME graphics? All what we need is just a button that says to the engine "dude, use the background part for this object area".

    I mean for static foreground objects that are not moving, like columns, tree trunks or massive structures, I believe that "polygonal definition" would be the best way to go.

    Forum Fan

    159 Posts

  • #4, by marvelFriday, 16. January 2015, 18:33 6 years ago
    When system space was limited and games needed to save space, these 8bit masks masks were a good idea. Today there shouldn't be any issues regarding sprites and system spaces. And with a single sprite you are more flexible. For example you can scroll those objexts faster or slower, manipulate them (color, saturation,) etc.

    Key Killer

    598 Posts

  • #5, by marvelFriday, 16. January 2015, 18:36 6 years ago
    I mean for static foreground objects that are not moving, like columns, tree trunks or massive structures, I believe that "polygonal definition" would be the best way to go..


    Sprites (objects, architecture, furniture) are usually pretty complex. You cannot solve that by creating a mask using polygons. It would look pretty annoying wink

    Key Killer

    598 Posts

  • #6, by afrlmeFriday, 16. January 2015, 18:43 6 years ago
    The idea would be to use a final version of your background that does not contain the objects you have added to the scene. Also as Thomas mentioned you would not be able to apply effects to them such as transparency or shader effects, or parallax scrolling.

    Imperator

    6846 Posts

Write post