A ton of stuff was accomplished today. My goal today was to merge the inventory and the chunk systems and make them work flawlessly together. I'm happy to say that that plus a few more things were accomplished.
For some reason, when I opened the inventory project for the first time in several months, it was a bit bugged - some of the scripts were messed up. I'm not entirely sure how, but I fixed them. After not working on the inventory system for so long, I forgot how many of the components of the system worked, so I had to refresh my memory by looking at all of the scripts. Once the scripts were fixed I optimized the inventory system by stopping it from loading the inventory files every tick (which is very heavy on the performance). I still think that it can be optimized further, but it's fine for now.
After the optimizations, I imported all of the chunk scripts/objects into the inventory project. For any long-time readers, you may recall that in March I created an object-based block system. So, when I imported the chunk system, I had to program the inventory system to be able to handle the tile-based block system. It all works flawlessly now, with tiles having the same capabilities as the object-based blocks. The only object-blocks that cannot be converted to tiles are interfaces: chests, furnaces, etc. I still need to work on being able to save those.
I also noticed that checking for collisions with tiles can be very resource intensive, so I created a few scripts that can check collisions way faster but at the cost of accuracy. For example, items and the like don't need extremely precise collisions, so they can utilize the fast collision scripts. However, objects like the player need very precise collisions to move properly.
In addition to the merge, I also added rarity tiers for items. You can see the rarity of an item by hovering over it in the inventory. Check it out!
July Monthly Recap
February's task is to improve the combat system and create a system for enemies and their AI.
The author of the blog is Niften, or Sour Apple. He posts weekly, usually on the weekends on Saturday.