Results 1 to 3 of 3

Thread: 2D dynamic shadows?

  1. #1

    Default 2D dynamic shadows?

    Hello, that's my first post here. I have a plan to develop a small game ( probably just for me, I don't belive it could become any popular ), today I found ClanLib, as I read a few examples and tutorials I got amazed by some of the features ( mostly networking ). My game would be a 2D shooter ( with some twists that I'll skip ) and the very important thing is, that I need soft dynamic shadows ( flashlight + few other lights ). I could use SFML, get the lighting engine from their forums and just use it, but as I mentioned ClanLib seems to be way better in many ways. And this is my question, is there an easy way to get an effect of 2D dynamic shadows in ClanLib?

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    I'm sorry, we don't have any examples that demonstrate such functionality.

  3. #3

    Default

    Thank you for your answer, I decided to code my own lighting engine ( something simple, shouldn't be hard ). I already have everything planned and the only thing I'm not sure about for now is ( that's pretty trivial ) drawing a line using gradient instead of constant color ( can work it around, but I doubt it will be effective ).

    Edit : I found the way, CL_GraphicContext::draw_primitives is the answer. Now I have to think a bit about which way will be better ( drawing shaped light vs drawing full light and casting shadows ).
    Last edited by Polifen; 01-15-2013 at 08:50 AM.

Similar Threads

  1. dynamic OverlayEntity change
    By blackMasoon in forum Proton SDK
    Replies: 3
    Last Post: 10-07-2011, 05:22 AM
  2. Shadows and lights
    By Randati in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 04-20-2009, 05:16 PM

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
  •