Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 This is a text game i made cus i was bored!!!
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rjm72




PostPosted: Wed Oct 20, 2004 12:56 pm   Post subject: This is a text game i made cus i was bored!!!

This game is so basic all it is, is if and then statements but i made it on my second week in the class so... reply ur thoughts on it!!!

code:

% Text game
%created by rjm72
colourback(black)
cls
colour(green)

var name : string
var name2 : string

%getting name
put "Enter First and Last Name."
get name
get name2

put "Hello ", name, " ", name2
put ""
%Telling surrounding
put "You are in a busy city people everywhere,"
put "you see a man running towards you, you are about to colide"
var dec1 : int
put "1=move out of the way"
put "2=stay where you are"
get dec1
%outcome of decision 1
if
        dec1 = 1 then
    put "You move out of the way the man runs past you. He then turns around."
    put "man:hello how are you?"
elsif
        dec1 = 2 then
    put "The man bumps in to you knocking you over. He helps you up."
    put "man:Hello how are you?"
end if
%talking to man
var ans1 : int
put "3=I'm fine thank you how are you"
put "4=Leave me alone!"
get ans1
if
        ans1 = 3 then
    put "I'm fine thank you how are you"
    put "man:I'm good,well nice meeting you, I'm in a hurry though so i got to go."
    put "man:bye"
    put "bye"
    put "Man leaves"
elsif
        ans1 = 4 then
    put "Leave me alone!"
    put "man:Ok as you wish."
    put "Man murmurs something that you cant hear and leaves."
end if
% surrounding enviroment
put "You continue walking until you reach the corner store"
put "You enter the corner store"
%Robbery
put " When you get inside the corner store you see a man with a gun!"
var dec2 : int
put "5=run out the door"
put "6=punch man in face"
put "7=hug man with gun"
get dec2
if
        dec2 = 5 then
    put "You run out the door like the coward you are!!! LOL"
elsif
        dec2 = 6 then
    put "You punch the man in the face and then he shoots you!"
    put "You are DEAD!!!"
    delay(2500)
    colourback(red)
    cls
elsif
        dec2 = 7 then
    put "Man with gun: What are you doing you little...."
    put "The man shoots you in the head!!!!"
    put "You are DEAD!!!!"
    delay(2500)
    colourback(red)
    cls
end if

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Oct 20, 2004 1:23 pm   Post subject: (No subject)

not much of a game if the outcome is the same reguardless of choice Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
wtd




PostPosted: Wed Oct 20, 2004 4:54 pm   Post subject: (No subject)

tony wrote:
not much of a game if the outcome is the same reguardless of choice Confused


It's a nihilistic commentary on the pointlessness of life.
zomg




PostPosted: Fri Oct 22, 2004 11:10 am   Post subject: (No subject)

it dipicts life perfectly Laughing
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: