Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: PatternSurfaces[0].Pixels[X,Y] MORE SLOW

  1. #11

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    ijcro you are the best

    DXDraw.Surface.Pixel[X, Y] not persistent, but I not change DxDraw.Surface, I change DXImageList.Items[1].PatternSurfaces[0] and work very fast (100 times or more than Pixels), now change 256 pixels eah milisecond and FPS down 100 to 90.

    But I have 2 problems :cry:

    * In 32bits color work fine, but in 16bits color return a green image:

    ORIGINAL IMAGE:


    FULL RAIN 32 BITS COLOR:


    FULL RAIN 16 BITS COLOR:



    I testing:
    [pascal]
    // read pixel color
    ColorPixel := DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y]; //original color image
    R := GetRValue(ColorPixel);
    G := GetGValue(ColorPixel);
    B := GetBValue(ColorPixel);
    // efect color over R, G, B
    // ..........
    // write pixel color
    DXImageList.Items[2].PatternSurfaces[0].Pixel[X,Y] := RGB(R,G,B);
    [/pascal]

    In 32 bits first pixel return R=41, G=106, B=137 and 16 bits return R=69, G=139, B=0. In 16 bits all Blue Pixel return 0. I'm test with ColorToRGB and same result:
    [pascal]
    // read pixel color
    ColorPixel := ColorToRGB(DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y]); //original color image
    R := GetRValue(ColorPixel);
    G := GetGValue(ColorPixel);
    B := GetBValue(ColorPixel);
    // efect color over R, G, B
    // ..........
    // write pixel color
    DXImageList.Items[2].PatternSurfaces[0].Pixel[X,Y] := RGB(R,G,B);
    [/pascal]


    2¬? Problem is when change full screen to windowed mode or viveversa or I move window (in windowed mode) arround desktop, image restore to original image, lost new color :shock: DrawAlpha efects also get lost.

    ¬ø Any solution to 2 problems ?

    Thanks.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  2. #12

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    What happened to your kotai login?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #13

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    I change email in profile and new activation email not recived.

    I send 2 emails to admin for activate, but not response.

    I create a new profile.

    Kotai.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  4. #14

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    you could just use another set of rainy textures.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  5. #15

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    Quote Originally Posted by djkotai
    I change email in profile and new activation email not recived.
    To whom did you send the request?

    In any case, I have reactivated your original account.

  6. #16

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    Thanks for reactivate my account. I send request to admin@pascalgamedevelopment.com and raproductions@hotmail.com

    In static image rainy textures not pretty, but in fast movement is good. Best solution are a line but, more angle positions. This rain only have 7 positions (up big to down small)

    Now convert dry track 1024 x 768 to wet track (gradually) only 9 secons.

    In 16bits color more fast than 32bits color but color change to green :x.

    Kotai.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  7. #17

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    You old activation email may have been lost in the last deluge of spam.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  8. #18

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    To do a lightning or flash (rain) for a few milisec changed the black color to white. There is some way of it doing that does not consume very much resources?

    And problem of lost all changes when swich to full screen or windowed or when move window game arround desktop, can someone help me?

    Thanks.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  9. #19

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    kotai try this for me with regards to moving windows:

    In object inspector, set dragkind to DOCK.

    I had similar problems with the app pausing/ bad refresh/ hangs , this solved it. But obv this isnt a fix for your other problems and may not be a fix of any kind

    I am also assuming you are reinitialising dxdraw on window change.

  10. #20

    PatternSurfaces[0].Pixels[X,Y] MORE SLOW

    I do not like very much this solution because it does not leave you to move the window.

    What I do not understand is because the color gets lost if I am modifying the image of the DXImageList and not the screen. In the DXImageList they should not lose the changes though it returns to initialize the DXDraw.

    Can be for changing the surface of the image and not the image directly in DXImageList?

    Thanks
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

Page 2 of 3 FirstFirst 123 LastLast

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
  •