Computer Science Canada

The game of risk

Author:  Johno [ Mon Jun 05, 2006 3:10 pm ]
Post subject:  The game of risk

Hello, I was wondering what the easiest way would be to make the game of risk?

Author:  TheOneTrueGod [ Mon Jun 05, 2006 3:27 pm ]
Post subject: 

Well, the easiest way would be to go out, buy the board game, take a permanent black marker, and cross out the creators name, and write your own in.

If you are referring to making it in Turing, I suggest you read the Turing FAQ (Located conveniently at the top of the [Turing Help] section)

Author:  Cervantes [ Mon Jun 05, 2006 3:56 pm ]
Post subject: 

Risk would be a very complicated game to make. Possible trouble spots include graphically drawing the world and determining which country you click inside.

If you have a specific question about part of a Risk game, ask away. Otherwise, your question is very general and can really only be given a very general answer: the Turing Walkthrough.

Author:  Johno [ Mon Jun 05, 2006 6:12 pm ]
Post subject: 

well I took a screen shot of the computer game for the map, but as far as making the dice 3D, and such, like what would be the eaisest way, or would it be easier to make it 2D, with a GIF.button that says roll

Author:  Dodad bouldershoulder [ Tue Jun 06, 2006 9:49 am ]
Post subject: 

Risk is the most amazing game ever. It's sweet. Yahh, but making a risk game would be hard, but if you ever get it, make sure you post it!!! Thinking

Author:  Clayton [ Tue Jun 06, 2006 11:17 am ]
Post subject: 

probably the best way to make dice and such is with a 3D engine (theres a couple of them kickin around the site check out Catalysts Very Happy ) as for making it roll, dont use GIFs as Turing is not compatible with GIFs (unless you are using 4.1)

Author:  Johno [ Tue Jun 06, 2006 3:10 pm ]
Post subject: 

which I am, but would randint be easier

Author:  Clayton [ Tue Jun 06, 2006 4:41 pm ]
Post subject: 

use Rand.Int to actually determine the number on the die and then draw the dice using a 3D generator Very Happy

Author:  Johno [ Tue Jun 06, 2006 5:40 pm ]
Post subject: 

yes but how you make it so attack rolled 3 dice,and defender two?

Author:  [Gandalf] [ Tue Jun 06, 2006 6:52 pm ]
Post subject: 

code:
fcn diceValue : int
    result Rand.Int (1, 6)
end diceValue
put "Attack Dice:"
for i : 1 .. 3
    put diceValue
end for
put "Defend Dice:"
for i : 1 .. 2
    put diceValue
end for

Or, if you wanted to store all the values you could use arrays:
code:
fcn diceValue : int
    result Rand.Int (1, 6)
end diceValue
var attackDice : array 1 .. 3 of int
var defendDice : array 1 .. 2 of int
for i : 1 .. upper (attackDice)
    attackDice (i) := diceValue
end for
for i : 1 .. upper (defendDice)
     defendDice (i) := diceValue
end for

Note: I tried to keep this as simple as possible. If you don't know functions (or arrays) yet, I suggest you learn them before taking on a project like this.

Author:  Johno [ Tue Jun 06, 2006 6:57 pm ]
Post subject: 

I know how to use everything, I just dont know how to put it all together


: