Thread: Client with particles

Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,742
    Thanks given
    64
    Thanks received
    686
    Discord
    View profile
    Rep Power
    1032
    Quote Originally Posted by Zakawer2 View Post
    I ripped the useful particle shit out of this client. I have only one problem; on my client's fullscreen and resizable modes, particles look tiny and incorrectly scaled. Could you give me an improved method146 to fix this problem?
    or why not try do it urself. but i;ll give you a hint, where it gets the height of the particles, just add an exception there for if it's in resizable modes
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #12  
    Registered Member Stevenhax's Avatar
    Join Date
    Jul 2014
    Posts
    389
    Thanks given
    53
    Thanks received
    64
    Rep Power
    42
    Quote Originally Posted by Zion View Post
    nothing to do with depth buffering, that's what the old firecapes looked like. you need to pack a 508+ rev one.
    Thanks for the reply, however I'm unsure how it could not be the depthbuffering as that's the only thing I've changed and if I load the same
    model in a different client that already has depthbuffering it load fine without problems / without the appearance of the cape changing.
    I'm talking about the darker spots on the top of the cape by the way, they shouldn't be there and weren't there before I added depthbuffering.
    Reply With Quote  
     

  3. #13  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,742
    Thanks given
    64
    Thanks received
    686
    Discord
    View profile
    Rep Power
    1032
    Quote Originally Posted by Stevenhax View Post
    Thanks for the reply, however I'm unsure how it could not be the depthbuffering as that's the only thing I've changed and if I load the same
    model in a different client that already has depthbuffering it load fine without problems / without the appearance of the cape changing.
    I'm talking about the darker spots on the top of the cape by the way, they shouldn't be there and weren't there before I added depthbuffering.
    oh right, well by the looks of it. the client you ripped it from, doesn't use gouraud shading for the texture triangle rendering.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. Thankful user:


  5. #14  
    Registered Member
    Join Date
    Dec 2009
    Posts
    408
    Thanks given
    193
    Thanks received
    39
    Rep Power
    10
    Quote Originally Posted by Zion View Post
    or why not try do it urself. but i;ll give you a hint, where it gets the height of the particles, just add an exception there for if it's in resizable modes
    What do I have to change about this part then?

    Code:
            if (enableParticles) {
                iterator = currentParticles.iterator();
                while (iterator.hasNext()) {
                    particle = iterator.next();
                    if (particle != null) {
                        particle.tick();
                        if (particle.isDead()) {
                            removeParticles.add(particle);
                        } else {
                            int displayX = particle.getPosition().getX();
                            int displayY = particle.getPosition().getY();
                            int displayZ = particle.getPosition().getZ();
                            int[] writing = writeParticlePos(displayX, displayY, displayZ);
                            float size = particle.getSize();
                            int alpha = (int) (particle.getAlpha() * 255.0F);
                            int particlesize = (int) ((4.0F) * particle.getSize());
                            int srcAlpha = 256 - alpha;
                            int srcR = (particle.getColor() >> 16 & 255) * alpha;
                            int srcG = (particle.getColor() >> 8 & 255) * alpha;
                            int srcB = (particle.getColor() & 255) * alpha;
                            int display1 = writing[1] - particlesize;
                            if (display1 < 0) {
                                display1 = 0;
                            }
                            int display2 = writing[1] + particlesize;
                            if (display2 >= DrawingArea.height) {
                                display2 = DrawingArea.height - 1;
                            }
                            for (int iy = display1; iy <= display2; ++iy) {
                                int dy = iy - writing[1];
                                int var30 = (int) Math.sqrt(particlesize * particlesize - dy * dy);
                                int var31 = writing[0] - var30;
                                if (var31 < 0) {
                                    var31 = 0;
                                }
                                int var32 = writing[0] + var30;
                                if (var32 >= DrawingArea.width) {
                                    var32 = DrawingArea.width - 1;
                                }
                                int pixel = var31 + iy * DrawingArea.width;
                                try {
                                    if (Rasterizer.depthBuffer != null) {
                                        if (Rasterizer.depthBuffer[pixel] >= writing[2] - size - 15 || Rasterizer.depthBuffer[pixel++] >= writing[2] + size + 15) {
                                            for (int ix = var31; ix <= var32; ++ix) {
                                                int dstR = (aRSImageProducer_1165.canvasRaster[pixel] >> 16 & 255) * srcAlpha;
                                                int dstG = (aRSImageProducer_1165.canvasRaster[pixel] >> 8 & 255) * srcAlpha;
                                                int dstB = (aRSImageProducer_1165.canvasRaster[pixel] & 255) * srcAlpha;
                                                int rgb = (srcR + dstR >> 8 << 16) + (srcG + dstG >> 8 << 8) + (srcB + dstB >> 8);
                                                aRSImageProducer_1165.canvasRaster[pixel++] = rgb;
                                            }
                                        }
                                    }
                                } catch (Exception exception) {
    
                                }
                            }
                        }
                    }
                }
            } else {
                iterator = currentParticles.iterator();
                while (iterator.hasNext()) {
                    particle = iterator.next();
                    if (particle != null) {
                        particle.tick();
                        if (particle.isDead()) {
                            removeParticles.add(particle);
                        }
                    }
                }
                currentParticles.removeAll(removeParticles);
                removeParticles.clear();
            }
    Reply With Quote  
     

  6. #15  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,742
    Thanks given
    64
    Thanks received
    686
    Discord
    View profile
    Rep Power
    1032
    Quote Originally Posted by Zakawer2 View Post
    What do I have to change about this part then?

    Code:
            if (enableParticles) {
                iterator = currentParticles.iterator();
                while (iterator.hasNext()) {
                    particle = iterator.next();
                    if (particle != null) {
                        particle.tick();
                        if (particle.isDead()) {
                            removeParticles.add(particle);
                        } else {
                            int displayX = particle.getPosition().getX();
                            int displayY = particle.getPosition().getY();
                            int displayZ = particle.getPosition().getZ();
                            int[] writing = writeParticlePos(displayX, displayY, displayZ);
                            float size = particle.getSize();
                            int alpha = (int) (particle.getAlpha() * 255.0F);
                            int particlesize = (int) ((4.0F) * particle.getSize());
                            int srcAlpha = 256 - alpha;
                            int srcR = (particle.getColor() >> 16 & 255) * alpha;
                            int srcG = (particle.getColor() >> 8 & 255) * alpha;
                            int srcB = (particle.getColor() & 255) * alpha;
                            int display1 = writing[1] - particlesize;
                            if (display1 < 0) {
                                display1 = 0;
                            }
                            int display2 = writing[1] + particlesize;
                            if (display2 >= DrawingArea.height) {
                                display2 = DrawingArea.height - 1;
                            }
                            for (int iy = display1; iy <= display2; ++iy) {
                                int dy = iy - writing[1];
                                int var30 = (int) Math.sqrt(particlesize * particlesize - dy * dy);
                                int var31 = writing[0] - var30;
                                if (var31 < 0) {
                                    var31 = 0;
                                }
                                int var32 = writing[0] + var30;
                                if (var32 >= DrawingArea.width) {
                                    var32 = DrawingArea.width - 1;
                                }
                                int pixel = var31 + iy * DrawingArea.width;
                                try {
                                    if (Rasterizer.depthBuffer != null) {
                                        if (Rasterizer.depthBuffer[pixel] >= writing[2] - size - 15 || Rasterizer.depthBuffer[pixel++] >= writing[2] + size + 15) {
                                            for (int ix = var31; ix <= var32; ++ix) {
                                                int dstR = (aRSImageProducer_1165.canvasRaster[pixel] >> 16 & 255) * srcAlpha;
                                                int dstG = (aRSImageProducer_1165.canvasRaster[pixel] >> 8 & 255) * srcAlpha;
                                                int dstB = (aRSImageProducer_1165.canvasRaster[pixel] & 255) * srcAlpha;
                                                int rgb = (srcR + dstR >> 8 << 16) + (srcG + dstG >> 8 << 8) + (srcB + dstB >> 8);
                                                aRSImageProducer_1165.canvasRaster[pixel++] = rgb;
                                            }
                                        }
                                    }
                                } catch (Exception exception) {
    
                                }
                            }
                        }
                    }
                }
            } else {
                iterator = currentParticles.iterator();
                while (iterator.hasNext()) {
                    particle = iterator.next();
                    if (particle != null) {
                        particle.tick();
                        if (particle.isDead()) {
                            removeParticles.add(particle);
                        }
                    }
                }
                currentParticles.removeAll(removeParticles);
                removeParticles.clear();
            }
    it's right here..

    Code:
    float size = particle.getSize();
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #16  
    Banned

    Join Date
    Oct 2012
    Posts
    4,716
    Thanks given
    1,682
    Thanks received
    1,105
    Rep Power
    0
    Quote Originally Posted by Zion View Post
    it's right here..

    Code:
    float size = particle.getSize();
    Since you know a decent amount of the client. Wouldn't particles screw up the 317's client performance since it is not suppose to be for this revision.
    Reply With Quote  
     

  8. #17  
    Registered Member
    Join Date
    Aug 2013
    Posts
    15
    Thanks given
    0
    Thanks received
    1
    Rep Power
    14
    [EDIT, NVM I fixed it ]




    A little help please?

    (bottom right of this image.)

    Reply With Quote  
     

  9. #18  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,742
    Thanks given
    64
    Thanks received
    686
    Discord
    View profile
    Rep Power
    1032
    Quote Originally Posted by ImReece View Post
    A little help please?

    (bottom right of this image.)

    you have ur camera pos wrong way around

    Quote Originally Posted by _Patrick_ View Post
    Since you know a decent amount of the client. Wouldn't particles screw up the 317's client performance since it is not suppose to be for this revision.
    it's mainly memory intensive, but doesn't effect FPS (that i've seen), it's not like AA, fog, smoother triangle shading ect.
    but i haven't tested with like 100s of players with particles, but i think then it will effect everything majorly
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #19  
    Registered Member
    Join Date
    Aug 2013
    Posts
    15
    Thanks given
    0
    Thanks received
    1
    Rep Power
    14
    Quote Originally Posted by Zakawer2 View Post
    I ripped the useful particle shit out of this client. I have only one problem; on my client's fullscreen and resizable modes, particles look tiny and incorrectly scaled. Could you give me an improved method146 to fix this problem?
    You need to look in writeParticlePos method, Assuming you've done [Only registered and activated users can see links. ]

    Quote Originally Posted by Zion View Post
    you have ur camera pos wrong way around
    Nah I was using the wrong Variables lmao
    Reply With Quote  
     

  11. #20  
    Registered Member
    Join Date
    Dec 2009
    Posts
    408
    Thanks given
    193
    Thanks received
    39
    Rep Power
    10
    Quote Originally Posted by ImReece View Post
    You need to look in writeParticlePos method, Assuming you've done [Only registered and activated users can see links. ]
    Thanks, I fixed it by myself.
    Reply With Quote  
     

Page 2 of 4 FirstFirst 1234 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 45
    Last Post: 09-23-2007, 01:37 PM
  2. need help with making a client with new stuff
    By yahoo112 in forum RS2 Client
    Replies: 1
    Last Post: 09-19-2007, 08:06 PM
  3. Newest client with full chicken and 1 new npc
    By Zachyboo in forum Downloads
    Replies: 39
    Last Post: 09-17-2007, 09:46 PM
  4. Project Scape v3.5 Client with custom items/377
    By blackfirexx in forum RS2 Client
    Replies: 11
    Last Post: 09-07-2007, 12:48 PM
  5. New fire cape client with moving fire cape ^^
    By YeahSon in forum Downloads
    Replies: 4
    Last Post: 07-04-2007, 10:53 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •