Original Post — Direct link
about 3 years ago - /u/JagexZuko - Direct link

I'm thinking about things like this now as a developer. And it's already been a few times where I've thought about extreme edge cases like this for a while and decided "You know what? No."

about 3 years ago - /u/JagexZuko - Direct link

Originally posted by LewisIsFail

What are some notable examples of things like this that just aren't worth fixing? If you would like to share :D

Sure. It's a judgment call, really. So I'll give you both a case where I decided to add in more code, and a case where I decided to let it be:

I added 2 new Shantay Passes with the Tempoross update. During Tourist Trap, the finale of the quest has you 'go to the Shantay Pass' with Ana in a barrel. So if you go to the Shantay Passes at Tempoross, I have her pop out of the barrel and yell at you for going to the wrong place, not letting you pass. This was a rare case I decided to deal with because I really don't want you exiting the desert with Ana in a barrel (using the pass, then the ferryman), and wanted to redirect people if they were confused by it. It was an easy check, not a big deal to put in, and protects several concerning edge cases.

There was another case where I very meticulously checked your inventory for precise room during the Tempoross reward pool fishing. Checking for max stacks of items, checking across every potential stackable item reward you could receive to see if you have it already in your inventory, and therefore can receive more. I even checked the uniques you've already received, whether they could fill the inventory more, and even the dang pet and whether you have an active follower. I did this because I wanted UIMs who were space managing to be able to fish with the least spots in their inventory open as required. But during review, it was pulled up that all that checking was a lot of code that would run VERY often, and although very meticulous, would ultimately be more burden than it would save. So I pulled out all of the checks and just check to see if you have two inventory spaces free for a potential reward. This saved a lot of code, at the expense of making sure people have two inventory slots open. But we left the max stack checks in, as otherwise this'd be a relatively serious edge case, where if it happened, we'd have undefined behaviour.

about 3 years ago - /u/JagexZuko - Direct link

Originally posted by Peechez

Any particular reason you manually write in checks for teleport methods instead of checking player coordinates against the desert boundaries? Seems like a pain

Specifically, for this case, I do indeed do a co-ordinate check for the Shantay Pass but not other parts of the desert. Partially because it helps prevent you going the wrong way. And partially because it prevents exiting the intended area and causing problems. However, if you do get Ana through to the Ruins of Unkah, you'll likely be able to take the ferry and take her on a world tour.

But you are right, that checking desert boundaries is a potential option to deal with Ana.

The question is - What are you trying to prevent? Bug abuse? If we presumed bug abuse with ana in a barrel could occur only outside of the desert, because that's where we see it, it'd be the wrong choice as future content wouldn't necessarily take this into account. Then we're a bit in trouble if we release some desert content that takes advantage of Ana in a Barrel. So fixing the problem with the item in the first place is the priority call to make. Then if someone did find a way to break Ana out by bypassing our area checks, the problem is solved anyway. So in this situation, it was a very soft decision. I'm sure if someone out there dedicated enough wanted to figure it out, they could smuggle Ana in a Barrel into the Ruins of Unkah. But my extra line of code will catch the issue occurring to players NOT trying to break the game.

I can't promise I'll always make the most optimal decision. Sometimes, it's just whatever comes to mind at the time.

about 3 years ago - /u/JagexZuko - Direct link

Originally posted by sebartiaan

Shouldn't you implement some general Player.addToInventory(item) method, in which the needed checks are performed? The way you wrote it, it sounds like every time you create a new situation in which items are added to a player's inventory, you need to re-evaluate what things need to be checked

This is pretty much true, yeah. We add stuff to the inventory all the time and perform necessary checks when doing so. For the most part, we do use plenty of encapsulating methods to deal with various use-cases. There's a lot of ways to add stuff into the player inventory, though. And a lot of reasons to do so.

Sometimes we want to add it in exchange for something else. Sometimes only if there's room. Sometimes we'll add it to the floor, or give it to someone else if you can't hold it. Sometimes we'll turn you away if you can't have it in your inventory. Sometimes we'll turn you away permanently if you can't have it at the time. Sometimes the item is transferred from player to player. Sometimes it moves slot within your inventory as part of some kind of combination... Heck, sometimes it could even be based on things like item weights and other items you already have. State and quest tracking, items added temporarily, it's a lot. So in the end, a lot of stuff is besopke.

Old School RuneScape is a massive game. And to fit the narrative and game design we go for, there's a lot of different ways we can perform a lot of different things. The checks are always so specific because there's just so much content. It's just part of our development process that we have to go through a bit of a checklist to think of potential fail points and edge cases when we work on our design.

about 3 years ago - /u/JagexZuko - Direct link

Originally posted by BugsInABarrel

I'm sure if someone out there dedicated enough wanted to figure it out, they could smuggle Ana in a Barrel into the Ruins of Unkah.

Seems so :)

Really enjoying the insights though, thank you.

Lol, good job. Let me guess. You used another way out of the desert, and then took the ferry back into the Ruins of Unkah?






Recent Old School Runescape Posts

about 17 hours ago -
1 day ago -