Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Snow and Rain Effects

  1. #11
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: Snow and Rain Effects

    Quote Originally Posted by Wizard
    Thanks Will, I like the way the snow builds up on the ground
    np Actually over time it starts to look a bit... toothy. I'd normalize the ground layer every X particle of snow that hits to smoothen it out a bit more... I've never really experimented with it much, but it's something to look at...
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #12

    Re: Snow and Rain Effects

    Will, I implimented your snow demo into my game and everything works as I want it to. Except for the fps dropping from 200 fps to around 50... I checked your demo and it runs at around 16 fps...So my question is: Does the particle system as a rule eat up the fps or do you think it could be something else? I checked and rechecked my code.
    Wake up from the dream and live your life to the full

  3. #13
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: Snow and Rain Effects

    Quote Originally Posted by Wizard
    Will, I implimented your snow demo into my game and everything works as I want it to. Except for the fps dropping from 200 fps to around 50... I checked your demo and it runs at around 16 fps...So my question is: Does the particle system as a rule eat up the fps or do you think it could be something else? I checked and rechecked my code.
    Before I say something else, how many particles are you using?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  4. #14

    Re: Snow and Rain Effects

    The same as in your demo MAX_SNOW = 500. What I did change is the screen_height & screen_width. And you're right when i decrease the Max_Snow the fps increases, but then it doesn't look so dense...
    Wake up from the dream and live your life to the full

  5. #15
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Re: Snow and Rain Effects

    I'm not entirely convinced that it's the number of pixels --I mean I could probably spit out about 2000 in OpenGL without breaking a sweat-- but, I do remember that DelphiX used to access video memory rather slowly so...
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #16

    Re: Snow and Rain Effects

    No problem, thanks anyway
    Wake up from the dream and live your life to the full

  7. #17
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Snow and Rain Effects

    About speed, if you use instancing within DirectX you can spit out 20k without breaking sweat. And it's not that hard to accomplish!
    NecroSOFT - End of line -

  8. #18

    Re: Snow and Rain Effects

    This is the 1st time I hear about instancing within DirectX. Must I have a look at clooties translations or do you have a sample?
    Wake up from the dream and live your life to the full

  9. #19
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Snow and Rain Effects

    msdn (DirectX SDK) has a nice example http://msdn.microsoft.com/en-us/library/bb174602(VS.85).aspx
    If you take a look at Constants Instancing and Shader Instancing the differences are really small. You don't need to do extra-fancy stuff.
    NecroSOFT - End of line -

  10. #20

    Re: Snow and Rain Effects

    I found a solution to the speed problem I had once I introduced snow in my game.

    Instead of

    Code:
    DXImageList.Items[9].Draw(DXDrawGame.Surface,0,0,0);
    use

    Code:
    DxdrawGame.Surface.BltFast(0, 0, BackImage.ClientRect,1, BackImage);
    bltFast increased the fps to what it is set at in my game, which is 200 fps

    btw using BLTFast drawing only works if the image being drawn is exactly the same as clientHeight and clientWidth, if it overlaps it will not work
    Wake up from the dream and live your life to the full

Page 2 of 2 FirstFirst 12

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
  •