Results 1 to 4 of 4

Thread: Automatic "transparency" ?

  1. #1
    Lesser Wizard
    Join Date
    Nov 2006
    Location
    California
    Posts
    101

    Default Automatic "transparency" ?

    I imagine this is handled by script but perhaps its something that might be an "automatic" feature like shadows.

    Imagine you are a character in a top down game there is a wall in front of you (or a forest, whatever). When you walk around the wall and now have the wall between you and the player is it possible to make that wall transparent so that you can still the the character. One scenario for this might be when you walk into a house, instead of going to another level the "roof" becomes transparent...

    So two questions:
    1) is this doable via lua scripting (is there an opacity value)
    2) might this be a property you set on a tile ("revealable" or something)

  2. #2
    Lesser Knight
    Join Date
    Dec 2006
    Location
    United States
    Posts
    47

    Default

    You should hypothetically be able to set the opacity of any entity through scripting (though I haven't tested it.) Just as you would change an entity's color, you would change the alpha value which is the fourth color value (after red, green, and blue.) It can range from 0-255 (a byte.)

    However, this would only work for changing the entire alpha (opacity) of an entity. Usually games instead dynamically reveal a section of an obstruction in a radius around the player. (Traditionally dithering was used, but alpha blending is cooler, perhaps not "old school" though.) Anyway, I don't know if this is possible at the moment. You'd probably need a special entity to indicate to the map render from where to subtract alpha.

  3. #3
    Knight
    Join Date
    Nov 2006
    Location
    Oregon
    Posts
    99

    Default

    Use a new map layer, that can go transparent when someone is in a room?

  4. #4
    Lesser Knight
    Join Date
    Dec 2006
    Location
    United States
    Posts
    47

    Default

    Er, the second paragraph was strictly hypothetical. That functionality probably doesn't exist in the engine yet. Also, I don't see a facility in the API to set the visibility of a layer (however, this should be trivial to implement.)

    What can be done currently (I think) is to make a single entity translucent/transparent. If you wanted to, say, make an entire roof transparent you'd have to iterate over every entity composing the roof and set its alpha to 0. (The efficiency of this depends on how many entities compose the roof.)

    I guess I should be useful and code an example. (will do later maybe)

    Also, you can play with opacity yourself by opening up the editor, opening an entity's properties and changing the fourth number in its base color (which is alpha.)
    Last edited by Ian; 01-10-2007 at 08:34 PM.

Similar Threads

  1. undo on "replace selected" only does one at a time
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 11-25-2006, 05:41 AM
  2. Legend of Tenjin.... Press "S" for screen #?
    By tazrulz69 in forum Dink Smallwood HD
    Replies: 0
    Last Post: 02-28-2004, 07:44 AM
  3. Funeral Quest Server "Initializing"
    By in forum Funeral Quest
    Replies: 2
    Last Post: 01-18-2004, 02:17 AM
  4. Di-Mart Guns -Explanation of the "Store Guy" event
    By rmcnew in forum Funeral Quest
    Replies: 2
    Last Post: 01-15-2004, 06:25 AM
  5. question about "protected" status
    By koppa0929 in forum Funeral Quest
    Replies: 1
    Last Post: 07-16-2003, 09:32 AM

Bookmarks

Bookmarks

Posting Permissions

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