Posts

Showing posts from April, 2018

Farm & Farmer AI

Image
Man this one was challenging to do but done it! Features: 1. Farm 2. Farmer AI    1. Farm: This structure produces products. For now it is only able to produce wheat. The player can decide how big the farm should be. For now the cost of making the farm is fixed but in future the size of the farm will decide the cost of making it. Also added Day feature so the crops can grow based on the days passed.    2. Farmer AI: Added another AI. This one tends to the farm. It plants the crop and once the crop has grown to full size it will start to harvest them. This AI also transport the harvest crop to the storage building. Notes:    Will improve the farm feature a bit. Will add farm UI so the player can choose what type of crop to grow and how many workers can work in one farm. Also will add a UI that shows the cost of buildings. And maybe will try to make a bakery building and AI by this week. K Out!

More updates and features

Image
This week it was more about UI improvement and features. Features: 1. Tooltip 2. Material UI 3. Citizen UI 4. Road Improvement    1. Tooltip: Added a tooltip feature. Now when the player hover over the UI elements it shows what that UI element is. So for now it shows tooltip for the build buttons and the stat menu.    2. Material UI: Ok before adding the material UI, I added another material which is the stone material. Needed that to see if the UI is working. So any way this UI shows how much materials can be gathered and what are those materials. So when the player selects the gather all and drags over the materials it will show him/her what is being gather and by how much.    3. Citizen UI: This UI shows all the information of the citizen. It shows their name, gender, age, energy level, health, what they are carrying, the amount they are carrying, their thoughts etc. Also the UI has a follow button. So when the player clicks the follow button the camera starts to f

AI and Material gathering

Image
Some major improvement to the game. Added a new AI and material gathering. Image1: The difference between Builder AI and Worker AI. Image2: The selection area for gathering materials. Features: 1. Worker AI. 2. Material gathering. 3. UI improvement.    1. Worker AI: This AI is a new addition to the game. This AI's job is to bring materials to the placed buildings and gathering materials. This AI is basically kind of a helper AI. Also whenever any AI is carrying materials then their back pack becomes visible which gives a visual representation that the AI is carrying something. In future will allow clicking the AI and seeing its information.    2. Material gathering: For now the only AI that can gather materials is the worker AI. The player gets to select which materials to collect by clicking the gather material button and selecting an area to be gathered, Image2. As of now any materials with in the selected area will be gathered. In future I will let

AI and Structures being built

Image
Like usual any work were AI is involved is extra tricky and needs to be made with caution. So here we have it our first AI. It is a builder AI. For now the AI just looks for any building being placed and if so then it will start to gather the materials and start the build process. Image 1: Showing the Material Stat UI and the Storage Building Image 2: Path of AI. Green: The fastest path taken. Red: The slowest path not taken. Features: 1. Builder AI 2. AI path 3. Storage Building 4. Material Stat UI    1. Builder AI: This AI is responsible for building any building placed in the game world. It will search for any placed building and then locate the nearest Storage building to gather the materials. For now it searches the nearest Storage building within a range from itself. It brings the necessary materials from the Storage building and starts to do its job.    2. AI path: This is the path that the AI follows. From the video we can see that the AI is taking th