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.

Author
Message
Mr Potato
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location:
Posted: 13th Jun 2010 02:17
I was working on a joke text adventure and wanted the game to ask "Did you use Bing?" after they get forced out of the game to search on Google. Then, if they say yes, for a bit I want the game to say "You're not allowed because you used Bing", when they go in. Later I want it to let them back in though, and I have no idea how to do either of these things.

Here's the code:
REM Project: Escape
REM Created: 6/12/2010 12:16:23 PM
REM
REM ***** Main Source File *****
REM
START:
CLS
print "Please escape the island."
input "> " ;a$
if a$ = "Look around" then goto ONE
goto EXPLANATION

ONE:
print "Look around? Really? Why bother? Is there really anything that interesting about an island? You know what? Fine."
print "Um... There are some trees... that are... green... I guess... and there's... an... evil monkey."
print "And it kills you. You're dead. Great job, genius."
print "(Press enter to restart)"
input "> " ;a1$
goto START

EXPLANATION:
print "Well, you didn't actually do a command that makes any sense. I guess you don't know text adventures that well, do you?"
print "Since you don't, I won't give you an explanation. Here's Google instead. Search what you need to know."
print " "
print " Google"
input " > " ;a2$
goto GOOGLE

GOOGLE:
print " "
print "I can't believe you actually thought this was Google. Wow. No wonder you couldn't even get past the first part."
print "You're stupidity won't be rewarded. Now go search real Google. But not Bing. If you use Bing, I won't let you play again."
input "(Press enter to save and quit)"
Yitzu
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 13th Jun 2010 02:55
ONE: (The legend of Monkey Island?)
Mr Potato
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location:
Posted: 13th Jun 2010 04:20
No one? I guess players won't be able to save then...
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 13th Jun 2010 10:42
It`s not imposible, it`s hard because your game is a mess, and most people don`t even get the idea of your game.I undersand you try to be original, but this doesen`t look much serious project.

If i get the idea is at some point to force the player to leave the game and use internet browser then later coming back you want to know if he used google or not, this is very hard even for proficient coders to do and in other side it`s stupid.Because if i play game of this rank and it tells me to go search google i`ll do that and search for some more interesting game that i can play and not some that actually plays with me!

Go read some tutorials, get serious and abandon goto instead use gosub.You can read about the diference in the tutorials.Pay attention on functions too, they are one step higher than gosub

Cheers!

Where there is a will, there is a way.
I often edit my posts, that`s who i am
tomaszavenger
15
Years of Service
User Offline
Joined: 24th Jun 2009
Location:
Posted: 13th Jun 2010 12:08
You have to define how to save your game. For example, if you had a save function which could be called any time, you could save the string name of what you want to goto.

Overall, this game isn't very well designed algorithmically. It's just a series of interconnecting webs, which will get messy if the project is large.

Look in the Files Command list to explore options for saving strings into files.

First make a file if it doesn't exist,then write to the file.
Mr Potato
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location:
Posted: 13th Jun 2010 19:12
Thanks! I do need to clean it up a bit...

Login to post a reply

Server time is: 2024-11-24 15:44:58
Your offset time is: 2024-11-24 15:44:58