wheybags / freeablo

[ARCHIVED] Modern reimplementation of the Diablo 1 game engine
GNU General Public License v3.0
2.16k stars 193 forks source link

Issues with inventory after refactoring #358

Closed Predelnik closed 6 years ago

Predelnik commented 6 years ago
  1. Removing hotspot change was in my opinion wrong decision. Technically as I mentioned in comment this behavior is not the same as in game. But emulating it is pretty hard (and requires forced cursor movement which may not be a good thing). Current problems due to this: If top-left point is outside of inventory or slot item will never be placed which is not true in original game and is done if center is inside inventory or slot: image Huge unintuitive movement of cursor when taking item especially clicking on bottom-right corner of the item: image Clicking leads to: image

This behavior is far from unnoticeable in my opinion.

  1. Now items could not be placed in the belt at all if taken from it.

  2. The same problem with placing buckler as before: image

  3. Warrior starts with shield in inventory and not in hand.

wheybags commented 6 years ago
  1. Agreed, but my plan was to hilight the squares under the item which imo will make it much more intuitive. I was goign to do this in the same pr but I decided to leave it as it was getting quite huge already.
  2. hmm, not sure what happened there
  3. ah yes, I forgot to fix that, should be a one line change

EDIT: wtf, that 3. above should be a 4, but markdown is messing it up somehow

Predelnik commented 6 years ago
  1. I don't get how squares would help with issues I mentioned if item as cursor is tied to top-left corner - if you click above inventory it will still not work and without changing cursor position forcefully while clicking on bottom-right corner of the item, item cursor will still visually move huge distance if clicked.
wheybags commented 6 years ago

Sure, it wont work but you won't even try as it it'll be obvious that it won't work. As for the item jumping when you click it, it's always going to happen to some degree unless we do super fancy adjustments for where you click it, which personally I don't think is worth it.

wheybags commented 6 years ago

Anyway, I'm not saying it will work for sure, but I'd like to try it, as it keeps the code simpler. If it doesn't play well then we can do some fancy click position adjustment. Mainly, I'm trying to get the inventory code/gui ready for the new multiplayer implementation (and I'd like to finally make a release after that, this time one that's almost playable in multiplayer, which would be a big milestone). Either way I think hilighting the squares underneath would be a good addition.

Predelnik commented 6 years ago

Well, I don't agree. This incorrect cursor handling in inventory was the first thing I noticed when launching Freeablo with librocket back then or DGEngine (maybe the author fixed it there since then but I don't know) and that's why I tried to make it work more or less as in original game. If it's not the priority then fine.

wheybags commented 6 years ago

Ok, I split the remaining issues here into two new ones, #360 and #361, so I'll close this one.