Hucaru / Valhalla

A Golang MapleStory (v28) server
MIT License
274 stars 71 forks source link

Items drop onto correct foothold #36

Closed Hucaru closed 3 years ago

Hucaru commented 3 years ago

Currently items drop at the position the monster dies or player drops from which can lead to items floating. They should instead look for the foothold beneath them (possibly also on) and attach to it.

Hucaru commented 3 years ago

Spending time understanding footholds and how they are grouped has yielded the following:

ellinia_footholds

graph

Foothold maps for 101020000

Hucaru commented 3 years ago

footholds_1 footholds_2 footholds_3

Hucaru commented 3 years ago

Current approach is inefficient for large maps, if assigning footholds to a histogram where bins correspond to x position then for map 101020000 it would look like:

histogram

Maximum slice length to traverse would be 30 with an average of ~10 when compared to the naïve approach of iterating all the footholds in the field and comparing against one another.