Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM
    • Krackkid: You up :eggplant:
      July 23, 2018, 06:18:17 PM
    • DeathsChaos9: no
      July 23, 2018, 03:53:31 PM
    • Emulous: Come check out Emulous: [link]
      July 22, 2018, 03:37:19 PM
    • Emulous:[link]
      July 22, 2018, 03:37:00 PM
    • Travas: ur mom
      July 21, 2018, 06:04:50 PM
    • YNRDAB: Watcha big ballers up too?
      July 20, 2018, 11:01:06 AM
    • dark250: i need help for coding client
      July 19, 2018, 08:27:37 AM
    • Travas: yes
      July 14, 2018, 02:19:44 PM
    • drubrkletern: lmao racist and sexist much?
      July 14, 2018, 01:11:52 PM
    • Cole1497: yeah i got you lil boat give me a second
      July 13, 2018, 03:19:35 AM
    • B0ATY.: yo can anyone unban my ip, i got banned for saying i hope someone gets aids :p
      July 12, 2018, 09:16:00 PM

    Author Topic: Official MoparScape Server - In Development  (Read 67739 times)

    0 Members and 2 Guests are viewing this topic.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #540 on: May 13, 2014, 10:46:33 PM »
    You really don't need to have a general store object, a flag would do just fine.
    Runescape Gambling

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #541 on: May 13, 2014, 11:09:23 PM »
    You really don't need to have a general store object, a flag would do just fine.
    If all it was for was that one boolean, sure. But there are more differences than that between a general store and a normal store. Every method except acceptsItem(..) in the GeneralStore class is one not in the other shop classes.
    Runescape Gambling

    Offlinelare69

    • Member
    • ****
    • *
    • Posts: 5,322
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #542 on: May 14, 2014, 12:18:10 PM »
    are you guys doing a remake? that seems like a lot to tackle for just two people, why not just do a normal server and add custom content?
    hi. check out luna:)
    Runescape Gambling

    OfflineVain_

    • Member
    • ****
    • Posts: 3,056
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #543 on: May 14, 2014, 03:07:03 PM »
    are you guys doing a remake? that seems like a lot to tackle for just two people, why not just do a normal server and add custom content?
    pretty sure david is working by himself currently

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #544 on: May 14, 2014, 03:13:28 PM »
    Need some people to test shops with me and/or other things like the new client working. PM me for the page to create a character and I will send you the client as well.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #545 on: May 19, 2014, 02:57:53 AM »
    Thanks to people that PM'd me, we made sure the client was working properly! Yay!

    Going to have another test session soon, hopefully after I add some shops and such.

    EDIT -

    Combat is going slow and steady. I'm only programming when I feel like it so I don't burn out, but so far I'd say I've made some pretty good progress on it. Most of it today has been getting the different weapon definitions and attack tab working properly (for example, when swapping weapons it properly searches for the correct attack style to match the previous one even if they aren't in the same spot on the interface)

    EDIT 2 -
    I just wrote an actual working version of player following (no offense sinisoul, yours didn't work) and I *think* it's as RS-like as possible. I don't even know if it's actually been done before this properly. It doesn't do the "trace other person path" method, or the "find exact A* match" method. This is a big part of combat!

    My main concern is that I'm writing it past midnight and I'm pretty sure it's messy as fudge. Oh well. I'm not sinisoul, it doesn't need to be perfect :^)
    « Last Edit: May 19, 2014, 03:03:32 AM by Davidi2 »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #546 on: May 19, 2014, 03:07:25 AM »
    Mine worked fine you just couldn't follow a player twice without it walking back to your point of origin.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #547 on: May 19, 2014, 03:16:00 AM »
    Mine worked fine you just couldn't follow a player twice without it walking back to your point of origin.
    No, it was so much worse than that. It would stay like 2+ blocks away at all times, sometimes walking backwards instead of forwards when they took a step, etc. And sometimes if you followed them for long enough (which was funny to watch), if they logged off you wouldn't be able to walk on your own at all either. You didn't lag out you just couldn't walk, lol. If you look back in this thread you'll see one of the early testers comment on the bad following :P

    Speaking of it though, can I ask how mob size works?

    For example, if I spawn a KBD who has size 3 or 5 or whatever at 3000, 3000; the yellow dot that appears on the minimap isnt the actual NPC's coords, right? It's x + size/2 and y + size/2 or something?

    So to get the 'area' a mob occupies, it would just be [position.x, position.y, position.x + size-1, position.y + size-1]?
    « Last Edit: May 19, 2014, 03:21:58 AM by Davidi2 »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #548 on: May 19, 2014, 03:21:27 AM »
    K then. Probably just edge cases it was never a finished feature and when we ran tests on it it worked fine so I must have never uploaded the final version. You're welcome for using my work. 

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #549 on: May 19, 2014, 03:22:10 AM »
    K then. Probably just edge cases it was never a finished feature and when we ran tests on it it worked fine so I must have never uploaded the final version. You're welcome for using my work. 
    I rewrote the whole thing :P

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #550 on: May 19, 2014, 04:47:28 AM »
    the point of origin is top left I believe.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #551 on: May 20, 2014, 09:27:59 PM »
    Next task for combat is creating all the core for projectiles and magic spells. Finding all the data for those will be annoying :(

    OfflineLimits

    • Member
    • ****
    • Posts: 2,190
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #552 on: May 20, 2014, 09:29:24 PM »
    Next task for combat is creating all the core for projectiles and magic spells. Finding all the data for those will be annoying :(

    You are my hero

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #553 on: May 20, 2014, 10:12:20 PM »
    This magic system is going to be sexy as fudge imo.

    Teaser:
    Code: Java
    1. publicclass Spellbook {
    2.  
    3.         publicstaticfinal Spellbook NORMAL_SPELLBOOK =new Spellbook(192);
    4.         publicstaticfinal Spellbook ANCIENT_SPELLBOOK =new Spellbook(193);
    5.         // public static final Spellbook LUNAR_SPELLBOOK = new Spellbook(XXX);
    6.  
    7.         privatefinalint interfaceId;
    8.         private Spell[] spells =new Spell[65];// maybe just a map childid -> spell?
    9.  
    10.         private Spellbook(int interfaceId){
    11.                 this.interfaceId= interfaceId;
    12.         }
    13.  
    14.         public CombatSpell getCombatSpell(int childId){
    15.                 if(childId <0|| childId >= spells.length){
    16.                         returnnull;
    17.                 }
    18.                 if(spells[childId]==null||!(spells[childId]instanceof CombatSpell)){
    19.                         returnnull;
    20.                 }
    21.                 return(CombatSpell) spells[childId];
    22.         }
    23.  
    24.         publicstaticvoid loadBooks(){
    25.                 NORMAL_SPELLBOOK.spells[1]=new CombatSpell(/* spell definition here*/);
    26.                 // save spell defs in sql or some shit probably rather than loading this way
    27.         }
    28.  
    29.         publicint getInterfaceId(){
    30.                 return interfaceId;
    31.         }
    32.  
    33. }

    Magic on NPC handler:
    Code: Java
    1.     publicvoid handleMagic(Player player, int interfaceId, int childId, int id){
    2.         Spellbook spellbook = player.getSpellbook();
    3.         if(interfaceId != spellbook.getInterfaceId()){
    4.                 return;
    5.         }
    6.         CombatSpell spell = spellbook.getCombatSpell(childId);
    7.         if(spell ==null){
    8.                 return;
    9.         }
    10.         NPC npc = World.getWorld().getNpcs().get(id);
    11.         if(npc ==null||!player.getPosition().isWithinScene(npc.getPosition())){
    12.             return;
    13.         }
    14.         player.getCombatHandler().setNextSpell(spell);
    15.         if(!(player.getAction()instanceof CombatAction)){
    16.                 //player.startAction(new CombatAction(player, npc));
    17.         }
    18.     }
    « Last Edit: May 20, 2014, 10:16:27 PM by Davidi2 »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #554 on: May 20, 2014, 10:28:58 PM »
    Code: [Select]
    !(spells[childId] instanceof CombatSpell)

    God you really love that don't you. PLEASE STOP DOING THIS.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #555 on: May 20, 2014, 10:52:06 PM »
    Code: [Select]
    !(spells[childId] instanceof CombatSpell)

    God you really love that don't you. PLEASE STOP DOING THIS.
    I feel like doing it more just to annoy you now. Dis is what you deserve. I mean if it's more than just a pet peeve please show me the reasoning behind not using it and the alternative for this situation, and then I'll change it. I just don't see the reason, I like it because it's readable.
    « Last Edit: May 20, 2014, 10:55:51 PM by Davidi2 »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #556 on: May 20, 2014, 11:18:32 PM »

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #557 on: May 20, 2014, 11:19:58 PM »
    There is a reason behind it, I would gladly explain but this article does it much better

    https://sites.google.com/site/steveyegge2/when-polymorphism-fails

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #558 on: May 20, 2014, 11:26:41 PM »
    Yeah that's a good article. It's just a sign that you don't understand OOP, only use it if you HAVE to. A good case would be for an object equals method testing if its an instance of the object type.

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: Official MoparScape Server - In Development
    « Reply #559 on: May 20, 2014, 11:28:47 PM »
    Yeah that's a good article. It's just a sign that you don't understand OOP, only use it if you HAVE to. A good case would be for an object equals method testing if its an instance of the object type.

    That wouldn't be necessary in a case like this though.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal