User Tag List

Results 1 to 5 of 5

Thread: Dark Environment

  1. #1
    No Products Registered

    Join Date
    Feb 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Dark Environment

    I want to make a dark environment in my game, which the whole playing area are black except an area around the main character can be seen. My problem is, how to make that visible area move along with the main character? And what is the method(s) to create a dark environment, actually? (I am just using a big black rectangle with semi-transparent)

    Thank you for any help!

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    TheSynapse's Avatar
    Join Date
    Jun 2011
    Location
    London, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use an active for the area around your character. You can probably get the effect you want by playing around with effects and/or shaders. Make sure you download the complex shaders pack. I don't have the link to hand (someone else might well do) but if you search for a couple minutes you'll find it.

    To make it move round with your character just make sure that you have the rectangle to always set its X,Y to that of your main character.

    Always
    >>X,Y of rectangle = X,y of character.

    You may have to play around with hot spot/action spots to get it to line up correctly a bit.

    Hope that helps.

  3. #3
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the surface object, it would allow for multiple light sources which would simply not be possible with an active object that has a hole cut in it, and it also would probably use less CPU and RAM. Below is what I put in my game for a dark area.

    IF Start of Frame
    THEN Surface Object Create color fill data "transparent" with color RGB(8,0,0)
    THEN Surface Object Set transparent color to RGB(8,0,0), replace old color = 0
    THEN Surface Object Set transparent to 1

    IF Always
    THEN Surface Object Clear with color RGB(13,13,13)
    THEN Surface Object Draw ellipse at (X("Player"), Y("Player")) with size (64,64) and fill data "transparent", outline 0 data ""

    You can replace the numbers in RGB() with whatever RGB values you want.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,379
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I would think that will actually use more CPU time if anything (at least in the HWA runtime), and it won't look as good because you won't have the nice soft edges.
    I'd use a separate layer for darkness, with a subtract/multiply effect, and then use actives for lights (yes, it does allow for multiple light sources).
    eg. https://skydrive.live.com/redir.aspx...094271BBDA!131

  5. #5
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought surface object has a alpha mode though where you could do soft edges with a little work.

Similar Threads

  1. PATH environment variable
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th November 2013, 08:15 PM
  2. iOS Development Environment Recommendations
    By kinase in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 15th January 2012, 03:17 PM
  3. Change Environment Path ?
    By DagSa in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 7th May 2009, 04:44 PM
  4. Two problems (Environment variables & Regex)
    By Anders in forum Extension Developers Lobby
    Replies: 4
    Last Post: 20th February 2007, 07:58 PM

Posting Permissions

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