Thread: What is Entity Bassed, and what makes it so good?

Results 1 to 5 of 5
  1. #1 What is Entity Bassed, and what makes it so good? 
    Banned

    Join Date
    Jul 2011
    Age
    30
    Posts
    745
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    I've come across this term a bit on my journeys, and I was wondering what it is and what's so good about it?

    Cheers
    Reply With Quote  
     

  2. #2  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    you define both the players and npcs as entities and build a class around them

    the upside so doing this is that you only need one method for attacking npcs / players etc

    If you wanted to attempt something like it i'd suggest keeping the player & npc class and build an abstract entity class for them and have them extend that class.

    for e.g.

    Code:
    public abstract class Entity
    {
    
        public abstract int getX();
    
        public abstract int getY();
    
        public abstract int getHeight();
    }
    Code:
    public abstract class Player extends Entity
    Code:
    public void attack(Entity e) {
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jun 2009
    Posts
    454
    Thanks given
    31
    Thanks received
    48
    Rep Power
    168
    would items and objects also be considered an entity? I would think they would be.....
    Reply With Quote  
     

  4. #4  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Quote Originally Posted by Jmood View Post
    would items and objects also be considered an entity? I would think they would be.....
    Non-living things can't be an entity, in this case npcs & players are living.
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Jul 2011
    Age
    30
    Posts
    745
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Would it be more simple to construct a class around it?
    i.e
    Get y, x

    EDIT: Woops, didn't see your example, I may attempt this
    Cheers harlan, I'll see if I can throw you a rep
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Music that just makes me feel good.
    By Hoodlum in forum Music
    Replies: 4
    Last Post: 09-30-2011, 04:37 PM
  2. Replies: 8
    Last Post: 04-29-2011, 04:51 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •