What genre would you like the next contest to be in? Then elaborate.
Strategy
 35%  [ 6 ]
Platformer/sidescroller/arcade
 35%  [ 6 ]
3d
 5%  [ 1 ]
Puzzle (just did this so probably not)
 5%  [ 1 ]
RPG
 17%  [ 3 ]
Total Votes : 17

the only thing i see bad about an optimization contest is how do you know people wont go to source coder. you would have to shut it down until the end.
SC can only do so much... I don't think it will be a problem.
lafferjm wrote:
the only thing i see bad about an optimization contest is how do you know people wont go to source coder. you would have to shut it down until the end.
Negatory. SourceCoder isn't as intelligent as a person, so it can't see large, full-routine rewrite stuff, like turning a bunch of Pxl-###s into Line commands for nonlinear pixels, or using a text menu instead of a pointless graphical menu, perhaps finding a way to quickly draw what was being saved in a PicN variable in less than 767 bytes.
Yep. SC couldn't optimize Frogger so it couldn't use Lbls, and it surely couldn't have optimized Frisby's JDodge. Speaking of JDodge, he released a new version, JDodge 21. What do you guys think of it?
something1990 wrote:
Yep. SC couldn't optimize Frogger so it couldn't use Lbls, and it surely couldn't have optimized Frisby's JDodge. Speaking of JDodge, he released a new version, JDodge 21. What do you guys think of it?
Care to post some code for us to examine?
It's better than his previous version. Has a lot more features, but I think some are not needed, like the option to make your character A-Z as well as enemy characters. He still has cheats which ruin the game. Overall, it's an improvement. Enjoy
BASIC Code wrote:
::"JDODGE
:FnOff
:ZStandard
:AxesOff
:0→∟JD20A
:1→H
:1→G
:24→I
:26→J
:21→M
:22→O
:"A→Str5
:"O→Str6
:"DOWN→Str8
:DelVar UDelVar WDelVar SDelVar F
:While 1
:DelVar ADelVar D
:ClrDraw
:For(Z,1,7
:Text(Z,33,"JDODGE
:End
:For(Z,33,55
:Pxl-On(14,Z
:End
:Text(20,30,"1> PLAY GAME
:Text(30,30,"2> OPTIONS
:Text(40,30,"3> EXTRAS
:Text(50,30,"4> QUIT
:20→B
:1→D
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:If D=1
:Then
:Repeat A=1
:getKey→K
:Text(‾1,C,20," 
:Text(C,26," 
:Text(B,20,"->
:B→C
:B+10(K=34)-10(K=25)→B
:A+(K=105)→A
:A+(K=92)→A
:A+(K=93)→A
:A+(K=94)→A
:A+(K=15)→A
:A+(K=82)→A
:If B=60
:20→B
:If B=10
:50→B
:End
:End
:DelVar DDelVar A
:If K=92
:20→B
:If K=93
:30→B
:If K=94
:40→B
:If K=82
:50→B
:If K=15
:Then
:Shade(‾10,10
:1→D
:10→B
:End
:If B=20
:Then
:1→∟JD20A
:6→A
:2→E
:2→N
:2→Q
:2→C
:2→P
:2→V
:2→T
:DelVar U
:1→L
:ClrHome
:Output(4,3,"DODGE
:For(θ,1,8
:Output(θ,1,"!
:Output(θ,10,"!
:Output(θ,16,"!
:End
:For(θ,11,15
:Output(1,θ,"=
:Output(5,θ,"=
:Output(6,θ,"=
:Output(8,θ,"=
:End
:Output(2,11,"TIME
:Output(3,11,"ALIVE
:Output(4,3,"DODGE
:1→D
:8→Z
:Output(4,3,"     
:If Str8="RIGHT
:Then
:4→A
:1→E
:1→T
:1→N
:1→Q
:1→C
:1→V
:1→P
:1→U
:Repeat A=U
:getKey→K
:A→B
:Output(4,11,S
:If L=1
:Output(7,11,"DODGE
:A-(K=I)+(K=J)→A
:If A=0
:8→A
:If A=9
:1→A
:Output(B,9," 
:Output(A,9,Str5
:Output(E,2," 
:Output(T,3," 
:Output(N,4," 
:Output(Q,5," 
:Output(C,6," 
:Output(V,7," 
:Output(P,8," 
:P→U
:V→P
:C→V
:Q→C
:N→Q
:T→N
:E→T
:If F=1
:0→U
:randInt(1,8→E
:Output(E,2,Str6
:Output(T,3,Str6
:Output(N,4,Str6
:Output(Q,5,Str6
:Output(C,6,Str6
:Output(V,7,Str6
:Output(P,8,Str6
:For(θ,1,G
:End
:If L=1 or L=2
:L+1→L
:If L=1 or L=2
:Output(7,11,"     
:If L=3
:1→L
:S+1→S
:If W=1 and A=U
:Then
:A→B
:randInt(1,2→θ
:If θ=1
:A-1→A
:If θ=2
:A+1→A
:If A=0
:8→A
:If A=9
:1→A
:Output(B,9," 
:Output(A,9,Str5
:End
:If K=M
:Then
:Repeat getKey
:End
:End
:If K=O
:Then
:DelVar UDelVar ADelVar Z
:30→B
:End
:End
:End
:If Str8="LEFT
:Then
:4→A
:1→E
:1→T
:1→N
:1→Q
:1→C
:1→V
:1→P
:1→U
:Repeat A=U
:getKey→K
:A→B
:Output(4,11,S
:If L=1
:Output(7,11,"DODGE
:A-(K=I)+(K=J)→A
:If A=0
:8→A
:If A=9
:1→A
:Output(B,2," 
:Output(A,2,Str5
:Output(E,9," 
:Output(T,8," 
:Output(N,7," 
:Output(Q,6," 
:Output(C,5," 
:Output(V,4," 
:Output(P,3," 
:P→U
:V→P
:C→V
:Q→C
:N→Q
:T→N
:E→T
:If F=1
:0→U
:randInt(1,8→E
:Output(E,9,Str6
:Output(T,8,Str6
:Output(N,7,Str6
:Output(Q,6,Str6
:Output(C,5,Str6
:Output(V,4,Str6
:Output(P,3,Str6
:For(θ,1,G
:End
:If L=1 or L=2
:L+1→L
:If L=1 or L=2
:Output(7,11,"     
:If L=3
:1→L
:S+1→S
:If W=1 and A=U
:Then
:A→B
:randInt(1,2→θ
:If θ=1
:A-1→A
:If θ=2
:A+1→A
:If A=0
:8→A
:If A=9
:1→A
:Output(B,2," 
:Output(A,2,Str5
:End
:If K=M
:Then
:Repeat getKey
:End
:End
:If K=O
:Then
:DelVar UDelVar ADelVar Z
:30→B
:End
:End
:End
:If Str8="UP
:Then
:Repeat A=U
:getKey→K
:A→B
:Output(4,11,S
:If L=1
:Output(7,11,"DODGE
:A-(K=I)+(K=J)→A
:If A=1
:9→A
:If A=10
:2→A
:Output(1,B," 
:Output(1,A,Str5
:Output(8,E," 
:Output(7,T," 
:Output(6,N," 
:Output(5,Q," 
:Output(4,C," 
:Output(3,V," 
:Output(2,P," 
:P→U
:V→P
:C→V
:Q→C
:N→Q
:T→N
:E→T
:If F=1
:0→U
:randInt(2,9→E
:Output(8,E,Str6
:Output(7,T,Str6
:Output(6,N,Str6
:Output(5,Q,Str6
:Output(4,C,Str6
:Output(3,V,Str6
:Output(2,P,Str6
:For(θ,1,G
:End
:If L=1 or L=2
:L+1→L
:If L=1 or L=2
:Output(7,11,"     
:If L=3
:1→L
:S+1→S
:If W=1 and A=U
:Then
:A→B
:randInt(1,2→θ
:If θ=1
:A-1→A
:If θ=2
:A+1→A
:If A=1
:9→A
:If A=10
:2→A
:Output(1,B," 
:Output(1,A,Str5
:End
:If K=M
:Then
:Repeat getKey
:End
:End
:If K=O
:Then
:DelVar UDelVar ADelVar Z
:30→B
:End
:End
:End
:If Str8="DOWN
:Then
:Repeat A=U
:getKey→K
:A→B
:Output(4,11,S
:If L=1
:Output(7,11,"DODGE
:A-(K=I)+(K=J)→A
:If A=1
:9→A
:If A=10
:2→A
:Output(8,B," 
:Output(8,A,Str5
:Output(1,E," 
:Output(2,T," 
:Output(3,N," 
:Output(4,Q," 
:Output(5,C," 
:Output(6,V," 
:Output(7,P," 
:P→U
:V→P
:C→V
:Q→C
:N→Q
:T→N
:E→T
:If F=1
:0→U
:randInt(2,9→E
:Output(1,E,Str6
:Output(2,T,Str6
:Output(3,N,Str6
:Output(4,Q,Str6
:Output(5,C,Str6
:Output(6,V,Str6
:Output(7,P,Str6
:For(θ,1,G
:End
:If L=1 or L=2
:L+1→L
:If L=1 or L=2
:Output(7,11,"     
:If L=3
:1→L
:S+1→S
:If W=1 and A=U
:Then
:A→B
:randInt(1,2→θ
:If θ=1
:A-1→A
:If θ=2
:A+1→A
:If A=1
:9→A
:If A=10
:2→A
:Output(8,B," 
:Output(8,A,Str5
:End
:If K=M
:Then
:Repeat getKey
:End
:End
:If K=O
:Then
:DelVar UDelVar ADelVar Z
:30→B
:End
:End
:End
:End
:If B=30
:Then
:∟JD20A(1→θ
:ClrDraw
:Text(7,33,"OPTIONS
:For(Z,33,59
:Pxl-On(14,Z
:End
:Text(20,30,"1> INFORMATION
:Text(30,30,"2> CHEATS
:If θ=0
:Text(40,30,"3> LOAD GAME
:If θ=1
:Text(40,30,"3> SAVE GAME
:Text(50,7,"Press CLEAR to go to MAIN
:Vertical ‾10
:Vertical 10
:Horizontal(‾10
:Horizontal(10
:20→B
:Repeat A=1
:getKey→K
:Text(‾1,C,20," 
:Text(C,26,"  
:Text(B,20,"->
:B→C
:B+10(K=34)-10(K=25)→B
:A+(K=105)→A
:A+(K=92)→A
:A+(K=93)→A
:A+(K=94)→A
:A+(K=45)→A
:If B=50
:20→B
:If B=10
:40→B
:End
:If K=92
:20→B
:If K=93
:30→B
:If K=94
:40→B
:If K=45
:90→B
:If B=90
:Then
:1→D
:End
:If B=20
:Then
:ClrDraw
:Text(7,35,"JDODGE
:Text(21,30,"Created By:
:Text(29,30,"Josh Frisby
:Text(45,20,"Thanks for playing!
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat getKey
:End
:ClrDraw
:Text(7,33,"WEBSITE
:Text(15,8,"freewebs.com/sadmeal
:Text(25,27,"-FEATURES-
:Text(33,30,"Programs
:Text(40,35,"Games
:Text(47,35,"Forum
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat getKey
:End
:End
:If B=30
:Then
:ClrDraw
:Text(2,35,"CHEATS
:Text(10,25,"1. JOSH MODE
:Text(20,25,"2. SLOMO MODE
:Text(30,25,"3. 5X SCORE
:Text(40,25,"4. RESET SETTINGS
:Text(50,7,"Press CLEAR to go to MAIN
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat K=45
:getKey→K
:If F=1
:Text(10,20,"X
:If G=100
:Text(20,20,"X
:If H=5
:Text(30,20,"X
:If K=92
:Then
:1→F
:End
:If K=93
:Then
:100→G
:End
:If K=94
:Then
:5→H
:End
:If K=82
:Then
:Text(‾1,10,19," 
:Text(‾1,20,19," 
:Text(‾1,30,19," 
:1→H
:DelVar F
:1→G
:End
:End
:1→D
:End
:If B=40
:Then
:∟JD20A(1→θ
:If θ=1
:Then
:S→∟JD20B
:ClrDraw
:Text(27,25,"FILE SAVED!
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat getKey
:End
:End
:If θ=0
:Then
:∟JD20B(1→S
:ClrDraw
:Text(27,25,"FILE LOADED!
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat getKey
:End
:End
:End
:DelVar B
:1→D
:End
:If B=40
:Then
:ClrDraw
:Text(2,33,"EXTRAS
:Text(10,25,"1> CONTROLS
:Text(20,25,"2> CHARACTERS
:Text(30,25,"3> AUTO PILOT ON
:Text(40,25,"4> OBJECTS FALL?
:If W=1
:Text(30,25,"3> AUTO PILOT OFF
:Text(50,7,"Press CLEAR to go to MAIN
:10→B
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat A=1
:getKey→K
:Text(‾1,C,15," 
:Text(C,21,"  
:Text(B,15,"->
:B→C
:B+10(K=34)-10(K=25)→B
:A+(K=105)→A
:A+(K=92)→A
:A+(K=93)→A
:A+(K=94)→A
:A+(K=82)→A
:A+(K=45)→A
:If B=50
:10→B
:If B=0
:40→B
:End
:If K=92
:10→B
:If K=93
:20→B
:If K=94
:30→B
:If K=82
:40→B
:If K=45
:90→B
:If B=90
:Then
:1→D
:End
:ClrDraw
:DelVar K
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:If B=10
:Then
:Text(7,32,"CONTROLS
:Text(20,32,"DEFAULT?
:Text(30,35,"1> YES
:Text(40,35,"2> NO
:Repeat K=92 or K=93
:getKey→K
:End
:If K=92
:Then
:24→I
:26→J
:21→M
:22→O
:If Str8="LEFT" or Str8="RIGHT
:Then
:25→I
:34→J
:End
:1→D
:End
:If K=93
:Then
:ClrDraw
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Text(2,30,"CUSTOMIZE
:Text(10,25,"INPUT UP
:If Str8="UP" or Str8="DOWN
:Text(10,25,"INPUT LEFT
:Text(20,20,"UP=?
:If Str8="UP" or Str8="DOWN
:Text(20,20,"LEFT=?
:Text(30,20,"DOWN=?
:If Str8="UP" or Str8="DOWN
:Text(30,20,"RIGHT=?
:Text(40,20,"PAUSE=?
:Text(50,20,"OPTIONS=?
:DelVar K
:Repeat K≠0
:getKey→K
:End
:K→I
:Text(20,60,"SET
:Text(10,25,"INPUT DOWN
:If Str8="UP" or Str8="DOWN
:Text(10,25,"INPUT RIGHT
:DelVar K
:Repeat K≠0
:getKey→K
:End
:K→J
:Text(10,25,"INPUT PAUSE
:Text(30,60,"SET
:DelVar K
:Repeat K≠0
:getKey→K
:End
:K→M
:Text(10,25,"INPUT OPTIONS
:Text(40,60,"SET
:DelVar K
:Repeat K≠0
:getKey→K
:End
:K→O
:Text(10,25,"CONTROLS SAVED
:Text(50,60,"SET
:1→D
:Repeat getKey
:End
:End
:End
:If B=20
:Then
:ClrDraw
:0→Xmin
:94→Xmax
:0→Ymin
:62→YMax
:Horizontal(0
:Horizontal(62
:Vertical 0
:Vertical 94
:Text(7,37,"INPUT
:Text(15,39,"YOUR
:Text(23,29,"CHARACTER
:Line(43,31,49,31
:Line(43,31,43,23
:Line(49,31,49,23
:Line(43,23,49,23
:"ABC,.DEFGHIJKLMNOPQRSTUVWXYZθ'. :?²→Str4
:" →Str0:" →Str2
:DelVar X
:Repeat 1<length(Str0) or Str2="²
:getKey→K
:(K>35)(K-45-5int(.1K-5→A
:If A and K≠45:Then
:sub(Str4,A,1→Str2
:Str0+Str2→Str0
:End
:If Str2≠"²
:Text(32,44,Str0
:End
:sub(Str0,2,length(Str0)-1→Str0
:Str0→Str5
:Text(40,37,"ENEMY
:Line(43,14,49,14
:Line(43,14,43,6
:Line(49,14,49,6
:Line(43,6,49,6
:"ABC,.DEFGHIJKLMNOPQRSTUVWXYZθ'. :?²→Str4
:" →Str0:" →Str2
:DelVar X
:Repeat 1<length(Str0) or Str2="²
:getKey→K
:(K>35)(K-45-5int(.1K-5→A
:If A and K≠45:Then
:sub(Str4,A,1→Str2
:Str0+Str2→Str0
:End
:If Str2≠"²
:Text(49,44,Str0
:End
:sub(Str0,2,length(Str0)-1→Str0
:Str0→Str6
:Repeat getKey
:End
:ZStandard
:End
:If B=30
:Then
:If W=1
:5→X
:If W=0
:1→W
:If X=5
:DelVar W
:Text(22,30,"AUTO  PILOT
:If W=1
:Text(35,31,"ACTIVATED
:If W=0
:Text(35,27,"DEACTIVATED
:DelVar X
:Repeat getKey
:End
:End
:If B=40
:Then
:Horizontal(‾10
:Horizontal(10
:Vertical 10
:Vertical 10
:Text(2,27,"OBJECTS FALL?
:Text(10,25,"1. UP
:Text(20,25,"2. DOWN
:Text(30,25,"3. LEFT
:Text(40,25,"4. RIGHT
:Text(50,7,"Press CLEAR to go to MAIN
:Repeat K=45
:getKey→K
:If Str8="UP
:Text(10,20,"X
:If Str8="DOWN
:Text(20,20,"X
:If Str8="LEFT
:Text(30,20,"X
:If Str8="RIGHT
:Text(40,20,"X
:If K=92
:Then
:"UP→Str8
:24→I
:26→J
:21→M
:22→O
:Text(‾1,20,19," 
:Text(‾1,30,19," 
:Text(‾1,40,19," 
:End
:If K=93
:Then
:"DOWN→Str8
:24→I
:26→J
:21→M
:22→O
:Text(‾1,10,19," 
:Text(‾1,30,19," 
:Text(‾1,40,19," 
:End
:If K=94
:Then
:"LEFT→Str8
:25→I
:34→J
:21→M
:22→O
:Text(‾1,10,19," 
:Text(‾1,20,19," 
:Text(‾1,40,19," 
:End
:If K=82
:Then
:"RIGHT→Str8
:25→I
:34→J
:21→M
:22→O
:Text(‾1,10,19," 
:Text(‾1,20,19," 
:Text(‾1,30,19," 
:End
:1→D
:End
:End
:End
:If B=50
:Then
:ClrDraw
:ZStandard
:AxesOn
:ClrHome
:DelVar ZDelVar ADelVar BDelVar CDelVar KDelVar DDelVar EDelVar FDelVar GDelVar HDelVar LDelVar NDelVar PDelVar QDelVar RDelVar TDelVar UDelVar VDelVar YDelVar θDelVar SDelVar XDelVar ZDelVar ∟JD20ADelVar IDelVar JDelVar MDelVar ODelVar WDelVar Str0DelVar Str2DelVar Str4DelVar Str5DelVar Str6DelVar Str8
:Output(1,1,""
:Stop
:End
:If Z=8
:Then
:If Str8="DOWN
:Then
:Output(8,A,"*
:Output(8,A-1,"*
:Output(8,A+1,"*
:Output(7,A,"*
:Output(8,A+2,"*
:Output(7,A+1,"*
:Output(6,A,"*
:Output(7,A-1,"*
:If A>2
:Output(8,A-2,"*
:End
:If Str8="UP
:Then
:Output(1,A,"*
:Output(1,A-1,"*
:Output(1,A+1,"*
:Output(2,A,"*
:Output(1,A+2,"*
:Output(2,A+1,"*
:Output(3,A,"*
:Output(2,A-1,"*
:If A>2
:Output(1,A-2,"*
:End
:If Str8="RIGHT
:Then
:Output(A,9,"*
:If A>2
:Output(A-1,9,"*
:If A<8
:Output(A+1,9,"*
:Output(A,8,"*
:If A<7
:Output(A+2,9,"*
:If A<8
:Output(A+1,8,"*
:Output(A,7,"*
:If A>2
:Output(A-1,8,"*
:If A>2
:Output(A-2,9,"*
:End
:If Str8="LEFT
:Then
:Output(A,2,"*
:If A>2
:Output(A-1,2,"*
:If A<8
:Output(A+1,2,"*
:Output(A,3,"*
:If A<7
:Output(A+2,2,"*
:If A<8
:Output(A+1,3,"*
:Output(A,4,"*
:If A>2
:Output(A-1,3,"*
:If A>2
:Output(A-2,2,"*
:End
:For(θ,1,500
:End
:S→T
:((2S)+312+(3S))*H→S
:ClrDraw
:Text(10,30,"GAME OVER
:Text(25,35,"Score=
:Text(33,35,S
:Text(41,28,"Time Alive=
:Text(49,40,T
:Horizontal(‾10
:Horizontal(10
:Vertical ‾10
:Vertical 10
:Repeat getKey
:End
:1→R
:0→∟JD20A
:DelVar SDelVar FDelVar Z
:1→H
:1→G
:End
:1→D
:End
:1→D
:End
Generated by SourceCoder, © 2005 Cemetech
Ugh, how many K is that?!
What do you mean?
The size- how many thousands of bytes is it?
It exceeds 6k. I think the dramatic size increase is due to all the unnecessary features he added as well as unoptimized code. For example, this loop:

Code:
:Repeat A=1
:getKey→K
:Text(‾1,C,20," 
:Text(C,26," 
:Text(B,20,"->
:B→C
:B+10(K=34)-10(K=25)→B
:A+(K=105)→A
:A+(K=92)→A
:A+(K=93)→A
:A+(K=94)→A
:A+(K=15)→A
:A+(K=82)→A
:If B=60
:20→B
:If B=10
:50→B
:End

Can be optimized for size:

Code:
:Repeat max(K={105,92,93,94,15,82
:Text(‾1,C,20," 
:Text(C,26," 
:Text(B,20,"->
:B→C
:getKey→K
:B+10(K=34)-10(K=25→B
:B-40(B=60)+40(B=10→B
:End

The loop also does not have to execute as many commands, so it will be faster. We are also getting off topic. Wink
Wow, that's some relatively unoptimized code. Anyway, I guess Rivereye will be releasing contest details soon...
if you look at the results right now, stragey and platform are tied, we need one more vote to decide which one will be. Then the exact rules can be worked out from there.
c'mon, someone, be the deciding vote! Smile
Why don't we just have a separate poll with strategy and platformer only? Also, how do u know that some of the people who voted platformer did not want the arcade or the other in that? o.O
that is true, I will do that really quick, will be a one week poll so we can then start quickly get rules all together.
I'm locking this topic. Go to the Contest #2 topic (link) to continue posting.
  
Page 4 of 4
» 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