Shelter/Holding , the second to last major overhaul

posted in davidkilmer
Published November 05, 2019 Imported
Advertisement

A shelter/holding is something that you can either sleep in ( a function not yet implemented ) , a shelter, or a holding , something that you can store items in. I decided that these two things were to be together since a shelter can be both, and a backpack or tresure chest can only do one.

I am starting to see how the GUI is as important as the game itself, since it is so much in part of the player experience. That being said, I should have thought out the design of the GUI a lot more instead of diving straight into it. There are a few things i know I can fix in the current state of the game, but, I am positive we will find things to be absolutely horrid as we persist and will need a serious change. That being said, it is a prototype, and in the end, a polished version of this game will require a brand new code.

I have learned a lot in this process, and so much so, that as I write more code, I realize the mountains I have created, I have created not-so-well. The more recent parts are a lot better and more sound, and now this system ( the holding system in particular ) is being built in a slightly older system ( the inventory system ) in which I did things that are not the most sound code I could have done. This is okay, but it definitely makes developing a new game for the polished final product a must.

So the Item_Object class is now utilizing a UseType enumerator, in which Fire is part of, namely , “fire_starter” . Something that can light a fire. This is now a new function “shelter/holding” . This will trigger the inventory panel to come up when the player collides with the item ( a shelter, or a chest ). The items being held in the holding will be stored in the mapped_item of which it associated with. This way, if it lights on fire, they are all destroyed. I think this is the best way to do it, and maybe serializing the items individually and creating associated lists would have been a better route, currently, nothing runs on the idea, so it is less work to do it this way ( possibly more work down the road, fingers crossed ).

Firstly, we need to set this up. I decided to set a new script that is attached to the mapped item of the holding titled shelter_holding_manager , this way, the items within that holding will disappear if it is set on fire. It also allows for a new set of items for each holding in a manageable sense. So far, so good. We can move items from personal to the holding and visa versa, no problem.

So, yeah,… shelter is looking good! YAY! Now we need to add sleep, which will have to be simplistic for now, as to allow for getting woken up by wandering beasts or rain depending on the type of shelter. But I think this is a good spot to close out the post.

Thanks for reading!


View the full article

Previous Entry Burn Some More!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement