|
Post by bfr on Jan 8, 2005 16:27:51 GMT -5
Yes. I am was making a game in which you throw darts at a dart board using While.
|
|
|
Post by Vladik on Jan 8, 2005 18:23:45 GMT -5
Was the game a matter of keyboard skill, probability, or both? The latter is the best, the former is okay, and the remaining one would suck.
|
|
|
Post by bfr on Jan 8, 2005 19:48:18 GMT -5
Actually it does not involve a keyboard (I know this sounds really dimb because you said that While ie especially useful in keyboard-base programs).
|
|
|
Post by Vladik on Jan 8, 2005 19:50:10 GMT -5
It uses probability?
I can see why you stopped coding it...
Probability shouldn't be a major factor in good games.
|
|
|
Post by Vladik on Jan 8, 2005 19:50:40 GMT -5
While can be used for other things too...
|
|
|
Post by bfr on Jan 9, 2005 19:55:53 GMT -5
You are really right about the probablility thing. A game relied on 100% probability wouldn'y be fun (for me at least)
|
|
|
Post by Vladik on Jan 9, 2005 19:59:11 GMT -5
Maybe a combo of probability and skill...
(If you hadn't noticed, I just described Monopoly.)
|
|
|
Post by bfr on Jan 9, 2005 20:03:32 GMT -5
Yes probability and skill are a good mix (and that is why so many people like Monopoly).
|
|
|
Post by Vladik on Jan 9, 2005 20:07:19 GMT -5
Probability, skill, and keyboard skills is the best.
|
|
|
Post by bfr on Jan 9, 2005 20:08:43 GMT -5
You forgot to mention mouse skills.
|
|
|
Post by Vladik on Jan 9, 2005 20:18:32 GMT -5
Calculators don't have mice... Just kidding; I could see that you were joking. BUT... if a game uses the mouse and the keyboard, it is cubersome.
|
|
|
Post by bfr on Jan 9, 2005 20:52:54 GMT -5
yeah. Also, are there any other types of loops in C?
|
|
|
Post by bcherry on Jan 9, 2005 20:54:13 GMT -5
Just while and for.
|
|
|
Post by Vladik on Jan 9, 2005 20:54:44 GMT -5
You forgot about Do...While. (AKA Repeat)
|
|
|
Post by bcherry on Jan 9, 2005 20:56:22 GMT -5
but thats not really another loop. It's just a special while loop. Of course, so is for...
|
|
|
Post by Simon on Jan 17, 2005 8:24:36 GMT -5
Hey , i am new in this, but i know the basic of writing in basic.Perhaps i don't know how to use loops ?. Can some one help me plz . its because i am creating a game and i need to know.
Simon
(P.S: I have a very old TI82)
|
|
|
Post by bfr on Jan 17, 2005 14:26:11 GMT -5
Well, lets see. I'm assumming you already know what "while" and "For" mean. In case you don't, "while" repeats a group of commands (the loop) while a condition is true. For "for", the syntax is: For (variable,begin,end,step) or For (variable,begin,end)
"begin" is what the variable starts as. "end" is when the variable reaches that amount, the loop stops.
step is an optional feature that allows you to control how much the variable is increased each time.
An example is :
For (A, 1, 10) Disp A End
This program displays 1,2,3,4,5,6,7,8,9, and 10.
If I made any mistakes, sorry because I haven't used any loops in a while.
Also, there is "Repeat", which is like while except it repeats something UNTIL the condition is true. All of these loops must have an "end" at the end of the loop.
|
|
|
Post by Vladik on Jan 17, 2005 16:04:51 GMT -5
Yes; is true for the Z80 series (The TI-82 included), but in TI-89 (68K) series programming, loops end like this: For ..... EndFor
While ..... EndWhile
|
|
|
Post by bfr on Jan 17, 2005 20:22:53 GMT -5
Well, that is sort of like an end...it has the word in it!
|
|
|
Post by Vladik on Jan 17, 2005 20:31:15 GMT -5
Yes; but Simon has a TI-82, so only the "End" applies!
|
|