Re:Random Ultima Online anecdote #2 – Horses inside players ...
by Chris2048 on Thursday June 23, 2022 @11:34AM
(#31850585)
You'll still have to modify that code to apply to containers, versus a a set/array that your language probably already supports
[ Parent
| on HN ]
Re:Random Ultima Online anecdote #2 – Horses inside players ...
by db48x on Thursday June 23, 2022 @04:33PM
(#31854772)
Sure, your language has some kind of lists or arrays or whatever, and you could use one to store an inventory. But the UI designer decided that the player should be able to rearrange items in their inventory, so now you have to store a position for each one. And it has to have a background image, and such. But that’s what a room is! The room itself has a normal array of items and an array of positions, or something similar.
Sure, rooms have a few extra features that containers don’t necessarily require, such as the ability to have exits. But that’s ok, the list of exits can be empty. No problem. Even if you enumerated all of those extra features you might not realize to document that nobody should ever put _actors that can move around on their own_ into a container.