Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24
Like Tree1Likes

Thread: Need help with my Text Adventure game [Please Read]

  1. #21
    MastaChief11 is offline Member
    Join Date
    Jul 2012
    Posts
    23
    Rep Power
    0

    Default Re: Need help with my Text Adventure game [Please Read]

    I got the game working, but now I think I want to turn it all into methods.

  2. #22
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Need help with my Text Adventure game [Please Read]

    Quote Originally Posted by MastaChief11 View Post
    I got the game working, but now I think I want to turn it all into methods.
    Yes, but don't stop there. Try to separate out the various nouns in your program and use them to create different classes and objects of the classes, each with their own behaviors (methods), and then try to extract out the changeable stuff, such as your level maps, into data that is held by a file and read into the program on start up.
    DarrylBurke likes this.

  3. #23
    XeRoFlaWz is offline Member
    Join Date
    Apr 2014
    Posts
    6
    Rep Power
    0

    Default Re: Need help with my Text Adventure game [Please Read]

    I hate really really really long if-else if- else statements. I know you're probably just beginning, but you should use a switch statement for your options. It makes the code a little bit easier to follow, which is specially great because you don't have too many nested if-else if-else statements.

  4. #24
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,025
    Rep Power
    6

    Default Re: Need help with my Text Adventure game [Please Read]

    I think you are about two years too late for this post.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 01-11-2012, 02:25 PM
  2. Newton Adventure
    By java software in forum Java Software
    Replies: 0
    Last Post: 12-29-2011, 06:46 PM
  3. read text from .pdf
    By seghri in forum Java Applets
    Replies: 0
    Last Post: 05-08-2011, 04:05 PM
  4. Text adventure setup
    By xsimsyx in forum New To Java
    Replies: 8
    Last Post: 03-17-2010, 12:32 AM
  5. Replies: 0
    Last Post: 07-07-2009, 07:22 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
  •