Tuesday 28 February 2023

New Trees and Dropping Items

Been working on adding new trees to the forest and the ability to cut them down and collect wood from them. Each tree is saved when leaving the area and will be added to the save file next time I go over them.

I normally go over the saves just before a major release. Saves me time and I don't really want to rewrite the save code every time I add something new to the game.

The trees are drawn in a way that puts the player either in front or behind the tree. Unfortunately I am unable to figure out how to do that with any other moving object, so the wolfs will look like the trees grow out of them. I am sure there is a way to figure it out in the future.

Gif of new tree and material dropped.

All wood is usable in the fireplaces at the Tavern and can also be sold to the tavern owner.

Using the trees as a reference I managed to be able to get items that are discarded to drop at the players feet. This is only doable as of now in the town. Once the code if finalized and working properly I will add it to the rest of the game world.

Gif of dropping potions on the ground.

The gif only shows potions being dropped but it is working on 80% of items that are already in the game. I will also make it easier to discard items. May bring back the right mouse button to do it.


Extra.

All herbs and mushrooms now save their locations when the map is changed. They will also respawn after a set amount of time has passed if all have been picked up.








No comments:

Post a Comment