Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Help with making adventure game in java


  • Please log in to reply
1 reply to this topic

#1 sausage

sausage

  • Members
  • 389 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Colorado
  • Local time:10:39 AM

Posted 01 November 2008 - 01:32 AM

So, I'm trying to do a dungeon runner type game with DnD invloved. I have the encounter stuff all set up perfectly but I can't seem to figure out in my mind how I can get the dungeon running working withouth 19 million lines. I am trying to do something like

####################################
# #
# ############################## #
# ############################## #
# # #
# # ##############################
# # #
# P ############**####################
#####################################

Where P is the player # is a wall and ** is the next area.

When I do if (movement = forward)
{
System.out.println("I don't want to spend forever retyping the dungeon");
I can never make it back to that same spot and move again constantly without an infinteciaml amount of lines of code. Is there anyway I could use some kind of Read.line method or something to get this working withouth 14 trillion lines? :thumbsup: :flowers: :trumpet: :inlove:

By the way, that thing up top is supposed to look like a maze but the forum hates me. :) :woot: :cool: :huh:

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:39 AM

Posted 01 November 2008 - 06:13 AM

Yes, you can do it in precisely 47,296 lines.

but the forum hates me.

Or maybe learn how to use the forum? :thumbsup: Try using the code tags.

By the way, I have no idea what DnD or infinteciaml is.

And actually, I have no idea how much code it would take to do what you want because I have not seen your code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users