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 - xoft - 03-08-2013 I think it'd be easier to have only the active behaviors in the list, so that each tick they get executed, and a higher-level AI controller assigns behaviors to entities based on the entity surroundings. RE: New AI for Mobs - FakeTruth - 03-08-2013 Add a function GetPriority to each behaviour and make it return a float value based on that behaviour, the current state and the surrounding or whatever that behaviour thinks is important. After you got all priorities, execute the behaviour with the highest priority RE: New AI for Mobs - keyboard - 03-08-2013 (03-08-2013, 03:22 AM)FakeTruth Wrote: Add a function GetPriority to each behaviour and make it return a float value based on that behaviour, the current state and the surrounding or whatever that behaviour thinks is important. Yeah, I can also make a priority queue and just grab the item. So I've been looking at the code and I figured it out why the mobs were just jumping up and down. The HandlePhysics function wasn't getting called, so they were not changing positions. As a first step, I would like to streamline the moving process for the mobs, and create the helper functions that the behaviors will use. Also implement a path finding algorithm. I'll update this thread with the latest news. RE: New AI for Mobs - xoft - 03-09-2013 That might have been my fault, I was trying to streamline physics into every entity, so that each entity would call its virtual HandlePhysics() function, but I guess I messed it up for mobs. Maybe even for pickups. Anyway, I guess one of the very first things on your ToDo list should be figuring out what part of the entity is the pivot point (entity position) really pointing to - is it the XZ center and Y bottom, or Y center as well? That affects quite a few things. RE: New AI for Mobs - FakeTruth - 03-09-2013 Bottom, just like the player RE: New AI for Mobs - keyboard - 03-09-2013 Yeah, It looks like there are some bugs in the physics functions. I'll have to fix those first before going for the AI. I agree that the pivot point should be at the bottom. I have a question. I was going over the protocol for entities and i found this one: "Entity Velocity (0x1C)". Do you guys know what is this packet for? RE: New AI for Mobs - xoft - 03-09-2013 It sends the current speed of the entity to the client, so that the client may animate the entity without the server flooding it with "position" packets. There's an issue with that packet, though - it's not really known in what units the speed is measured, the protocol website says one thing, the vanilla MC sources say a different thing, and the actual data on wire say a third thing. Here's my findings summed up: https://forum.cuberite.org/showthread.php?tid=434&pid=6597#pid6597 RE: New AI for Mobs - keyboard - 03-10-2013 Yeah. I saw that... maybe we should experiment to see what the correct values are... RE: New AI for Mobs - keyboard - 03-25-2013 Now that we have the packets sort it out, Now I am going to make sure that mobs can move without animation errors, and implement the helper functions that the AI and behaviors will use. RE: New AI for Mobs - ravey - 08-13-2013 Hey keyboard, I was just wondering if you ever got any further working on this stuff? I'd be very interested in helping out on the AI stuff |