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
17
Mar

Maplestory Reboot Suggestions

On the other hand, if you create a character on Reboot, farm billions of Maplestory mesos on it (Reboot has 5x the Maplestory mesos drop rate) and then move it to a regular server, you have an advantage over that world's "natives" who had to work in other ways for their Maplestory mesos.

11
Jan

MapleStory Elite Boss Level Limit

If this thread does become locked which is of course up to the moderator's decision then MapleStory will have an unsolved problem. And the problem is not only about elite bosses.

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.

24
May

Make the Job Change Tokens from the Gachapon tradable to anyone

Then there's "that guy" who sees the high levels that are paying 1b to job change and go "They're paying 1b, so let's make the price of these job coins exactly 999,999,999 maplestory mesos!

01
Feb

Maplestory Suggestion - Nerf Elite Boss Rewards or Level Range for Rewards

I understand people depend on these Elite Bosses to make maplestory mesos out of them but they shouldn't have to ks the player or cause the player to lag by disturbing their gameplay.

09
Jul

Best Server for a New maplestory player?

Cubes can be bought with Maplestory Mesos, albeit by amounts of about 12 mil and 21 mil for Red and Black cubes (respectively, with Blacks having a higher chance to rank up than Reds) Various other items in the Cash shop can also be bought with maplestory mesos

Leave A Reply

Maplestory2-mesos Top News

23
Apr

MapleStory Rightously Indignant Skill Guide

Want to know how to use Rightously Indignant in MapleStory? Hope your 5th job not affected by Rightously Indignant?

01
Apr

A List of Suggestions for A Better MapleStory

Is MapleStory a perfect mmo game now? Absolutely not, there's still room for improvement in what Nexon can do to MapleStory.

18
Feb

The Poor Launcher of MapleStory

The launcher still forgets I have the game installed almost every time I open it, is often still claiming the game is under maintenance