I’ve finally tackled a part of the game that I’ve kept on the back burner for too long… the Inventory system. The inventory has always been an ethereal concept in my mind because there are so many different ways to approach it. Do we go the Minecraft route where you literally carry tons of rock on your back, or should we go for a more realistic approach like Eve Online?
At long last, the decision was made to go with something akin to Eve’s approach. A lot of disbelief has to be suspended to play a space ship game in 2 dimensions, but I felt an overly forgiving inventory system stretched things too far. So, here is what I came up with:
Each tile you mine will yield up to 1 cubic meter of material. There is no way to know how much material you’re going to get ahead of time. Once mined, that material becomes an entity called a container. The container is currently a yellow cuboid shape and lasts for up to two minutes before disappearing from the world. Though a container does not move on its own, forces can act upon it to send it hurling through space, such as explosions and gravity bombs.
Any ship can pick up a container by touching it. Touching the container will transfer all the container’s contents into your ship’s cargo bay. Well, it will transfer as much as will fit. If for some reason your cargo bay becomes full, the remaining material will stay in the container.
Destroying a ship will cause that ship to drop it’s cargo bay in the form of a container. NPCs do not mine on their own, so the only way they will have anything in their cargo bay to eject is if they have killed a player.
Materials in your cargo bay are measured in two ways: volume and mass. The volume of material you can have in your cargo bay is determined by your ship’s hull. The two ships in the game currently have hulls measuring 30 cubic meters.
Your cargo bay can hold an infinite mass of material, as long as it fits in the cargo bay’s volume. here’s the rub: that mass is totaled in to your ship’s overall mass and it will have an effect on your ability to maneuver. I tested this by loading up on a bunch of iron ore. After harvesting ~20 tiles of iron my ship’s handling characteristics were very apparent. I accidentally ran into a few NPCs during this test. Let’s just say that my usually crafty combat acumen was sluggish and sad. I was dead in seconds.
I am very excited to have this critical component of the game online. I still have to create the GUI that will allow you to access and view your inventory. This will be my next big step. But once that is done, we can finally move on to crafting. Huzzah!