Hello,
I finished work on inventory system, this is the list of supported features, which I added while working on it:
- monsters have a chance to drop items/currency
- dropped items with name labels are displayed on the ground
- inventory UI with currency and items slots
- players can pickup items/currency from the ground. Picked items are displayed in the inventory
- not picked up items are removed after 30s
- items can be moved between inventory slots
- all picked up items are immediately persisted. In case of server crash they wont be lost. Saves are performed asynchronously and are not affecting engine loop. Players are seeing persisted inventory state.
UI changes are written in MVI pattern. I really like it and i think it suits well for online game. I will rewrite other UI parts to this pattern.
Also while recording this video i found one bug. Dropped item removing counter is not cleared after item pickup. So if player will drop it again within 30s, item will disappear earlier.
Top comments (0)