Full Maplestory 2 Mesos Stock, Cheap Maplestory 2 Mesos - Instant Delivery + 100% Legit + Cheaper Price!

Improve algorithm for the "loot" process

I've heard about the rumours that items that drop from mobs will only stay for 30 seconds instead of the normal 180 seconds (or somewhere around that I'm not sure).

What's really funny about this is that people are saying this was the solution to the massive "loot lag".

Okay, okay. So assuming the normal duration was 180s, and assuming for that duration you constantly kill mobs at the same rate, the max amount of items on the ground will be reduced to 30/180=1/6. Does this help at all?

I honestly don't agree. Pet loot already lags while picking up 10 items from a total possible items on map of 20. It may depend on your hardware and network however.

 

Regardless of whether this so-called solution fixes the loot lag, everyone should agree that this is THE typical Nexon-approach of fixing problems: fix the problem on the surface, break every related AND unrelated components in game while significantly nerfing game experience. Think of what they did to Kanna and Kishin lately. Think of what they do when they nerf training maps because it was too popular, instead of buffing other unpopular/outdated maps so people can spread while not having their exp gain rate reduced, and then reduce the exp required to reach to Lv200 because it's too hard to level with all the maps nerfed. Really? This is the most stupid approach of every problem. Of course balancing every maps in the game is impossible and impractical, so one map will always be better than others. Of course Nexon will then nerf that map. Infinite loop of stupidity?

 

Back to the topic. Assuming from players' experiences that you lag when you pick up items while there are a lot of items on the ground in the whole map, I can only say that Nexon developers just can't be bothered to actually write some decent code, and just focus on adding more broken buggy contents.

 

Okay back to the topic again. Assuming from players' experiences that you lag when you pick up items while there are a lot of items on the ground in the whole map, I guess the looting algorithm is the most basic one that everyone can think of: "yea just loop through all the items in the map and then do a collision detection with the pet, and if it collides, while still inside the loop send a request packet to the server that the pet is trying to pick up ONE item".

If that is the way it is actually implemented, please do consider my suggestion.

Please, instead of storing all items in the map in an array, use a tile-based hashtable.

It works like this:

Assume a pet as a hitbox of m x n pixels. Let w = m/2 and h = n/2. Now each tile has the dimension of w x h. Note that this dimension is just a suggestion.

When items are dropped from monsters, they are placed on the map, right? Each map should have a hashtable (not a 2D array please MS client is already using over 1.2GB of ram), and the item should be added to a virtual "tile" according to its coordinates. For example, if it was dropped onto (67, 43) and the tile is 20x20, the item will be added to the array `items[3, 2]`. Just in case, of course all this is being done on the client.

Then when the pet is moving, check for the "tiles" it is colliding with. Since m*n = (2*w)*(2*h), the maximum number of tiles it can collide is (2+1)*(2+1)=9. Now, think. What do you think performs faster, looping trough 500 items or just doing 9 hashtable lookups? Heck 9 could even be decrease to 4 if you make w = m and h = n. 

Now about sending the packets. Ignore any null entries in the hashtable (meaning out-of-bounds or no items placed), and you're left with 9 or less arrays of items. Send a pick-up request packet of all items in the 9 arrays (pick-up-able ones, of course) in one batch. No more one-by-one request because it-works-well-on-my-computer-because-it's-sitting-right-next-to-the-server. Please make sure to GC empty arrays and if not re-use it instead of assigning a new one becuase I'm sick of memory leak - as for the latter, I'm assuming unmanaged context of course.

 

Because:

1. The KMS public servers (not KMST) didn't get the 30-second expiration of all drops. They only had their event drops, which used to expire in 15 or 20 seconds, extended to last 30 seconds.

Since GMS rejected the fast-expiring event drops last summer (we got it by mistake and after two months it was restored to normal), we have good reason to hope our drop duration will not be affected by V update.

 

2. You are misdiagnosing the problem.

 

The problem of many items on the map has nothing to do with loot. It's just many items on the map that constantly have to be re-displayed. 

 

"Loot lag" is due to the client checking every item picked up (including maplestory meso) against every active quest, to see if this item is required by that quest.

We know this is the problem because people who have a completely empty quest list (due to a glitch) have zero loot lag. And people who cleaned out their In Progress quest tab as much as possible (by completing or forfeiting quests; can't completely empty it due to the Maple Rewards quests, however) notice a great improvement in their lag.

Another clue is that people who have no pet out at all and are not looting themselves, but are partied with someone who is looting (including maplestory mesos, which are shared with the party), suffer loot lag as well.

 

So if you want to suggest a new data structure to improve loot lag, focus on that quests<->items relationship.

Obviously scanning the entire quest list for every item is the most inefficient way to do it.

Some kind of hash table or indexing by item ID (which then points to a list of quests that need this item ID).

Related News
04
Apr

MapleStory-related question: Basilmarket Q&A troubles

How am I suppose to know the answer to a MapleStory-related question in my mind if I can't even ask it on BM?

11
Apr

What I think would be a nifty tool in Maple would be a character storage system

What I think would be a nifty tool in Maple would be a character storage system that holds characters when you do not have enough visual slots.

16
May

Cash Trades or Transfers in Reboot

we need a system where we can, in Reboot put up the cash items for a swap of some sort. Either through classic Maplestory Mesos for clothes or for the clothes for clothes swap.

28
Jan

Maplestory Familiars Remastered

This is my idea summed up (the minor details are not to important). I feel like this, or something along these lines will really make familiars a more interactive and useful addition to the Maplestory

17
Feb

Ghost Ship Exorcist badge quest- Repeatable/Reset

A suggestion I have for the Game Team is to consider making the Ghost Ship Exorcist quest repeatable or reset it for those who have destroyed their badge

01
Jul

Maplestory Miracle Cubes and Potential need massive changes

Now some people may argue that you can craft these cubes, but the reality is that the people who craft them are generally high level and high funded players anyways.

Leave A Reply

Maplestory2-mesos Top News

29
Jun

July 18 - MapleStory Closed Beta 2 Will Come to Us

I have some big news guys, Nexon America has just announced that MapleStory CBT 2 will arrive on July 18, and it continues to August 1, 2018. Yes, it's still a few weeks away, but I am so happy now because MapleStory is my favorite game, I even create a website to offer MapleStory 2 Mesos to all players

21
Jun

All You Want to Know About Dungeon in CBT 2

Most of the Maplers are so excited with Maplestory Closed Beta 2, they are eager to know more information about CBT 2, which would be the key to save this game - yes, I'm gonna have to be frank, MapleStory is on the verge of death for a long time.

13
Jun

MapleStory 2 Class Guide

This is a full guide about MapleStory 2 class, if you are a new player and have no ideas on which class to pick, you are in the right place, Maplestory2-Mesos will tell how to choose a suitable class for yourself, and you can also get MapleStory 2 Mesos from us too.