Thread: Dialogue system

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Dialogue system 
    Registered Member
    Melvin's Avatar
    Join Date
    Aug 2011
    Posts
    1,150
    Thanks given
    546
    Thanks received
    418
    Rep Power
    1561
    This is just something I did for fun its matrix styled dialogue system (which i simplified just a bit) for 317 (I used elvarg as a base iirc)

    https://gist.github.com/ImMelvinn/bb...2da9cfd3840ec7

    example usage is in the gist


    A creative man is motivated by the desire to achieve, not by the desire to beat others.”


    ― Ayn Rand
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,253
    Thanks given
    1,145
    Thanks received
    909
    Rep Power
    2081
    thanks bud now my nutella npcs can talk

    whats with your weird ass javadoc btw
    Reply With Quote  
     

  4. #3  
    Extreme Donator


    Join Date
    Jul 2008
    Age
    31
    Posts
    956
    Thanks given
    186
    Thanks received
    344
    Rep Power
    1060
    Looks great!
    Reply With Quote  
     

  5. #4  
    Registered Member
    Melvin's Avatar
    Join Date
    Aug 2011
    Posts
    1,150
    Thanks given
    546
    Thanks received
    418
    Rep Power
    1561
    Quote Originally Posted by Fire Cape View Post
    thanks bud now my nutella npcs can talk

    whats with your weird ass javadoc btw
    Its old its just auto generated I had no intention of fixing cause of how fast I did it. Just needed it done to test packets at that time


    A creative man is motivated by the desire to achieve, not by the desire to beat others.”


    ― Ayn Rand
    Reply With Quote  
     

  6. #5  
    Registered Member

    Join Date
    Feb 2010
    Posts
    3,253
    Thanks given
    1,145
    Thanks received
    909
    Rep Power
    2081
    good use of final class

    weird use of constants, e.g why have a constant for the dialogue interface id and then numbers without a name like 55 in
    Code:
     String wrap = WordUtils.wrap(text[0], 55);
    does sendEntityDialogue need public access?

    idk why people document enum values when they tend to be self-explanatory and don't show in generated javadoc

    good use of empty private constructor also

    much cleaner than most garbage on here though so gj
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    Registered Member
    Melvin's Avatar
    Join Date
    Aug 2011
    Posts
    1,150
    Thanks given
    546
    Thanks received
    418
    Rep Power
    1561
    Quote Originally Posted by Fire Cape View Post
    good use of final class

    weird use of constants, e.g why have a constant for the dialogue interface id and then numbers without a name like 55 in
    Code:
     String wrap = WordUtils.wrap(text[0], 55);
    does sendEntityDialogue need public access?

    idk why people document enum values when they tend to be self-explanatory and don't show in generated javadoc

    good use of empty private constructor also

    much cleaner than most garbage on here though so gj
    I didnt write that, it was either the original elvarg or matrix. And yeah the enum documentation is a bit pointless but sometimes useful when not self explanatory or poorly named

    edit: the wordwrap bit you posted is from original 317

    matrix uses
    Code:
    		StringBuilder builder = new StringBuilder();
    		builder.append(texts == null ? "" : texts[0] == null ? "" : texts[0]);
    		for (int line = 1; line < texts.length; line++) {
    			builder.append("<br>" + texts[line]);
    		}


    A creative man is motivated by the desire to achieve, not by the desire to beat others.”


    ― Ayn Rand
    Reply With Quote  
     

  9. #7  
    Extreme Donator

    JayArrowz's Avatar
    Join Date
    Sep 2008
    Posts
    104
    Thanks given
    99
    Thanks received
    107
    Rep Power
    810
    Quote Originally Posted by Melvin View Post
    This is just something I did for fun its matrix styled dialogue system (which i simplified just a bit) for 317 (I used elvarg as a base iirc)

    https://gist.github.com/ImMelvinn/bb...2da9cfd3840ec7

    example usage is in the gist

    Looks cool few improvements:

    - Not sure why stage needs to start from -1 as a default, wouldn't starting with the default 0 be better?
    Reply With Quote  
     

  10. #8  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Melvin View Post
    Its old its just auto generated I had no intention of fixing cause of how fast I did it. Just needed it done to test packets at that time
    Just cause you write code fast doesn't mean its good. Are you just releasing your junk?
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  11. #9  
    Developer


    Join Date
    Aug 2012
    Posts
    2,493
    Thanks given
    180
    Thanks received
    1,732
    Rep Power
    2487
    Quote Originally Posted by Tyluur View Post
    Just cause you write code fast doesn't mean its good. Are you just releasing your junk?
    pretty hypocrite dont u think

    https://www.rune-server.ee/runescape...667-718-a.html
    Reply With Quote  
     

  12. Thankful user:


  13. #10  
    Registered Member
    Join Date
    Sep 2013
    Posts
    105
    Thanks given
    13
    Thanks received
    28
    Rep Power
    10
    I'd recommend that you make the stage value autoincrement itself in your continue dialogue method. That would be like a 1 line change and you could just change the run method to a boolean that returns false if it needs to terminate. That would save you from continually have to set the next stage id. (for branching/dialogue options you could have a method in the Dialogue class that allows you to set a stage for times when u need to change the start position in your switch statement)
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Dialogue System(Easy usage)
    By Nemmyz in forum Tutorials
    Replies: 46
    Last Post: 12-12-2010, 06:41 PM
  2. Dialogue System
    By Profesor Oak in forum Snippets
    Replies: 2
    Last Post: 03-11-2010, 02:49 AM
  3. My Improved Dialogue System
    By Vastiko in forum Snippets
    Replies: 6
    Last Post: 03-10-2010, 05:25 PM
  4. Dialogue System :)
    By Ultimate in forum Snippets
    Replies: 6
    Last Post: 09-12-2009, 10:28 PM
  5. Best Dialogue System{3x better than yours}
    By wizzyt21 in forum Tutorials
    Replies: 14
    Last Post: 11-28-2008, 12:41 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •