Jump to content


Popular Content

Showing content with the highest reputation since 05/16/2019 in all areas

  1. 2 points
    I spent a decent amount of time looking at the client code to figure out how projectiles work precisely so I know how to manipulate them with the parameters better. I thought I might as well share what I learned to help others. This is from Major's refactored 317 client (https://github.com/zg/317-client). I'd guess that projectiles are handled in most revisions in the same way, but I only looked at 317. if (opcode == 117) { int positionOffset = buffer.readUByte(); int sourceX = localX + (positionOffset >> 4 & 7); int sourceY = localY + (positionOffset & 7); int destinationX = sourceX + buffer.readByte(); int destinationY = sourceY + buffer.readByte(); int target = buffer.readShort(); int graphic = buffer.readUShort(); int sourceElevationOffset = buffer.readUByte() * 4; int destinationElevation = buffer.readUByte() * 4; int ticksToEnd = buffer.readUShort(); int ticksToStart = buffer.readUShort(); int elevationPitch = buffer.readUByte(); int leapScale = buffer.readUByte(); if (sourceX >= 0 && sourceY >= 0 && sourceX < 104 && sourceY < 104 && destinationX >= 0 && destinationY >= 0 && destinationX < 104 && destinationY < 104 && graphic != 65535) { sourceX = sourceX * 128 + 64; sourceY = sourceY * 128 + 64; destinationX = destinationX * 128 + 64; destinationY = destinationY * 128 + 64; Projectile projectile = new Projectile(sourceX, sourceY, method42(sourceX, sourceY, plane) - sourceElevationOffset, destinationElevation, elevationPitch, ticksToStart + tick, ticksToEnd + tick, leapScale, plane, target, graphic); projectile.target(destinationX, destinationY, method42(destinationX, destinationY, plane) - destinationElevation, ticksToEnd + tick); projectiles.pushBack(projectile); } } For those more interested, the rest of the code referred to is in Projectile.java. Firstly, the start position of the projectile is sent in packet 85 and stored in localX and localY just before this packet is sent. positionOffset (incorrectly called angle sometimes in server) is often always sent as 0. This allows you to offset the projectile from the start and end position by a small amount. The positionOffset is an unsigned byte with the first 4 bits representing the x offset and the last 4 bits representing the y offset, so these should give you a scope of 0-15 squares to vary from the starting position for x and y (requires some simple tweaks to get full range and positive/negative offsets, default 317 just has 0-7 offset for x and y in the right and up direction because of the >> 4 & 7 and & 7). The next two bytes sent are for offsets to add onto the starting position (with positionOffset applied) to get the destination position stored as destinationX and destinationY. target is important (sometimes called lockon) and it takes a signed short. A value of 0 represents no tracking and is used for a position to position projectile. Otherwise it will track an npc or player. To track an npc you send the npc's index + 1 and to track a player you send the player's index as (-1 - index). The +1 and -1 are just to compensate for 0 not being an option since that represents no tracking and entity indexes also have 0 as valid player/npc indexes. graphic is just the id of the graphic/spotanim that is the projectile to send/ sourceElevationOffset and destinationElevation are used for the start and end height of the projectile, I didn't look into this much but might edit the post if somebody in the comments has useful information or I look into this myself. I probably will look into this to see what the feasible max and min values are for this parameter. The sourceElevationOffset adds onto the floor height that is at the start position and destinationElevation adds on to the floor height at the end position as you'd expect. ticksToStart and ticksToEnd are how you control the duration and delay of the projectile. They are measured in client frames and the client should run at 50 fps so this is 20ms or 0.02 seconds. The ticksToStart value represents the number of client frames to wait before starting the projectile. The duration of the projectile is ticksToEnd - ticksToStart. So sending ticksToStart as 30 would be a 1 tick delay. This would be much better to use rather than tasks or delays server sided before sending projectiles which quite a few poorly written servers do. Server sided it would probably be a good idea to change the parameters to specify the ticksToStart as delay and make a duration parameter. Then send the client delay for ticksToStart and delay + duration for ticksToEnd. This makes it so changing one doesn't affect the start doesn't require modifying the other parameter to preserve duration. elevationPitch is the main reason I looked into this in the first place. On my server this was hard coded as 16 when sent and wasn't even modifiable (ruse). This controls the arc that the projectile follows. It gets used in the target method which is basically the initialization code for the projectile: Math.tan(elevationPitch * 0.02454369D) The Math.tan function takes in the angle as radians and the multiplication by the 0.02454369 makes things interesting. The tan function peaks out to infinity at 90 degrees or pi/2 radians. With this scale it peaks out at exactly elevationPitch=64. As to why it's like this, I would only be pulling out of my ass rather than my brain. (Fits nicely into 6 bits though). As for getting meaning out of this value you can modify it to get the exact angle of projection you want for the projectile. Say we want 30 degrees. Then we would send elevationPitch as Math.toRadians(30) / 0.02454369D. As you increase the elevationPitch from 0 to 64, be aware that the speed of the projectile increases to keep the time of flight constant. So if you change an existing projectile's elevationPitch from 30 to 60, its speed would be much faster. If for whatever reason you want the projectile to go downwards and curve upwards (inverted rainbow) you can do so with elevationPitch in the range of (64, 128] where 128 is perfectly flat and closer to 64 is more curved. elevationPitch = 105 leapScale (sometimes called radius) I'll be honest I don't really know what this is entirely and it was also hardcoded as 64 for all the projectiles on ruse server sided. This specifies at which point along the arc the projectile should start. If you pass 0 it will start exactly on the starting position (which would look weird usually). The higher you make it, the further along the arc your projectile will appear when it starts. There is a point where it will go past the end point of the projectile and will start even further out than the end point and travel backwards to the end point (might be interesting for somebody doing some wacky custom content idk). This won't likely happen though when restricted to a single byte, I only found this when I was modifying the value client sided for fun and I put it pretty high. Calculating the parameters for halfway or quarterway etc of the arc with leapScale can be done, but I will probably do that at a later date since it's a bit more math and there's enough stuff here as it is. leapScale = 400 All of this information came from my deductions from reading the client code for projectiles which may be incorrect. Hope people find this useful
  2. 2 points
    this guy 100% is who got me into makeing art... i bug him prob way to much lol.. yea i need to learn to allin things.. not sure if there is a tool for that or not.. and the font i thought about that but some of them are so long i couldn't get them to fit.. any tips on that? just make them all small also? and helper is so big cus i couldent make it readable lol when it was small the shadowing was hideing it.. and i gave up LOLOL
  3. 2 points
  4. 2 points
    Thank you both! Great quality of life improvements @Tater Pie @Erza
  5. 2 points
    It has been my pleasure to work with this community and staff. I will continue to satisfy alongside my colleagues for the betterment of the community and it's prosperity.
  6. 1 point
    So Kai has stepped down as owner of RSPS-Community. We are sad to see him go but he will still be around a little I believe. I'm assuming ownership of the discord and forums, and I want this forum to be community driven so I'm going to remove the owner rank and just keep my current administrator/CEO rank I have not really been around much lately and for that I apologize but I won't be giving up on these forums or the discord. I think we can really impact the whole scene with this community. The hosting is cheap, Kai and a few others have told me they don't see the point anymore the hype is gone but it's not like this site costs a lot of money to run, and I'm personally not trying to profit off it. Any donations have and will always be spent to pay for the hosting and domain and other services that going into maintaining and advertising the forums and discord server. That is my promise
  7. 1 point
    Too much for me to understand but amazing tutorial.
  8. 1 point
    I like your style but you gotta come up with some new effects xD the simplicity is perfect tho all your attention is drawn to the content
  9. 1 point
  10. 1 point
    Yo i love these, they are simple and elegant, the overall effects are subtle enough to not distract you from the content.. A+ 5/5
  11. 1 point
    This is an idea that has been circulating around the staff and developers of this community privately and I've decided to go public with it, the basic idea is this: A framework where everything in the server is based on json scripts(i.e, quests, skills, actions, emotes, literally every aspect of the server) dynamically. This would allow anyone who doesn't know how to code to simply come to our site and within minutes buy and host their own unique server and purchase plugins for it to have the features they want, at a low price. Then our in forum currency could be used to trade mystery boxes and used as a reward in a wheel of fortune contest etc, then redeemed in any of the servers hosted by our service This basic concept has been attempted many times by developers over the years and actually the grounds have been layed many times by namely, graham, varek and a few other developers that wrote script based frameworks way ahead of their time, apollo is one of those but I feel like being written in java the leech rate is extremely high... If we write it in C# at least we'll be forcing these kids to learn something new Fortunately me and @AzureCrux have already been working on a C# framework for the #317 revision and its been at a standstill for a few weeks but I've become ambitious and I'm going to spend the hour or two a night of free time i get working on this project and anybody who wants to join us in this project let me know. The framework isn't exactly set up for this project at the moment but it's still in it's early stages anyway and can easily be changed to suit our needs Some of the features that this framework already has but may need to be improved upon: Good thread & task management concept Decent connection reactor concept Great data structure concept (easy to understand, organized and minimal code) Working 317 jaggrab & ondemand - this needs work and should be integrated into JSON like the rest of the server 317 Player updating concept - doesnt work needs to be fixed and jsonized 317 login protocol - needs to be JSONized Functional RSA & ISAAC Some pictures of shit we done so far(very little): I will be working on this with @AzureCrux and updating this thread periodically, stay tuned!
  12. 1 point
    To kind of elaborate on the goal a bit... The driving idea behind this is having modularity. If you look at other scenes like World of Warcraft, you'll see that their main emulators (MaNGOS, for example) has a small team that develops the core of the emulator, and the community takes that developed core and writes the game content in via scripts. We want that same deal, but we (being ambitious) want to take it a few steps further. All of the expected things have to work... Cache loading and streaming, Encryption, Anti-bot features (added in newer client revisions). We aim to have the engine be compatible for all old-engine content. You can throw a cache from 194 and the server will automatically generate the CRCs for streaming the cache to clients that connect. Your revisions will be like a plugin, so if you want a 474 you provide a JSON file with the packet data for your desired revision. Then from there, we want to have everything that you can put in-game be scriptable. Want a quest? you could just do something like { "Quests": { "Cookie the Monster": { 1:{ "Alter_Speech":{ "NPC_ID":4332 "Question":{ "text":"Me love cookie! Do you know where I can find cookies?" "Speech_Anim":{"Target":0, "Anim": "Crazy_Rolly_Eyes"}#0 for NPC, 1 for Player "Option":{ "text":{"Err... I might know a baker in Lumbridge?" #ETC, ETC } } } } 2:{ } } } } Of course, we haven't established a scripting language for something like this yet, but a quick tool can be put together to add and edit these files to generate your these script bits. Once I'm settled into my new house, I'd like to treat this project as more of an open discussion. As we design, I would like to show you all a bit of how we determine what we want to do, identify any problems that will cause road blocks, and how we solved for those situations. I wish I have time to get into more detail but I'm moving through the weekend and will be tied up. If you have suggestions on how we present or discuss, please let us know.
  13. 1 point
    This is sick dude, I'll be reading up on this as you post.
  14. 1 point
    Yo these are gorgeous
  15. 1 point
    What do you guys think of these? 1 of my first creations
  16. 1 point
    These are actually very nice considering that you are still new to photoshop. I know I fixed up the Admin one for you, but to replicate that line on every other userbar you could take the eraser tool and lower the hardness to 0, and then lightly erase the sides of it to give it a nice glow effect. Also the text seems poorly aligned in some of them, for example the Ex-staff, owner, and sponsor. I would also keep a consistent font size throughout the userbars, For example, helper should be the same size as Owner, Admin, etc. But I like the way you presented the icons. Nice job! I hope to see more of your work and I can't wait to see you improve as a designer.
  17. 1 point
    God damn, that's a clean piece of work!
  18. 1 point
    I do absolutely love these!
  19. 1 point
    these are awesome.. I would like to modify our icons a lil bit and have ones similar to that and have custom icons for all our boards in the forum. that would be cool. kinda like sythe
  20. 1 point
  21. 1 point
    I like that you have taken the time to leave this rather detailed suggestion thread. I will definitely review and talk this over with @Tater Pie Thank you so much for your efforts.
  22. 1 point
  23. 1 point
    Loved the "Never Lucky" transition in the beginning. Made me laugh. Very nice video, informational about the server which is good and the content from you is never lacking. I love it man could watch them all day, keep it up.
  24. 1 point
    These are gorgeous I actually wouldn't change them at all. I don't mind the re-use of the sparks cuz they look like snow, overall very pleasing to the eye 5/5
  25. 1 point
  26. 1 point
  27. 1 point
    Well it hasn't been long since my last updates but I was up late tonight and contacted @Erza and we spoke about fixing a few things, and he hopped on anydesk and helped me solve every issue we've been having with the community, and the theme he created for us. Some of these weren't even necessarily problems just things i wanted to spiff up so here a list of those changes: Fixed the background image loading issue Updated the community from 4.2 to 4.4 and @Erza showed me how to upgrade for future reference Removed cloudflare to improve loading times and deployed a different brand of ddos protection Fixed the mobile responsiveness in the theme Fixed chatbox rules not showing up Removed the trader feedback border/background to improve looks of the postbits Added invitation/referral system Fixed image caching improving load times for the toplist @Erza did 90% of this I just watched and learned and helped where I could so a big(huge)thanks to Erza
  28. 1 point
    It was crazy. She ate it
  29. 1 point
  30. 1 point
    Nik I quit making banners because of this gorgeous piece of work lol you put me to shame
  31. 1 point
  32. 1 point
    lol'd "this kids name is uhhh......... phat dik... ya"
  33. 1 point
    Agreed. I feel like the misty explosions are too much as well, this banner would look just fine without the sparks and explosions, simply with shuffling text and the fiery slash that separates the contents would look amazing.. and yeah i didn't notice the font until you pointed it out but now that you mention it that all white font on the horizontal banner is atrocious but before you said something i didn't even notice it XD I feel like the play button is trying to avoid my mouse to keep me from clicking it XD
  34. 1 point
    Nice job kid, proud of you.
  35. 1 point
    Jesus. I wish I had a better computer to be able to do and follow this tutorial. You did a great informational thread. I love it I hope it stays updated my man. Would definitely help out beginners.
  36. 1 point
    Everything flows so we'll, the color scheme, the button, the logo especially. It's all very well done. Only thing I would change is maybe the particles moving over the banner. That is a little out of place, or just slow it down. Other than that the font transitioning is very smooth I love that. You did very well on this man. I like it.
  37. 1 point
    I always appreciate your feedback and am glad your always one of the first to comment on these haha.
  38. 1 point
    I love how you keep changing it up and keeping it fresh man. Actually this one might be my favorite so far honestly, i don't like that you recycled the overall style from btowns banner but it looks WAY better on this one and i don't mind the all blue color scheme so much where its smaller and more compact, and animated. 5/5
  39. 1 point
    i love the blue i just think maybe like the side where the character is could be not colored blue to kinda bring contrast to it maybe make the logo a different color as well to brighten that up a bit and bring your eye to it i love the blue its just too much blue for me i think it looks good though and I'm no gfx'er just giving my 2 cents from a personal style standpoint
  40. 1 point
    Late welcome from my side
  41. 1 point
    Welcome Zeeks! Made me chuckle a bit when you mentioned Allstar, did you ever play Frugooscape?
  • Create New...

Important Information

By using our forums or services as a guest you agree to our Terms of Service: Terms of Use Privacy Policy: Privacy Policy and Guidelines