AI Collector - Progress:
I want to start off by saying the majority of the hours of this project was put towards trying to get the AI behaviour tree to work, which in the end I could not. I spent some hours working on the UI and animations, so I can show you that working. Furthermore, I can show the resources I used for the AI collector, but I can not really show it working. I wrote the scripts, but they do not function in game.
To start with this project, I worked on the mouse placement system, as it will be the main way the player interacts with the world. For the assets in this project, I am using an asset pack by BlackThornProd I got send through an email newsletter. For the idea, he offered a challenge to create a game where the minion collects material which can be used to create buildings. The building provide more minions and gold which can be used to build the churches which provide prestige. The player goal is to get as much prestige within five minutes.
Here is the game as it was before I scrapped it. The video shows the menu UI slide-down with an animation. For this, I created a title in Photoshop using a premade template, adding my text and experimenting with the colour. I animated this in unity, adding the house as a child object. This had its animation so it slid to the right position. I added some UI for my name and BlackThornProds name to credit the assets. I animated this to slide up in time with the title.
For the trees I created an object and added a script, the script will get a set of prefabs and randomly add them to a set of spawn points. The script used a random range of random prefabs using the Unity Engine. Random. Range. It would then ensure that the point did not already have a tree object at its position. After I did all this, I attempted to switch the project to a tile system. So I used the random generator and followed the prefabs using the tiles.
There is a script that sets several predetermined minions that the player can spawn. The idea for the game was that each time the player placed a building, the number of minions would rise. I did not manage to implement this feature, but I got the placement working. The script would detect the players' mouse click, then would count the number of spawned minions up. If the number of minions was too high, the spawn code would not be called.
I added a list of materials in the corner. These would increase as the player collects them and will deplete as they use them.
I had created a side menu showing the buildings and the cost of said buildings. The idea was to have this menu slide out in parts as the players got the information. I did not manage to get this implemented before I scraped this project. The UI would have looked similar to the UI I managed to implement.
Here is the video series I used for the collector AI: This video required some code for GitHub and other videos which can also be found below