Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Text Adventure Help

Author
Message
One Man Riot
17
Years of Service
User Offline
Joined: 29th Jan 2007
Location:
Posted: 29th Jan 2007 22:55
My professor is having us create a text adventure with DBPro. I've programmed in Java so learning DarkBASIC wasn't that hard but im really having trouble implementing some things into my program mainly items and how to change the file that they are read from. My profs requirements are as follows.

1. The information about the initial location of all items (keys, flashlights, sword, etc.) should be stored in a file.
2. The information about the rooms should be stored in a “record”. Thus an “array of records” provides the mechanism to store all the static information about the adventure.
3. There should be a player record which defines the current (and dynamically changing) state of the player, e.g. the player location, the player’s inventory (e.g. if the player has the key, a flashlight, the sword, etc). Clearly, this record needs to be updated on a turn by turn basis.
5. All output from the program should be textual.

This is what I have. Any proofreading or suggestions would really help. He's giving this to us without ever teaching us how to use the program.

Attachments

Login to view attachments
One Man Riot
17
Years of Service
User Offline
Joined: 29th Jan 2007
Location:
Posted: 29th Jan 2007 23:14
My professor is having us create a text adventure with DBPro. I\'ve programmed in Java so learning DarkBASIC wasn\'t that hard but im really having trouble implementing some things into my program mainly items and how to change the file that they are read from. My profs requirements are as follows.

1. The information about the initial location of all items (keys, flashlights, sword, etc.) should be stored in a file.
2. The information about the rooms should be stored in a “record”. Thus an “array of records” provides the mechanism to store all the static information about the adventure.
3. There should be a player record which defines the current (and dynamically changing) state of the player, e.g. the player location, the player’s inventory (e.g. if the player has the key, a flashlight, the sword, etc). Clearly, this record needs to be updated on a turn by turn basis.
5. All output from the program should be textual.

This is what I have. Any proofreading or suggestions would really help. He\'s giving this to us without ever teaching us how to use the program.

Edit: sorry I don't know how to use the snippet button. My file is attached
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 30th Jan 2007 00:28
Hey, welcome . I'm confused on why your trying to read and change objets from files? Also, if you would be a bit more specific on what you need help with I'd gladly help, I've done parts of a text adventure before .

Pirates of Port Royale
Live the life of a pirate.
One Man Riot
17
Years of Service
User Offline
Joined: 29th Jan 2007
Location:
Posted: 30th Jan 2007 00:32
hold on...I just got some advise from my prof...Ill post back if I need help...oh and how do you do the code snippet button?
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 30th Jan 2007 02:47 Edited at: 30th Jan 2007 02:50
I'm helping Sirsiddy with a text adventure in the Darkbasic area. The example I posted was made in Pro and edited to work in both Pro and Classic. In the thread I talk about how to do it and posted a working example. I didn't talk about items yet though. All I ask is that you don't just copy my code and claim it's yours to your professor... use it to learn how to do it. Here's the link:

http://forum.thegamecreators.com/?m=forum_view&t=97880&b=10

Code snips are like this:
[ code ]
Your code here.
[ /code ]

Take out the spaces between the brackets and we see this:


Login to post a reply

Server time is: 2024-11-26 21:34:04
Your offset time is: 2024-11-26 21:34:04