Results 1 to 6 of 6

Thread: lightning,colorize,scaling,static blocks,etc

  1. #1

    lightning,colorize,scaling,static blocks,etc

    is it possible to do lightning effects in ddraw? i think i've seen it in razor1911 demos if i'm not mistaken,but it could've been d3d? anyways please look @ the following example first to allow me 2 explain...

    http://www.scene.co.za/scene_cracktro_beta2.zip

    there is a fireball moving in a horizontal 8 to the top left,now this sprite,must now throw a lightning effect to each side,of a specific color(perhaps alpha blending?).also,if u can also tell me how 2 colorize a sprite,and rotate/scale it in delphiX,it would be most appreciated.

    also,say we have a window like the following,with 2 blocks inside

    ----------------------
    | |
    | --------- |
    | | x | |
    | --------- |
    |---------------------

    ok,say we are gonna do a star effect in the outer block,but we dont want to do anything in the inner X block,how can that be accomplished? can it work like lets say a layer effect?

    and now,the bottom text part is a little korny,what i've done,is i've created a bmp of 10000x60 pixels,wif the text inside,which comes to about 1.5mb of junk.is'nt there a easier way of doing this? perhaps a 300x300px image wif fonts inside that can be used?

    thanx in forward for which info can be given
    //admin@scene.co.za

  2. #2

    block example.

    argh,the lame block effect did'nt work in above post
    let's try that again.please clix0r to http://www.scene.co.za/lameblock.jpg
    (8,094 bytes)

  3. #3

    lightning,colorize,scaling,static blocks,etc

    I only understand parts of what you want to do, however since my eyes are slowly disappearing behind my eyelids it could also be me...

    From what I understand out of the star effect question, I would say you draw the first block, then draw the effect and then draw the 2nd block over it... Of course if you want the 2nd block to be in the effect too, then you draw the second block over the first, then the effect and finally put the text in it...

    Your second question, yes there is an easier way... Store all the letters of the alfabet (and maybe numbers) in a bitmap, make sure all the letters have the same rectangular size and a clfuchsia background, then u can simply read out the text from the bitmap by using CopyRect and if you write a good function for it you could simply pass text to the function and make the function determine what the number of the letter is in the alfabet (which is easy to determine just look at an ASCII table) and then the function just picks the image it needs from the tiled (font) bitmap and draws the letter transparent over the block...

    The lightning question I don't know, however I don't think it's (standard) possible in DXDraw. It could have been a D3D trick however, but I'm not very into that...

    Hope this helps a little
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

  4. #4

    lightning,colorize,scaling,static blocks,etc

    You might be able to get something useful for lightning with a l-system (lindenmayer system), though I've not thought about lightning enough to say that it's definitely useful for you. Bung the term into google and see what comes up .

    Alternatively, you might want to go slightly over the top ^_^ with this paper, greatly simplified of course.

    I think Sulaco has an OpenGL example with lightning between two spheres, if my memory serves. That might give you some ideas.

    If you're looking to blend your lightning then I'd suggest Project Omega instead of DelphiX. For one thing, it's under development, meaning you can hassle the dev'ers for features. Also, Bobby has made a sample for it that displays 2000 translucent sprites. There's absolutely no way that you could approach that with DelphiX, since you'd have to do translucency on the CPU the hard way. You probably won't need that much firepower yet, but it's nice to have it sitting around for later .
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  5. #5

    thanx for help

    thanx anyways dudes,i decided though that directx is'nt good enuff for very advanced 3d effects,so i'm gonna head into c++/opengl,and also cause i know c MUUUUCH better than pascal *shrug* :\

    thanx again.
    //admin@scene.co.za

  6. #6
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    lightning,colorize,scaling,static blocks,etc

    There are a number of font components that use a bitmap of text. The best one I've found is DXPowerFont which is included in the DXGui components.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

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
  •  
Comodo SSL