New AI for Mobs - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: New AI for Mobs (/thread-820.html) |
RE: New AI for Mobs - SamJBarney - 12-23-2013 Well, I was putting it in a class, but it was the behavior cPathToPosition RE: New AI for Mobs - xoft - 12-23-2013 You know, in a wider sense, the behaviors are kinda the "components" - they were meant to be plugged into the entity and swapped for different ones when needed. Come to think of it, we have "invented" the components system on our own, without the external tutorage. We should be proud of ourselves that we're so clever that we invent stuff that the smart people do RE: New AI for Mobs - FakeTruth - 12-23-2013 Yup, good job guys RE: New AI for Mobs - SamJBarney - 12-23-2013 So here are the sections that I can currently think of as needing to be "componentized":
What are some other things that y'all can think of to add? RE: New AI for Mobs - tonibm19 - 12-23-2013 Maybe a configurable element that determines if entity can be breeded, and the id of the object needed to breed the mob. RE: New AI for Mobs - Taugeshtu - 12-23-2013 Yay, breeding skeleton horses! Actually, we can try something along the lines of "feeding" types. One can restore health, other can make mob neutral/friendly (wolfes. Also, tamable ghasts), third one can be breeding. Also, we might need "interaction" types, for when player right-clicks on mob. I can think of right clicking a tamed horse would change its movement type. Reason to separate it from simply being a RMB hook, as I can see, could be that when you right-click a mob with a food it can interact one way, but when you do it, let's say, with a sword or empty-handed - this should be considered an interaction. This way we won't have to write plugins to simply change mob's interaction strategy with noisy checks about what was used to right-click. Besides, different mobs will have different heal/tame/breed items, checking for those might be a little pain in the ass (most likely somewhat along the lines of reading mobs configs and storing it (again, this time in plugin) in RAM. RAM costs would be almost non-existent, but they will bug me). The other "pro" for interaction types is the ability to make zombie trader for RPG server and whatnot. We find/spawn a zombie via plugin, set hostility for this mob only, change interaction type - boom, zombie trader. Maybe even little friendly zombie village. RE: New AI for Mobs - tonibm19 - 12-23-2013 Great idea! The problem is that is very difficult to implement that... But if implemented, MCServer would have a better AI than vanilla. RE: New AI for Mobs - tigerw - 12-23-2013 Might I suggest that we relieve the pressure on SamJBarney, so he can get vanilla AI working, firstly? Then, we can consider more special stuff. RE: New AI for Mobs - Taugeshtu - 12-24-2013 There's an issue to be considered when leaving a pressure of Sam It's called "architecture" and it's a nasty rock-solid thing. It's better to select an approach sooner than later. Sometimes changes in desing (such as proposed) are worth starting over at given point of progress, sometimes not. Besides, he asked for what we might need as well in lines of suggested system. RE: New AI for Mobs - SamJBarney - 12-24-2013 Ok, so what we have so far: MobComponents
Configurations
I'm thinking any breeding logic would be handled within the Reactions/Interactions section. Some of the configurations will be specific to the MobComponent classes themselves, I should think. Can anyone think of any generic MobComponents that have not been mentioned? Also, I don't really feel pressured. But thanks for the concern, tigerw. Even though I was getting close, I feel that finishing it up would just be a waste of time if we are replacing it with something better. Plus, this time around, I'll be using a branch on the main repo so everyone can contribute and I won't be the only one working on it. That's actually a huge weight off of my shoulders. |