Simple AI Resource Gatherer [SUMMARY]

28/10/2018

The goal in this series is to make a Gatherer unit with the AI to gather resources of various types and drop them off at a storage.
Then in the end we will take everything and make a nice simple ecosystem where we gather resources to Construct a Tower which in turns spawns a new gatherer that can gather more resources and so on.

Comments

If you have any questions please post them in the comments and I'll do my best to answer them

Micro Farmers

Perfect for so many ideas I’d like to explore, thanks again

MikoGot

Coolio, can't wait to do samething similar :)

Tim Fox

okay, I'm comparing code to what I've made from following your tuts and without using your utilities, I'm also converting it to 3D.. My game breaking error right now is the resourceNode cannot convert to unityengine.transform in gathererai.cs

Code Monkey

The ResourceNode class does not inherit MonoBehaviour so it cannot be cast to Transform.

Tim Fox

Is FunctionTimer a version of a tick system built-in to your Utils?

Code Monkey

It simple triggers an action after some time, so: FunctionTimer.Create(SaveGame, 100f);Would trigger the function SaveGame(); after 100 seconds.

Tim Fox

Is the Royale aspect of your game the same sense as a Royale like in Fortnite with a shrinking field to force a choke point?

Code Monkey

Yup, it's like RollerCoaster Tycoon but instead of RollerCoasters they are Attractions and Arenas based on Shooting Weapons. One of the Arena Types is indeed Battle Royale which features many guests all fighting each other and a shrinking circle.

Tim Fox

So is FunctionPeriodic in your Utils and is it just shortcoding a coroutine or invokerepeating? Do you Utilities work with a 3D Unity project? Will you be making a 3D project at anytime? possibly after you release Battle Royale Tycoon?

Code Monkey

The FunctionPeriodic triggers an action every certain amount of time, so if you want to spawn a popup every second it would be as simple as:FunctionPeriodic.Create(SpawnPopup, 1f);It is essentially a repeating coroutine but I find the coroutine pattern to be needlessly confusing so the code for the FunctionPeriodic is extremely simple.Most of the utilities have nothing to do with 3D or 2D so yeah they work no matter what.There are some 3D aspects that I would like to try out as a personal learning experience so maybe in the future there will be some videos on it.The utilities are free so you can just get them and check out the source code.

Im from Colombia, I really love your videos, nice work! But don´t give up on this project, because I know a lot of youtubers like you that make these kind of videos, but they do not finish it because they don´t have a lof to views on their videos or staffs like that.. I hope you don´t be like that. Because there are people like me that loves re-make your tutorials for learn. Really good work!!