Player, Item Drops, New Saving System and More...


Update 6:

What's New:

  • Player
  • Item Drops
  • New Save System
  • New Loading System
  • New Inventory Mechanics 
  • New Custom Collision System for Tilemap
  • New Stone Block
  • New UI
  • Player Hotbar
  • New Items Textures

The Player & New Collision System

I decided to keep away from doing the player controller until later on in the development once I had all the systems in place for creating and destroying tiles. I also had to decide if the game would be using the default collision system, however using unities default tilemap collisions caused high amounts of lag each time new tiles were loaded into the world causing a choppy experience when moving around, though it was a massive amount of lag and only causes a small hiccup I still didn't want any lag within the game. 

After choosing to use my own collision system for the game, making it so I don't have to create box colliders on each tile anymore made the game run lag-free. Only having to check whether or not a tile is under the player is way more efficient than the built-in collision system and tilemap collider generation. However, using my collision system I had to create a non-physics-based character controller in unity since I wasn't able to use a rigid body for the player's movement anymore. This was very simple to overcome and I ended up creating a smooth character controller where the player can move and jump and has a velocity while checking for collisions.

Not all the systems for the player are completed yet... however won't be long until I finish them up.

Items Drops

To give the inventory some use since before this point it only could get items if added manually, you can now pick up items from the ground and will automatically be added to the player's inventory. When the player destroys any block in the game it will drop an item on the ground of that item and can get picked up by the player. 

New Saving & Loading System

The main issue with the old system was that it wasn't very efficient and caused for loss of save information because it would only save the tiles which were present on the screen, which meant that it would cause dupilacations of physic-based tiles. This new saving system now saves the background and foreground tiles of the game using the chunks which hold all the world data. this means that we can generate the whole world once and reload all the data saving time on world loading. this new system also means that all data of the world can be saved and means that even tiles which are not loaded in but have been updated will be added to the saved data.

I also switched the saving system from JSON to binary, this makes it harder for people to hack into data in their game saves. Also binary is more efficient and faster than JSON files.

New Inventory Mechanics

I added a few more systems to the inventory scripts, these include dropping items not having enough space to add them to the inventory, and the ability to set up a backup inventory. a use case of this is the hot bar, once the hot bar is full of items the next place the item will try to go is in the main player inventory. 


Hotbar

The player now has a hotbar which can be used to select which item the player is going to use. This system works similarly to Minecraft and Terreria. The selected slot now gets highlighted to indicate to the player what slot is currently in use. 

Stone...

Yes, I added stone to the game, however, this wasn't as simple as it first seemed to be. Since unity rule tiles don't work with other rule tiles I had to create a script which allowed for multiple different types of tiles to work with each other allowing for them to blend seamlessly. After creating this new advanced rule tile script it has allowed me to be able to create more advanced tiles in the world and I will be updating the tree textures so that they can blend and look more like an actual tree.

UI

Added new inventory UI.

Items Textures

  • Wooden Pickaxe
  • Wooden Axe
  • Wooden Sword
  • Wooden Hammer




Roadmap

To make it easier to view the progress of the game there is now a website showing what has been completed and where I am at:

Roadmap Link

Get Tile Engine

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.