Author Topic: Blend Mode on FlxTilemap?  (Read 1235 times)

Sparkky

  • Member
  • **
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Blend Mode on FlxTilemap?
« on: Mon, Jul 11, 2011 »
I want to create dynamic shadows, but I need to contain it to indoors in my game.
What I wanted to do was something similar to the tutorial for dynamic light, but I can't seem to accomplish the same effect with a FlxTilemap.
I've gone into the FlxTilemap and when it copyPixel's to the Camera Buffer, I replace it with Draw using the BlendMode's talked about in the tutorial but...
A) it doesn't work, I can't seem to get any blend modes using this method
B) it lags... a LOT.

Anybody dealt with something similar or have any ideas, I've tried many things, and all my other solutions (using get/setPixels and comparing bitArray's of the light and the shadow overlay, all we're taxing on the CPU...
any idea's/solutions would be greatly appreciated.

GrimPanda

  • Member
  • **
  • Posts: 46
  • Karma: +1/-0
    • View Profile
    • Grim Panda Games
Re: Blend Mode on FlxTilemap?
« Reply #1 on: Tue, Jul 12, 2011 »
Which tutorial is this?  I have some ideas, but I'd like to see what they did before I say anything.
"Mortis Ailuropoda"

Sparkky

  • Member
  • **
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Blend Mode on FlxTilemap?
« Reply #2 on: Tue, Jul 12, 2011 »
I was looking at the example of dynamic shadows on the flixel wiki.
It shows a working implementation for the FlxSprite, but Im trying to make it work for a FlxTilemap

GrimPanda

  • Member
  • **
  • Posts: 46
  • Karma: +1/-0
    • View Profile
    • Grim Panda Games
Re: Blend Mode on FlxTilemap?
« Reply #3 on: Wed, Jul 13, 2011 »
Ah ok, my quick dirty fix won't work for your issue.   :-\
"Mortis Ailuropoda"