Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mobs/challenges

Comments in 'General Discussion' started by painapuru, Jan 26, 2014.

  1. painapuru
    Offline

    painapuru New Member

    Joined:
    Jan 26, 2014
    Posts:
    3
    Hi, first of all, thank you for PocketMine, it is a nice piece of software! I had some fun installing it at home and teaching my child a little about servers as we played creative together on our server each on his own tablet. Might open it to his friends to connect in order to safely introduce them to MUG.

    I have a question more out of curiosity.

    I've noticed comments on the latest 0.8.1 compatible release that carts weren't implemented for the same reason as mobs. My question is how far are you from implementing mobs, and, if it is far what is the key challenges you are facing to implement them. I have a technical background, programmed complex corporate systems in Java and other languages, feel free to talk tech, patterns, etc.

    Thanks & keep up the good work!
  2. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    Implementing mobs that just walk straight to you wouldn't be hard, but making a path finding AI for mobs that is fast enough is a lot harder. The pocketmine team is focusing on the most important things first.
    Last edited: Jan 26, 2014
  3. XXzombiesXX
    Offline

    XXzombiesXX New Member

    Joined:
    Dec 23, 2013
    Posts:
    7
    Minecraft User:
    tommo
    PocketMine does rock!!!!!!
  4. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    436
    Plugins:
    14
    Minecraft User:
    shoghicp
    Our physics implementation sucks. We have to change all the entity implementation, first, so it is easier to be used by plugins, and second, to use good physics.
    Darunia18 likes this.
  5. unerds
    Offline

    unerds Redditor Plugin Developer

    Joined:
    Aug 28, 2013
    Posts:
    82
    Plugins:
    1
    Minecraft User:
    unerds_
    i've often though that i wouldn't mind if these brain-dead mobs and animals just spawned anyway so that people could get their hands on mob drops at least...

    i've been filling chests with wool, string, eggs, feathers, etc... (not gunpowder for obvious reasons)
  6. painapuru
    Offline

    painapuru New Member

    Joined:
    Jan 26, 2014
    Posts:
    3
    I took a look at the code, I agree that you should change the entity implementation. The approach you are intending to take with entities in the Entities branch (https://github.com/PocketMine/PocketMine-MP/tree/Entities/src) looks much easier to develop upon and maintain. Subclasses with their own behavior is definitely an easier approach in the long term than the current all in one.

    Why did you choose to have so many attributes public inside the new Entity instead of hiding them with getters/setters? If you hide them with getters/setters you can put behavior in the setter, for example have the subclass reject certain sets when they're not appropriate for it, making it safer when you're operating at the mother class level.

    Where does physics reside in the code? I didn't dig too deep, but couldn't spot it.
  7. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    436
    Plugins:
    14
    Minecraft User:
    shoghicp
    Entities were implemented as a placeholder in the first months of the creation of the project. They were not intended to be used besides Players and items. We were in a hurry implementing all things using a really simple and basic approach. You can see that right now, there are a few rewrites going on PocketMine, first, the Entity handling and structure, and second, the networking system (the actual one comes from an old Minecraft for PC project, the new one will be included in the 1.3.12). Several things need a rewrite too, like block updates and physics. Physics right now are integrated into the Entity class, on the big update() and updateEnviroment() methods. Don't look at it ;)
  8. painapuru
    Offline

    painapuru New Member

    Joined:
    Jan 26, 2014
    Posts:
    3
    You did a great job man, you got working code released early, people using and having fun with your server. That's what matters!

    Refactoring is normal in agile software development, no reason to look down on placeholders that later have to be rewritten.

    I have some suggestions about how to implement entities, physics and AI, if you don't mind I'll share them here when I get some free minutes.
  9. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    436
    Plugins:
    14
    Minecraft User:
    shoghicp
    You can drop by the IRC anytime ;)

Share This Page

Advertisement