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

Username:   Password: 
 RegisterRegister   
 GRD 10 millionare game w/ 12.6 thousand lines of code
Index -> Programming, Turing -> Turing Submissions
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
USEC_OFFICER




PostPosted: Thu Feb 25, 2010 8:57 pm   Post subject: RE:GRD 10 millionare game w/ 12.6 thousand lines of code

Except if he was smart enough he would realize that the other game is terrible and wouldn't have posted it at all. It always makes me wonder why some people post games that are terrible. A small percent sure, by why?
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Thu Feb 25, 2010 9:26 pm   Post subject: Re: GRD 10 millionare game w/ 12.6 thousand lines of code

They probably don't know much better

@Chopper: Though it runs into a logic loop when you comment out the lines and never actually start the millionaire game...

@jdubzisyahweh: You do know about procedures and parameters right? Here's an example of the structure flow of how the game might work differently and not calling the next procedure inside itself (though this could be achieved with recursion, but it would be terribly messy depending on how its done).

Turing:

procedure doQuestion (question : string, answers : array 1 .. 4 of string, correctAnswer : string)
    put question %Relace with sexy Font module.
    for i : 1 .. 4
        put i, ") ", answers (i)
    end for
    var usersAnswer : string
    get usersAnswer %Replace with ghastly GUI module stuff
    %Worst comes to worst, you need to submit a procedure into
    %The GUI button, make another procedure that changes the value
    %of a global variable with the value submitted into the procedure.

    if usersAnswer = correctAnswer then
        put "COOOOOOOOOOOOOORRECT!"
    else
        put "Nope"
    end if
end doQuestion

%The following is only an example of this procedure

%You could even break ans into 4 different string variables and change the parameters aswell.
var ans : array 1 .. 4 of string := init ("Canadians", "Chinese", "Americains", "Anarticains")
doQuestion ("Who's awesome?", ans, "1")



%The following code wont work properly without modification and uses stuff from the
%file module.

%open file
for i: 1..1 %Number of questions
%Change to loop and exit when statements to exit when you get a question wrong

    %extract question from file into variables and throw them into the procedure
    doQuestion ("Question", ans, "CorrectAnswer")
end for
%close file
chopperdudes




PostPosted: Thu Feb 25, 2010 10:09 pm   Post subject: RE:GRD 10 millionare game w/ 12.6 thousand lines of code

yeah i know it doesn't start but when i try to run a program and it's got <5 errors... i comment those out... and if it gives me more errors i just give up on it lol. but in this case it actually runs... (up to a point). and said "made only by jonathan wortner" or something... i was wonder if that code coulda been c/p'ed... or if that's him and he'd like to claim the other game to be his. lol
copthesaint




PostPosted: Fri Feb 26, 2010 12:21 am   Post subject: Re: GRD 10 millionare game w/ 12.6 thousand lines of code

Euphoracle @ Wed Feb 24, 2010 wrote:
methodoxx @ Wed Feb 24, 2010 12:36 pm wrote:
Quote:
12.6 thousand lines

You're doing it wrong.


You're doing it so wrong.


Lol wrong would be a nice way of putting it.



Dont feel bad, there are many people like you. just either give up "the easy way out", Or think outside the box... and learn. Gl with whatever you choose.

Also if you want to use music:

copthesaint @ Fri Feb 05, 2010 wrote:


if you are are allowed to use, http://compsci.ca/v3/viewtopic.php?t=21388
This will let you play music without slowing your games accual speed.

Turing:
import (Launcher in "Launcher.tu")
var Music1 := Launcher.Open
var Music2 := Launcher.Open
Launcher.SendInfo (Music1, "HotNCold.mp3", 1, 0)
Launcher.SendInfo (Music2, "HotNCold.mp3", 1, 0)


First line:
Turing:
import (Launcher in "Launcher.tu")

This, loads the class 'Launcher' in Launcher.tu

Lines 2 and 3:
turning:
var Music1 := Launcher.Open
var Music2 := Launcher.Open

This initializes the music player.

Lines 4 and 5:
Turing:
Launcher.SendInfo (Music1, "HotNCold.mp3", 1, 0)
Launcher.SendInfo (Music2, "HotNCold.mp3", 1, 0)

Sends to each music player the information to play the song "HotNCold.Mp3" (just change this to your music file),
Tells the music player to run the song "1", and tells the music player not to terminate "0".


You Will need the files Run_Music.exe, and launcher.tu with you main program

There is also the sorce code for Run_Music.exe, but I dont think you will need to see it unless you are making an online game and need to change the port.

So really, This can be used for anything, The only problem is that you need an open window Sad I suggest if you want music and sound effects open two (like above) and just keep them open until your main program is terminated.


Should seriously sticky that program I made... lol and... yay :/ 300 post soooo.... happy lol :p
jdubzisyahweh




PostPosted: Fri Feb 26, 2010 10:36 am   Post subject: Re: RE:GRD 10 millionare game w/ 12.6 thousand lines of code

chopperdudes @ Thu Feb 25, 2010 8:50 pm wrote:
i know it's by the same OP... but doesn't the startup graphics look... rather similar to this? http://compsci.ca/v3/viewtopic.php?p=208071&no=1#208071

u can get it to at least run if you comment out those 4 lines of code. and he claims the other one he found 2 years ago, and only upgraded the graphics...

thats because the start up grfx are MINE!!!! and i posted both
jdubzisyahweh




PostPosted: Fri Feb 26, 2010 11:05 am   Post subject: Re: GRD 10 millionare game w/ 12.6 thousand lines of code

NEW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
MIllionare 2.5



millionare game2.5.t
 Description:

Download
 Filename:  millionare game2.5.t
 Filesize:  428.69 KB
 Downloaded:  101 Time(s)

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 2 of 2  [ 21 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: