Results 1 to 4 of 4

Thread: DelphiX and Shadows, alphablending

  1. #1

    DelphiX and Shadows, alphablending

    I need to create some shadowing for a game.
    Here is the situation, we have an bitmap wich is the object a tree for example and a bitmap that represents the shadow of the tree how can i place the shadow of the tree on the correct place and not completely shadowing the background.

    I think alpha blending will be it but i've never used it before.

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Blog Entries

    DelphiX and Shadows, alphablending

    If yuo are planning on doing these things for anything that requires the speed of anything faster than a snail, I'd seriously suggest either GLXtreem or GLScene. And there are of course other means than just using components too.

    Generally I find (Un)DelphiX is great for quickly throwing something together for a little 2D game/tool, but even that has it's limits and 3D is one of those things that calls out all the stops.
    Jason McMillen
    Pascal Game Development

  3. #3

    DelphiX and Shadows, alphablending

    If you want to have shadows I wouldn't recommend using delphix. Alphablending isn't exactly delphix strongest point. I'm not sure about your game, since you haven't told much about it, but if your game requires many trees it will slowdown your game considerably.

    If you want to keep speed up, and still want to have shadows, I recommend using a different package, like Omega for example.
    I haven't worked much with Omega yet, but it looks a lot like DelphiX and has quite good support. I recommend giving it a try.

    As for drawing the shadow itself, If you have made the image in a graphicseditor, you can make an image of the tree and an image of the shadow. You can then also decide at which coordinates you need to draw the shadow (say at 7,13 from the tree) Then in your game you first draw the shadow and then the tree.

  4. #4

    DelphiX and Shadows, alphablending

    i'll try out the omega package,
    i've also found on the net some asm alpha blending wich looks quote good
    and has mmx optimizations. i just need to edit the code a little bit so its compilant with delphi.


Posting Permissions

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