Do you think you will play this game?
Yes
 61%  [ 8 ]
No
 38%  [ 5 ]
Total Votes : 13

I've been working on this game for a while and i think i'm ready to release the first version of it but can any one take a look and give some suggestions

Code:
::DCS
:"EFEFDFDFEFF7D5E3
::A
:HIGHSCOR
::
:11→dim(∟LHS
:If not(∟LHS(1
:{1,21,52,51,1,30,57,58,55,50,66→LHS
:ClrDraw:AxesOff
:0→Xmin:94→Xmax:0→Ymin:62→YMax
:For(A,0,62
:Horizontal(A
:End
:StorePic 1
:Lbl C
:DelVar SDelVar DRecallPic 1
:Text({-}1,8,6,"LIGHTNING v2.1
:Line(5,55,5,47,0
:Line(6,55,89,55,0
:Line(5,45,89,45,0
:Text(19,25,"BY JON STURM
:Line(24,37,24,43,0
:Line(25,37,66,37,0
:Text({-}1,29,6,"1- PLAY
:Text({-}1,37,6,"2- WATCH
:Text({-}1,45,6,"3- SCORES
:Text({-}1,53,6,"4- EXIT
:{83,82,81,81,81,81,82,83,83,83,83,83,83,82,81,80,79,78,78,78,78,79,80,81,82,83,83,83,83,82,81,80,81,82,83,82,81,80,79,78,77,78,79,80,79,78,77,78,79,80,81,82,83,82,81,80,80,80,80,79,78,77→{L1}
:For(N,0,61
:Pxl-Off(N,{L1}(N+1
:End
:DelVar {L1}
:Lbl Z
:Repeat K:getKey→K:End
:If K=92
:Goto 1
:If K=93
:Goto 2
:If K=94
:Goto 4
:If K=82 or K=45 or K=22
:Goto 3
:Goto Z
:Lbl 4
:∟LHS→{L2}
:"Lightning→Str3
:1→H:prgmHIGHSCOR
:Goto C
:Lbl 1
:1→D
:Lbl 2
:DelVar L
:47→P
:RecallPic 1
:Repeat getKey=45
:If D
:P→G
:If not(D
:randInt(4,90→G
:For(V,61,0,{-}3
:randInt({-}1,1→A
:G+3A(G+3A>0 and G+3A<95→W
:Line(G,V+3,W,V,0
:W→G
:If D
:Then
:getKey→C
:If C=26 or C=24 or V≥60
:Then
:P→M
:P+2((C=26 and P<91)-(C=24 and P>3)→P
:Pt-On(M,10,2:Line(M,9,M,3:Line(M+1,6,M+3,8:Line(M-1,6,M-3,8:Line(M-1,2,M-3,0:Line(M+1,2,M+3,0
:Pt-Off(P,10,2:Line(P,9,P,3,0:Line(P+1,6,P+3,8,0:Line(P-1,6,P-3,8,0:Line(P-1,2,P-3,0,0:Line(P+1,2,P+3,0,0
:End
:If V≤13 and abs(P-W)≤5
:Then
:1→L:Goto A
:End
:End
:End
:Lbl A
:Line(G+1,V+1,G+3,V+3,0:Line(G-1,V+1,G-3,V+3,0:Line(G-3,V,G-4,V+1,0:Line(G+3,V,G+4,V+1,0
:StorePic 2:ClrDraw:RecallPic 2
:If L
:Goto G
:ClrDraw:RecallPic 1
:S+1→S
:End
:If not(D
:Goto C
:Lbl G
:If S>∟LHS(1
:Then
:DelVar H
:prgmHIGHSCOR
:DelVar ∟LHS
:{L1}→∟LHS
:S→∟LHS(1
:Goto 4
:Else
:Text(15,24," Ha Ha You Lose!
:End
:Text(23,25," Your Score= ",S
:Pause
:Goto C
:Lbl 3
:ClrHome:ClrDraw:AxesOn
:DelVar Pic1DelVar Pic2DelVar Str3
screenies Very Happy
Do you just move left and right to avoid lightning? If not what do you do in the game? Looks pretty cool. (I wanna get electrecuted! Razz )
Well, I can't honestly give any suggestions because I program at a different level than you (not necessarily lower or higher, but "abstractly" (code jumps around all over the place ^_^Wink)

Good points:
-white pixels on black (something I never really could do efficiently)
-Repeats (something I rarely use effectively)

I'd look forward to "test driving" it.


Oh, and if you used the Icon maker for the game's DCS Icon, may I have the link to where you got it? The one I got didn't work for some reason.
Yea basicly I'm working on adding in creasing difficulty but that is not done yet
Ticalc keep rejecting my uploads though I haven't tried whith this version yet. Sad
@keith http://dcs.cemetech.net/index.php?title=BASIC_Header
Is it in a .zip file?
I have uploaded the first version here so you can test it out please reply with sugestions the only thing yet is to add increasing dificulty Which i'm working on debuging that now. http://www.cemetech.net/scripts/countdown.php?/83plus/basic/games/Lightning.zip&path=archives
heres the code for the increasing difficulty but theres a bug where in watch the lightning goes off the screen please help so i can release this version Very Happy

Code:
::DCS
:"EFEFDFDFEFF7D5E3
::A
:HIGHSCOR
::
:11→dim(∟LHS
:If not(∟LHS(1
:{1,21,52,51,1,30,57,58,55,50,66→LHS
:ClrDraw:AxesOff
:0→Xmin:94→Xmax:0→Ymin:62→YMax
:For(A,0,62
:Horizontal(A
:End
:StorePic 1
:Lbl C
:DelVar SDelVar DRecallPic 1
:Text({-}1,8,6,"LIGHTNING v2.2
:Line(5,55,5,47,0
:Line(6,55,89,55,0
:Line(5,45,89,45,0
:Text(19,25,"BY JON STURM
:Line(24,37,24,43,0
:Line(25,37,66,37,0
:Text({-}1,29,6,"1- PLAY
:Text({-}1,37,6,"2- WATCH
:Text({-}1,45,6,"3- SCORES
:Text({-}1,53,6,"4- EXIT
:{83,82,81,81,81,81,82,83,83,83,83,83,83,82,81,80,79,78,78,78,78,79,80,81,82,83,83,83,83,82,81,80,81,82,83,82,81,80,79,78,77,78,79,80,79,78,77,78,79,80,81,82,83,82,81,80,80,80,80,79,78,77→{L1}
:For(N,0,61
:Pxl-Off(N,{L1}(N+1
:End
:DelVar {L1}
:Lbl Z
:Repeat K:getKey→K:End
:If K=92
:Goto 1
:If K=93
:Goto 2
:If K=94
:Goto 4
:If K=82 or K=45 or K=22
:Goto 3
:Goto Z
:Lbl 4
:∟LHS→{L2}
:"Lightning→Str3
:1→H:prgmHIGHSCOR
:Goto C
:Lbl 1
:1→D
:Lbl 2
:DelVar L
:47→P
:RecallPic 1
:Repeat getKey=45
:P-7(S>10)(D=1)+randInt(4,90)not(D)→G
:P+7(D=1)+randInt(4,90)not(D)→F
:randInt(0,2→O
:2+((S>5)+(S>15))(D=1)+not(D)→E

The S>10 is whenyou start to have two lightning bolts instead of one hence the P +or-7(S>10) G is the Y value of the main lightning bolt and F is the second
E is the incriment of the lightning bolt it starts a then adds one when S>5 and when S>15

Code:

:For(V,61,0,{-}E
:randInt({-}1,1→A
:G+EA(G+EA>0 and G+EA<95→W
:Line(G,V+E,W,V,0
:W→G
:If (S>10)(D=1) or not(D)(O=2
:Then
:randInt({-}1,1→B
:F+EB(F+EB>0 and F+EB<95→U
:Line(F,V+E,U,V,0
:U→F
:End
:If D
:Then
:getKey→C
:If C=26 or C=24 or V≥60
:Then
:P→M
:P+2((C=26 and P<91)-(C=24 and P>3)→P
:Pt-On(M,10,2:Line(M,9,M,3:Line(M+1,6,M+3,8:Line(M-1,6,M-3,8:Line(M-1,2,M-3,0:Line(M+1,2,M+3,0
:Pt-Off(P,10,2:Line(P,9,P,3,0:Line(P+1,6,P+3,8,0:Line(P-1,6,P-3,8,0:Line(P-1,2,P-3,0,0:Line(P+1,2,P+3,0,0
:End
:If V≤13 and (abs(P-G)≤5 or (S>5)(abs(P-F)≤5))
:Then
:1→L:Goto A
:End
:End
:End
:Lbl A
:If (S>5)(D=1) or not(D)(O+2
:For(A,1,2
:Line(G+1,V+1,G+3,V+3,0:Line(G-1,V+1,G-3,V+3,0:Line(G-3,V,G-4,V+1,0:Line(G+3,V,G+4,V+1,0
:StorePic 2:ClrDraw:RecallPic 2
:F→G
:If S>5 or not(D
:End
:If L
:Goto G
:ClrDraw:RecallPic 1
:S+1→S
:End
:If not(D
:Goto C
:Lbl G
:If S>∟LHS(1
:Then
:DelVar H
:prgmHIGHSCOR
:DelVar ∟LHS
:{L1}→∟LHS
:S→∟LHS(1
:Goto 4
:Else
:Text(15,24," Ha Ha You Lose!
:End
:Text(23,25," Your Score= ",S
:Pause
:Goto C
:Lbl 3
:ClrHome:ClrDraw:AxesOn
:DelVar Pic1DelVar Pic2DelVar Str3
Can you throw some commenting in that so we can tell where the code for difficulty starts and ends? It is hard to tell with out it.
You're code runs very slowly, and needs some optimization. The idea is good, though. Here is my code, which completely generates lightning bolts and then renders them using Pxl-On(. Rendering them this way takes longer, but seems more realistic. It takes ~1.5 seconds to generate a lightning bolt, and 1 second to display it.

If you want to view this correctly, view it with the ti83pluspc font. If you don't have that, here is a summary of symbols:
ü = ->
Á = theta
ú = (-)
L = L1 (the font has a bug, there is no subscript 1)
ù = >=
÷ = <=


Code:

While 1
randInt(0,94üX
{XüL
Repeat Áù64
3randüÁ
If Á<1:Then
augment(L,seq(X,X,X,X-randInt(1,10),ú1üL
Else:If Á<2:Then
augment(L,seq(X,X,X,X+randInt(1,10üL
Else
augment(L,seq(X,Á,X,X+randInt(1,10üL
End:End
dim(LüÁ
L(ÁüX
End

ClrDraw
For(I,0,62
L(I+1
If (Ansù0)(Ans÷94
Pxl-On(I,Ans
End
End


Download:
Original Game
Fast Rendering Routine
can you open that with scorce coder 2 so its easier to under stand
<edit> wait i'll do it

Code:
:While 1
:randInt(0,94→X
:{X→{L1}
:Repeat θ≥64
:3rand→θ
:If θ<1:Then
:augment({L1},seq(X,X,X,X-randInt(1,10),{-}1→{L1}
:Else:If θ<2:Then
:augment({L1},seq(X,X,X,X+randInt(1,10→{L1}
:Else
:augment({L1},seq(X,θ,X,X+randInt(1,10→{L1}
:End:End
:dim({L1}→θ
:{L1}(θ→X
:End
:ClrDraw
:For(I,0,62
:{L1}(I+1
:If (Ans≥0)(Ans≤94
:Pxl-On(I,Ans
:End
:End
Sorry, I didn't know about that. I'll use it next time.
Indeed the code is slow, but that's because this is a Basic prgm.
However, the game is kind of fun.

Eh...I guess I'm not much of one for original compliments Laughing
@ericva1992 i get the concept but the one second lag between bolts would be the problem but if you come up whith a faster way to generate lightning bolts tell me
Then I guess you could generate at the same time as you're drawing, but it will be slower. I will try that and post back when I've got something working.
My method of generation is about the same speed as yours its the graphics that slow it down so no matter how i generate the lightning the drawing of the sick figure will take the most time.
<edit my first version used 3 pxl-offs but using line is more versatale
Then perhaps you should look into a new method of stick-figure drawing. have you read the Basic Optimization Guide? Never tried it, but I like the idea of text sprites.
I don't think text spries would work here because its inverted, text sprites usually are for on a white backround. Question
TheStorm wrote:
I don't think text spries would work here becaus its inverted, text sprites usually are for on a white backround. Question


Indeed. Text is "black on white" meaning text generated on a black screen would have a white background around it. Also, text overwrites. One letter would overlap another with its white pixels.

At least that's how it works on my 84.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page 1, 2, 3, 4, 5, 6  Next
» View previous topic :: View next topic  
Page 1 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement