This was one of the more difficult things I worked on this week since logging and and logging out touches nearly every part of the networking code.
You will no longer just disappear and reappear when you log off and on. Instead, you will sleep in-game.
In the future you’ll be able to loot as well as kill sleeping players.
So you’ll need to seek out a safe place to sleep, or build some sort of temporary shelter until you have a base of your own.
More Armor Types
In the beginning, your pants were also your shoes. I’ve gone ahead and separated them.
You can now equip and unequip shoes with your armor slot.
Shoes will provide various buffs / bonuses, just like any other armor type! Weeeee…
In the future, all clothing will be craftable and upgradable. 🙂
Why stop at shoes!? I went ahead and added helmets as well.
Usable / Consumable Items!
Food & Poisons
That’s one small step for Survivalnauts, one giant leap for the developer! There is now consumable food in the game which will heal you. Big deal right? Well, this means I can now add in a lot of different consumable items such as potions, poison and drinks! In fact, I went ahead and also added rotten meat to the game which damages your players health (a nod to Minecraft).
Basically, the server detects the X and Y position of your inventories ds_grid and acts accordingly.
Dropping items is now a thing. It will only stay on the ground for a few minutes and then disappear. This will be a way to get rid of studd that you don’t want.
In the future, items you do want will need to be stored in a chest.
Now, this wouldn’t be all that impressive if it was a single player game. However, since this is a survival MMO with server-side inventories this is what happens..
1. You select the X and Y of the clients inventory ds_grid and send that to the server.
2. The server sees what you have in this inventory slot and grabs the item id (itemid is a unique id for that item for another ds_grid which contains that items name, hitpoints, who created it, and other info)
3. The server removes this item from your inventory.
4. The server then adds this items id as well as it’s x and y pos to a grid called “floor_items” so that whoever logs into the game later, or loads that chunk will load that item when they’re near it.
4 & 1/2. If someone logs in after you throw the item, near the item, it will send a packet telling them there’s an item near them and where it’s at.
5. The server then detects who is near you
6. Server then sends packets to you, and every other player that is near you.
7. Once you receive the packet, it’ll then remove the item from your inventory and throw it for you and everyone else near you.
Minor Fixes to Inventory
~ You will no longer swing your weapon when you left click while using the inventory or hotbar.
~ When you drag your items, it no longer shows a little man but the item you are actually dragging.
How much of a resource you gather from nodes now depends on the type of tool you’re using. For example, an axe will be better to harvest wood and a pick will be best for ore. Eventually using your tools will damage them, and using the tool for the wrong purpose will damage and break the tool a lot faster.
~ Fixed a glitch with the shaders where the clothes animations were not matching the walking animation.
+ Added a green “Wizirdi Shirt”… Got tired of looking at the blue shirt 😛