New AI for Mobs
Well, I was putting it in a class, but it was the behavior cPathToPosition
Reply
Thanks given by:
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 Smile
Reply
Thanks given by:
Yup, good job guys Smile
Reply
Thanks given by:
So here are the sections that I can currently think of as needing to be "componentized":
  • Movement Types
  • Attack Types
  • Reactions to events (OnHit, OnEntitySighted, etc.)
  • AI Logic (How it selects which actions to handle next)

What are some other things that y'all can think of to add?
Reply
Thanks given by:
Maybe a configurable element that determines if entity can be breeded, and the id of the object needed to breed the mob.
Reply
Thanks given by: Taugeshtu
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.
Reply
Thanks given by: tonibm19
Great idea!
The problem is that is very difficult to implement that...
But if implemented, MCServer would have a better AI than vanilla.
Reply
Thanks given by:
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. Smile
Reply
Thanks given by:
There's an issue to be considered when leaving a pressure of Sam Smile 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.
Reply
Thanks given by:
Ok, so what we have so far:

MobComponents
  • Movement
  • Attack
  • Reactions/Interactions
  • AI Logic
  • Mob Base (Determines which model to use on the client-side, along with collision handling?

Configurations
  • Ageable
  • Food/Breeding Items

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.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)