
? Pong ?
#1
Posted 09 May 2005 - 08:45 PM
#2
Posted 09 May 2005 - 09:43 PM
#3
Posted 10 May 2005 - 08:34 PM
#4
Guest_Guest_*
Posted 12 May 2005 - 04:48 AM
Originally I got a pong game off the Sean tan Casio kingdom website but i accidentaly deleted that game.

I thought it would be a good exercise to attempt to program it in myself. The game works in the same way, so there are bound to be some similarities in the code

2(Int 10Ran#)+1->C Int (2Ran#)->D 1->E~F 0->G ///number 0 not letter o C+1->A 7->B Do D=0=>Dsz A D=1=>Isz A E=1=>Dsz B E=0=>Isz B Getkey=38 And C>2=>C-2->C Getkey=27 And C<18=>C+2->C Clrtext Locate A,B,"*" /// Use degrees sign (OPTN,F6,F5,F1) Locate C,7,"===" A<2=>1->D B<2=>0->E B<2=>Isz G A>20=>0->D B>6=>1->E B>6=>A=\=C+1=>0->F While F Locate 6,1,"-GAME OVER-" Locate 1,3,"YOUR SCORE:" Locate 12,3,G
That was the basics of what i wrote but i also added a pause and high score function
Have fun

#5
Guest_Guest_*
Posted 12 May 2005 - 07:41 AM

I have a CFX 9850gb+ so the program might not work on yours
#6
Posted 12 May 2005 - 08:03 AM
huhn_m: Deleted Double Post
#7
Posted 12 May 2005 - 12:28 PM
#8
Guest_matrix luva_*
Posted 22 May 2005 - 08:53 AM
A) wat do i press to do this ->
B)wat do i press for this =<
C) to start a new line do u use the shift exe thing? because i get a dim error and it says the error is rite where the thingy is....(im trying to program in snake)
#9
Guest_matrix luva_*
Posted 22 May 2005 - 08:55 AM
and wat do i do for a syn error on >
#10
Posted 22 May 2005 - 09:10 AM
B)wat do i press for this =<
C) to start a new line do u use the shift exe thing? because i get a dim error and it says the error is rite where the thingy is....(im trying to program in snake)
-> : it's on your keyboard, above AC/ON
=< : it's the sign "less or equal", PRGM>REL><
new line : yes, it's EXE.
Dim error with what line ?
#11
Posted 22 May 2005 - 06:16 PM

#12
Guest_matrix luva_*
Posted 22 May 2005 - 11:17 PM
Cls (then i put the shift exe thingy....no problem there...)
Q=<99=>(1,Q)-List 5 (shift exe thing here was DIM error)
PS. When it says list 5 do i do the List_ then 5 or the thing in the f4 menu with List5?
#13
Posted 23 May 2005 - 02:10 AM
Q<=99=>(1,Q)->List5
(<= is one command in the prog->rel menu)
(also after (1,Q) you need the sto command, not a minus)
***now that I think about it, do you use the curly braces {1,Q}?
#14
Posted 23 May 2005 - 04:18 PM
[ and ]
cu huhn
#15
Guest_matix luva_*
Posted 24 May 2005 - 02:46 AM
#16
Posted 25 May 2005 - 03:08 AM

One more thing to make your life easier...if you want to do a newline command in the prgm editor, you only have to press exe, not shift=>exe.

#17
Guest_matrix luva_*
Posted 26 May 2005 - 05:55 AM

any theories as to how i fix up the dim error.....when i delete the

Soz about the noob questions...i dont actually understand any of the things that are written down which is why i get so many errors, i just copy the code from a piece of paper to the calculator and hope it works

#18
Guest_matrix luva_*
Posted 26 May 2005 - 05:59 AM
Cls
Q=<99=>{1,Q}->List 5
Q>=100=>{1,1}->List 5
ViewWindow 1,127,1,1,63,1
{1,1,1,1,1,1,1,1,1,1}->List 1
{1,1,1,1,1,1,1,1,1,1}->List 2
{1,1,1,1,1,1,1,1,1,1}->List 3
{1,1,1,1,1,1,1,1,1,1}->List 4
0->A~Z
10->A
10->C
10->B
1->D
1->E
5->M
10->G
60->H
-5->I
1->Z
100->P
While 1=Z
P-1->P
Text B,A,"O"
Text list 2[D],List 1[D]," " //one space between quotations
A->List 1[C]
B->List 2[C]
If GetKey=73
Then -5->F
0->M
IfEnd
If GetKey=53
Then 5->F
0->M
IfEnd
If GetKey=64
Then -5=>M
0->F
IfEnd
If GetKey=62
Then 5->M
0->F
IfEnd
Text G,H,"X"
Text List 3[D], List 4[D]," " //one space between quotations
G->list 3[C]
H->List 4[C]
Int 7Ran#->K
If K=3
Then Int 4Ran#->L
0->I~J
L=1=>5->I
L=2=>-5->I
L=3=>5->J
L=0=>-5->J
IfEnd
G+I->G
H+J->H
A+F->A
B+M->B
C+1->C
D+1->D
H >= 125=>4->H
A >= 125=>4->A
H =< 3=>123->H
A =< 3=>123->A
G >= 62=>3->G
B >= 62=>3->B
G =< 3=>61->G
B =< 3=>61->B
C >= 11=>1->C
D >= 11=>1->D
For 1->N To 10
C =/= N=>A >= List 4[N]=>A =< List 4[N]+4=>B >= List 3[N]=>B =< List 3[N]+4=>0->Z
C =/= N=>H >= List 1[N]=>H =< List 1[N]+4=>G >= List 2[N]=>G =< List 2[N]+4=>2->Z
Next
WhileEnd
Z=0=>Locate 7,3,"COMP WINS"
If Z=2
Then P->Q
Locate 7,3,"YOU WIN"
Locate 1,6,"YOUR SCORE:"
Locate 12,6,P
Dim List 5->V
Locate 1,5,"HIGH SCORE:"
P->List 5[(Dim List5)-1]
SortA(List 5)
Dim List 5->V
Locate 12,5,List 5[V]
If P=List 5[V]
Then For 1->A To 50
Locate 6,7," " //10 spaces between the quotations
Locate 6,7,"HIGH SCORE"
Next
IfEnd
#19
Guest_matrixluva_*
Posted 28 May 2005 - 12:00 PM
and then
/th (th as in theta)
can someone please tell me what that means i have to enter


Andy.Davies: I have deleted ~15 smilies, do not over use!
Edited by Andy.Davies, 28 May 2005 - 03:27 PM.
#20
Posted 28 May 2005 - 05:07 PM
#21
Guest_matrix luva_*
Posted 29 May 2005 - 11:14 AM
is it usual for me to get a GO error on the "mlev1" part of the line (marked out)
{0}->List5
0->A~Z
0->\r
0->\th
ViewWindow 1,127,0,63,1,0
AxesOff
GridOff
LabelOff
Green F-Line 18,10,100,10
F-Line 100,10,100,28
F-Line 100,28,18,28
Green F-Line 18,28,18,10
PlotOn 20,12
PlotOn 98,12
PlotOn 20,26
PlotOn 98,26
F-Line 53,9,53,6
F-Line 53,6,66,6
F-Line 66,6,66,9
F-Line 53,29,53,38
F-Line 66,38,66,29
F-Line 1,38,127,38
Orange F-Line 1,39,127,39
Orange F-Line 1,40,127,40
Text 14,25,"SUPER MARIO LAND"
Green Text 21,42,"CFX-9850G"
Orange Text 50,25,"BY: B.RASMUS ANTHIN"_
3->L
Lbl A
Isz \th
\th=1=>Prog "MLEV1" ERROR HERE!!!!!!

\th=2=>Prog "MLEV2"
\th=3=>Prog "MLEV3"
0->B
1+L->O
Lbl 0
L<O=>500->T
L<O=>F-1->H
L->O
0->D
(-)1->Q
(-)1->K
For 1+B->A To 21+B
Isz D
List6[A]=1=>D->K
List6[A]=2=>D->K
Next
Cls
Orange F-Line 91,41,53,5
Orange F-Line 53,5,8,51
Orange F-Line 80,51,103,30
Orange F-Line 103,30,125,51
0->D
will it all come together say at the end where it says:
@@ Program "MLEV1" ()
File1
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,2,2,2,2,2,1,1,1,0,1,1,1,1,1
,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,0,1,1,1,0,1,1,1,1,1,2,
2,2,2,2}->List1
{0,0,1,1,0,0,0,0,0,0,2,0,1,0,0,0,2,0,0,1,1,0,0,0,0,0,2,0,0,0,1,1,1,0,0,0,0,0,0,2
,0,1,1,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,1,1,3}->List2
{0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,2
,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,
1,1,0,0}->List3
{0,0,0,0,0,1,10,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,1,10,1,0
,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,
0,1,1}->List4
{0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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()
File1
{2,1,1,1,1,2,2,2,3,3,4,4,0,4,4,3,3,2,1,1,1,1,1,1,1,2,1,1,2,2,0,2,2,1,1,1,0,1,1,1
,1,1,1,1,1,2,2,2,3,3,2,2,3,3,3,2,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,1,1,1,1,0,1,
1,1,1,1}->List1
{0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,1,0,0,0,1,1,0,0,0,2,0,1,1,0,0,2,0
,0,0,0,0,1,1,2,0,0,1,1,0,0,0,0,0,0,1,0,0,2,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,1,
0,0,0,3}->List2
{0,0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,1,2,0,0,0,1,0,1,0,0,1,0,0,0,0,2,1,0,0,0,0,0,1
,1,0,1,1,0,0,2,0,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0}->List3
{0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,2,0,0,0,0,1,0,0,0,0,0,0,1
,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0}->List4
{0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
0,0,0,0}->List6
if not can someone direect me as to why the GO error appears????
#22
Posted 29 May 2005 - 02:39 PM
These must go in extra files with exactly the name that is in the quotes. So in this example the file is called "MLEV3" (without the quotation marks) and the content is:
File1 {2,1,1,1,1,2,2,2,3,3,4,4,0,4,4,3,3,2,1,1,1,1,1,1,1,2,1,1,2,2,0,2,2,1,1,1,0,1,1,1 ,1,1,1,1,1,2,2,2,3,3,2,2,3,3,3,2,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,1,1,1,1,0,1 ,1,1,1,1}->List1 {0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,1,0,0,0,1,1,0,0,0,2,0,1,1,0,0,2,0 ,0,0,0,0,1,1,2,0,0,1,1,0,0,0,0,0,0,1,0,0,2,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,1 ,0,0,0,3}->List2 {0,0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,1,2,0,0,0,1,0,1,0,0,1,0,0,0,0,2,1,0,0,0,0,0,1 ,1,0,1,1,0,0,2,0,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0}->List3 {0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,2,0,0,0,0,1,0,0,0,0,0,0,1 ,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0}->List4 {0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0 ,0,0,0,0}->List6
Do not write this at the end of the main program.
Cu Huhn
#23
Posted 29 May 2005 - 04:52 PM
#24
Guest_matrix luva_*
Posted 04 June 2005 - 11:45 AM
{0}->List5
0->A~Z
0->\r
0->\th
ViewWindow 1,127,0,63,1,0
AxesOff
GridOff
LabelOff
Green F-Line 18,10,100,10
F-Line 100,10,100,28
F-Line 100,28,18,28
Green F-Line 18,28,18,10
PlotOn 20,12
PlotOn 98,12
PlotOn 20,26
PlotOn 98,26
F-Line 53,9,53,6
F-Line 53,6,66,6
F-Line 66,6,66,9
F-Line 53,29,53,38
F-Line 66,38,66,29
F-Line 1,38,127,38
Orange F-Line 1,39,127,39
Orange F-Line 1,40,127,40
Text 14,25,"SUPER MARIO LAND"
Green Text 21,42,"CFX-9850G"
Orange Text 50,25,"BY: B.RASMUS ANTHIN"_
3->L
Lbl A
Isz \th
\th=1=>Prog "MLEV1"
\th=2=>Prog "MLEV2"
\th=3=>Prog "MLEV3"
0->B
1+L->O
Lbl 0
L<O=>500->T
L<O=>F-1->H
L->O
0->D
(-)1->Q
(-)1->K
For 1+B->A To 21+B
Isz D
List6[A]=1=>D->K ****************SYN ERROR HERE*****
List6[A]=2=>D->K
Next
Cls
Orange F-Line 91,41,53,5
Orange F-Line 53,5,8,51
Orange F-Line 80,51,103,30
Orange F-Line 103,30,125,51
0->D
For B+1->A To B+21
Isz D
List1[A]>=1=>Text 50,6D-5,"#"
List1[A]>=2=>Text 44,6D-5,"#"
List1[A]>=3=>Text 38,6D-5,"#"
List1[A]>=4=>Text 32,6D-5,"#"
Next
#25
Posted 05 June 2005 - 02:39 AM
If List6[A] = 1 Then D->K IfEnd
#26
Posted 05 June 2005 - 04:25 AM
try replacing Isz D with D+1->D
#27
Posted 06 June 2005 - 12:21 AM
#28
Posted 06 June 2005 - 12:24 PM

#29
Guest_Guest_*
Posted 08 June 2005 - 11:41 PM
THe game is pretty lame but more fun than some maths classes.

#30
Posted 09 June 2005 - 06:24 AM
The trick to getting non 45 degree angles in graphic mode are to have a maximum horizontal and vertical movement of, say, 3 pixels and vary between 0 and 3, so you get 4 levels of movement for each dimension. I used a simple math formula for this depending on brick type. To avoid the dreaded pure horizontal and pure vertical bounces I also added an addition, subtraction factor to the paddle. All very fast calculations that "simulated" real physics.
I'll search to see if I still have the source. I'll post it if I have it, otherwise, take my word for it. BTW - I'm not talking about my remake of casnoid which was in text mode.
- dscoshpe -
#31
Guest_Guest_liquid_*_*
Posted 09 June 2005 - 06:32 AM
#32
Posted 09 June 2005 - 06:15 PM
#33
Guest_Guest_*
Posted 10 June 2005 - 12:45 AM
#34
Posted 10 June 2005 - 01:16 AM
#35
Guest_Guest_*
Posted 10 June 2005 - 01:31 AM
#36
Guest_sammy_*
Posted 19 June 2005 - 09:26 AM


(fatsammy AT gmail.com)
#37
Guest_Guest_*
Posted 09 September 2005 - 08:13 PM
#38
Posted 10 September 2005 - 09:23 AM
The \ is just for the program to let it know its a token. It mustn't show in the sources.
#39
Guest_Guest_*
Posted 10 September 2005 - 06:23 PM
I can't find it.
#40
Posted 11 September 2005 - 09:24 AM
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users