PDA

View Full Version : Made a text adventure game in bash



thegreenblob
May 7th, 2009, 01:11 AM
Anyone want to play it? lol

I made it pretty much because I was bored and wanted to know if I would do it. It's not that great but I'm proud of it. :P

Here it is: http://ounderscoreo.com/stuff/CFMC.tar.gz

The readme explains how to run it. :)

Comments/Questions welcome. lol (Oh and the story associated with it is completely cheesy :P)

benj1
May 7th, 2009, 01:32 AM
cool. nice cow :P

theres /tmp for temporary files like bedroom.txt.

thegreenblob
May 7th, 2009, 01:38 AM
cool. nice cow :P

theres /tmp for temporary files like bedroom.txt.

lol thanks. I used the cow from apt-get moo :P

And I knew of /tmp but didn't think to use it. lol. I think I'll change it now.

EDIT: It uses /tmp now.

-grubby
May 7th, 2009, 01:43 AM
You try fighting the cow the best you can, you try punching and kicking,
but all of that seems useless. The cow eventually knocks you down and
tramples you to death.

The cow is victorious.

(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~

Game Over!


:(

EDIT:


You reach for the cup cake and then eat it.

You start to feel really faint and then pass out.

You are dead. Turns out the cup cake was poisoned.

Game Over!


:(

EDIT:



You dodged it just in time.

You disarm him and then call the police. He get arrested. You go home safely.

You win! Congrats!


:)

Dr Small
May 7th, 2009, 01:45 AM
Anyone want to play it? lol

I made it pretty much because I was bored and wanted to know if I would do it. It's not that great but I'm proud of it. :P

Here it is: http://ounderscoreo.com/stuff/CFMC.tar.gz

The readme explains how to run it. :)

Comments/Questions welcome. lol (Oh and the story associated with it is completely cheesy :P)
awesome game man! I ought to make a detective game like that, lol

dragos240
May 7th, 2009, 01:46 AM
Heh.... Bob hired you to find a murderer.... he didn't think it was suicide ..... and you find out that bob was the murderer after all.... why not just accept that it was suicide.

thegreenblob
May 7th, 2009, 01:54 AM
Heh.... Bob hired you to find a murderer.... he didn't think it was suicide ..... and you find out that bob was the murderer after all.... why not just accept that it was suicide.

Not a very logical murderer is he? :P lol

dragos240
May 7th, 2009, 01:58 AM
No he isn't heh...

EDIT: What a lonely cow, you try to leave he runs after you, as if saying "COME BAK!!!! NAO!!!"

PacSci
May 7th, 2009, 02:03 AM
Very funny, but it's got a few technical glitches. It might be better in Python or Ruby. Nice time-killer, though.

thegreenblob
May 7th, 2009, 02:14 AM
EDIT: What a lonely cow, you try to leave he runs after you, as if saying "COME BAK!!!! NAO!!!"

Cows live such a sad life :(


Very funny, but it's got a few technical glitches. It might be better in Python or Ruby. Nice time-killer, though.

lol thanks. Yeah probably would be better in python or ruby but I don't know either of them. I actually plan/want to learn python though. Eventually... I procrastinate too much >.>

Dr Small
May 7th, 2009, 02:53 AM
I'm actually writing one now that involves dialog :)

MaxIBoy
May 7th, 2009, 04:59 AM
I think I found a bug. The text I typed is in bold for clarity.

You have a short conversation in the car on the way to the scene of
the crime with Bob to get more details that goes something like this.

You: So, what did the police say about your brothers death?
Bob: They said it looked like suicide and called it a day. But I don't buy it.
You: Where was the body found and why don't you think it was suicide?
Bob: It was found in the barn hanging from a piece of rope.
Bob: And he just doesn't seem like the type to do that.
You: I see.
Bob: Well here we are. Here's the key to the front door. I have
a business trip so I have to go I hope you don't mind looking around
by your self.

You think it's strange that he would just drop you off but
you just shrugged it off and forgot about it.

Press enter to continue... y
Answer: wat
~/hacks/other_people/CFMC$If you type "y" there, it'll prompt you for an answer, and when you hit enter, it'll exit.

You should handle actual input gracefully, even if it's not needed.

saulgoode
May 7th, 2009, 07:43 AM
Heh.... Bob hired you to find a murderer.... he didn't think it was suicide ..... and you find out that bob was the murderer after all.... why not just accept that it was suicide.
The life insurance policy did not cover suicidal death.

calvinps
May 7th, 2009, 07:45 AM
lol thanks. I used the cow from apt-get moo :P

And I knew of /tmp but didn't think to use it. lol. I think I'll change it now.

EDIT: It uses /tmp now.

Does apt-get moo show a text cow on your terminal window?? :P :lol: :mrgreen:

benj1
May 7th, 2009, 11:55 AM
Does apt-get moo show a text cow on your terminal window?? :P :lol: :mrgreen:

try it :)

theres one for aptitude, can't remember what it is tho.

if you use alt-f2 the type 'gegls from outer space' you get more cows

jelle_
May 7th, 2009, 12:42 PM
aptitude -v moo
aptitude -vv moo
....
aptitude -vvvvvv moo

MaxIBoy
May 7th, 2009, 04:42 PM
Apt-get moo simply runs an external program, "cowsay," which is installed on every Linux distro as far as I know.

By the way, that text game is fun, I enjoyed going through all the possibilities.

thegreenblob
May 7th, 2009, 04:43 PM
I'm actually writing one now that involves dialog :)

What language are you writing it in? :)


I think I found a bug. The text I typed is in bold for clarity.

You have a short ...If you type "y" there, it'll prompt you for an answer, and when you hit enter, it'll exit.

You should handle actual input gracefully, even if it's not needed.

I didn't really think of that. :P I'll see what I can do about that later.


Does apt-get moo show a text cow on your terminal window?? :P :lol: :mrgreen:

Yes it does. :popcorn:


Apt-get moo simply runs an external program, "cowsay," which is installed on every Linux distro as far as I know.

By the way, that text game is fun, I enjoyed going through all the possibilities.

Thanks. :)

calrogman
May 7th, 2009, 05:18 PM
I think it would be easier to handle unexpected input using

case $foobar in
foo)
echo foo
;;
bar)
echo bar
;;
*)
echo wait what?
;;
esac
constructs.

BazookaAce
May 7th, 2009, 07:30 PM
You ****** ** just in time.

You ****** *** and then call *** ******. He get *******. You go home safely.

You win! Congrats!

Yey! I did it :P Took me about 7 mins! Btw, the * is for not spoiling the end for people that haven't played yet :)

So far, i enjoyed it!

calrogman
May 7th, 2009, 07:33 PM
You ****** ** just in time.

You ****** *** and then call *** ******. He get *******. You go home safely.

You win! Congrats!

Yey! I did it :P Took me about 7 mins! Btw, the * is for not spoiling the end for people that haven't played yet :)

So far, i enjoyed it!

I made it on my second try. Actually quite easy.

pwnst*r
May 7th, 2009, 09:00 PM
i'll have to try that tonight, awesome! i am a big fan of the old school text adventures like planetfall and the Zork series and even made my own back in the day, lulz.

dragos240
May 7th, 2009, 10:01 PM
I made it on my second try. Actually quite easy.

I did it in 2 minutes, 1st try.

calrogman
May 7th, 2009, 10:03 PM
I got shot. Camping near a murder scene was far too tempting.


:(

hatten
May 7th, 2009, 10:08 PM
Apt-get moo simply runs an external program, "cowsay," which is installed on every Linux distro as far as I know.

By the way, that text game is fun, I enjoyed going through all the possibilities.
not on arch by default:

╔═[hatten@tukumon]═[22:19:47 Thu May 07]═[~]
╚═══[$]> cowsay test
bash: cowsay: command not found


great game :D

MaxIBoy
May 7th, 2009, 10:25 PM
not on arch by default:

╔═[hatten@tukumon]═[22:19:47 Thu May 07]═[~]
╚═══[$]> cowsay test
bash: cowsay: command not found
great game :DNot sure if Arch counts... I don't think anything is installed on Arch by default.

BazookaAce
May 7th, 2009, 10:33 PM
Cowsay wasn't installed on my 9.04 install be default. I installed it now.

hatten
May 7th, 2009, 10:44 PM
Not sure if Arch counts... I don't think anything is installed on Arch by default.
hahahaha, awesome quote :P

Well, it depends on how you see it, you can pretty much uncheck anything from being installed, but im not sure you can uncheck the kernel :P (gotta check that later)

Dr Small
May 13th, 2009, 10:53 PM
I finally finished my text-based adventure game. Try it out and tell me what you think, or how many times you played it before you reached the end =D

Dr Small

benj1
May 14th, 2009, 12:50 PM
pretty good,nice story line, took me quite a few gos to finish it.

note to others you need to install 'dialog' from the repos.

lisati
May 14th, 2009, 01:04 PM
Eeek! I just went looking for a text-based adventure program to suggest for someone to adapt to Ubuntu and discovered that www.winsite.com seems to have had the plug pulled! Found what I was looking for elsewhere, and attached it to this post.

thegreenblob
May 17th, 2009, 09:38 AM
I finally finished my text-based adventure game. Try it out and tell me what you think, or how many times you played it before you reached the end =D

Dr Small

Nice. :)

I played about 5-7 times but keep getting a game over :P

*keeps trying*

Edit: Yay, finished it. lol.