How to develop a backpack system?

foreword

I believe everyone is no stranger to the backpack system, who hasn't played a few games? The backpacks in the game are all similar. The simple function is to store the items we have obtained. The advanced point is to have item classification, which is convenient for the player to select the items in the backpack. Expansion function. As shown in the figure below, this is a case of a backpack system we implemented:
backpack example
(1) Item classification, which has already been implemented in the store, just copy it to the backpack;
(2) With currency, a wallet component is required to manage it separately The reason why the player's currency is an independent component is for flexible expansion. Sometimes the game wallet can become very complicated, such as the wallet of Fantasy Westward Journey. When the economic system of the game becomes richer, the game wallet will become very important , so it needs to be independent as a component. In addition, some characters have wallets, and some characters do not need wallets. If they are components, they can be configured;
(3) The concept of weight is to allow players to allocate resources reasonably, store some infrequently used items in the warehouse, or simply sell them , to promote equipment recycling. Of course, players can increase the load through capacity expansion, which is a way to prompt players to pay. Of course, unlimited load is also a design option;

Guess you like

Origin blog.csdn.net/qq_30137245/article/details/130913261