XMas 2014 PurePunch Contest

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: XMas 2014 PurePunch Contest

Post by djes »

Prizes updated
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: XMas 2014 PurePunch Contest

Post by helpy »

How do you write such a program?

1. Just programming something with indentation and structure ... like other programs?
2. Optimizing and compressing the source code.

How good can you predict before optimizing/compressing if your program will fit the rules?

Thank you,
guido
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: XMas 2014 PurePunch Contest

Post by falsam »

helpy wrote:How do you write such a program?
With PureBasic
helpy wrote:Just programming something with indentation and structure
Yes
helpy wrote:Optimizing and compressing the source code.
hooo yes :)

Try this small compress code : Read and play midi file

Code: Select all

Macro i:If:EndMacro:Macro ei:EndIf:EndMacro:InitMovie();;;;;;;;;;;;;;;;;;;;;;;;
i CreateFile(1,"s1.mid"):WriteData(1,?mid_start,?mid_end-?mid_start);;;;;;;;;;;
CloseFile(1):ei:OpenWindow(0,100,150,200,50,"Midi File"):StringGadget(0,10,20,;
100,22,""):LoadMovie(0,"s1.mid"):Repeat:i MovieStatus(0)=0:i MoviePlay=#False;;
PlayMovie(0,WindowID(0)):MoviePlay=1:ei:Else:i MovieStatus(0)>0:MoviePlay=0:ei;
SetGadgetText(0,Str(MovieStatus(0))):ei;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Until WindowEvent()=#PB_Event_CloseWindow:DataSection:mid_start: :;;;;;;;;;;;;;
Data.q $060000006468544D,$544D600005000100,$FF00350000006B72,$474E4D5957410703,
$6D65540D04FF0052,$53656D69542F6F70,$00000259FF006769,$0020A1070351FF00,;;;;;;;
$00081802030458FF,$006B72544D002FFF,$450A03FF005D0300,$206F6E616950202E,;;;;;;;
$6C6F520C04FF0031,$352D435320646E61,$4A90408104C00035,$815F4A00004A605F,;;;;;;;
$48305F4800004A10,$000047605F470000,$4500004710815F47,$605F43000045305F,;;;;;;;
$0043605F43000043,$40000042605F4200,$815F3E000040605F,$3E605F3E00003E40,;;;;;;;
$003E10815F3E0000,$3E000040305F4000,$605F3E00003E605F,$0045605F4500003E,;;;;;;;
$40000042605F4200,$605F3E000040605F,$0043605F4300003E,$00004740815F4700,;;;;;;;
$5F4A00004A605F4A,$305F4800004A1081,$0047605F47000048,$00004710815F4700,;;;;;;;
$5F43000045305F45,$43605F4300004360,$000042605F420000,$5F3E000040605F40,;;;;;;;
$605F3E00003E4081,$4810815F4800003E,$000047305F470000,$5F47000045605F45,;;;;;;;
$45605F4500004760,$000043605F430000,$5F40000045605F45,$42605F4200004060,;;;;;;;
$004340815F430000,$4A00004A605F4A00,$5F4800004A10815F,$47605F4700004830,;;;;;;;
$004710815F470000,$43000045305F4500,$605F43000043605F,$0042605F42000043,;;;;;;;
$3E000040605F4000,$5F3E00003E40815F,$10815F3E00003E60,$0040305F4000003E,;;;;;;;
$3E00003E605F3E00,$605F4500003E605F,$0042605F42000045,$3E000040605F4000,;;;;;;;
$605F4300003E605F,$4740815F47000043,$00004A605F4A0000,$4800004A10815F4A,;;;;;;;
$605F47000048305F,$4710815F47000047,$000045305F450000,$5F43000043605F43,;;;;;;;
$42605F4200004360,$000040605F400000,$3E00003E40815F3E,$815F4800003E605F,;;;;;;;
$47305F4700004810,$000045605F450000,$5F45000047605F47,$43605F4300004560,;;;;;;;
$000045605F450000,$5F42000040605F40,$40815F4300004260,$004A605F4A000043,;;;;;;;
$00004A10815F4A00,$5F47000048305F48,$10815F4700004760,$0045305F45000047,;;;;;;;
$43000043605F4300,$605F42000043605F,$0040605F40000042,$00003E40815F3E00,;;;;;;;
$5F3E00003E605F3E,$305F4000003E1081,$003E605F3E000040,$4500003E605F3E00,;;;;;;;
$605F42000045605F,$0040605F40000042,$4300003E605F3E00,$815F47000043605F,;;;;;;;
$4A605F4A00004740,$004A10815F4A0000,$47000048305F4800,$815F47000047605F,;;;;;;;
$45305F4500004710,$000043605F430000,$5F42000043605F43,$40605F4000004260,;;;;;;;
$003E40815F3E0000,$4800003E605F3E00,$5F4700004810815F,$45605F4500004730,;;;;;;;
$000047605F470000,$5F43000045605F45,$45605F4500004360,$000040605F400000,;;;;;;;
$5F43000042605F42,$002FFF0000434081,$910200006B72544D,$50202E450A03FF00,;;;;;;;
$FF0031206F6E6169,$646E616C6F520C04,$C10035352D435320,$47605F4791408104,;;;;;;;
$004710815F470000,$43000045305F4500,$815F3E000043605F,$3C305F3C00003E10,;;;;;;;
$00003B605F3B0000,$5F3E000040605F40,$3C605F3C00003E60,$003B40815F3B0000,;;;;;;;
$3C00003B605F3B00,$5F3C00003C20825F,$605F3C00003C2082,$3B40815F3B00003C,;;;;;;;
$003E40815F3E0000,$47000047605F4700,$5F4500004710815F,$43605F4300004530,;;;;;;;
$003E10815F3E0000,$3B00003C305F3C00,$605F4000003B605F,$003E605F3E000040,;;;;;;;
$3B00003C605F3C00,$5F4260003B40815F,$825F3E0000422082,$20825F3C00003E20,;;;;;;;
$3B40815F3B00003C,$000047605F470000,$4500004710815F47,$605F43000045305F,;;;;;;;
$3E10815F3E000043,$00003C305F3C0000,$5F4000003B605F3B,$3E605F3E00004060,;;;;;;;
$00003C605F3C0000,$3B00003B40815F3B,$825F3C00003B605F,$20825F3C00003C20,;;;;;;;
$003C605F3C00003C,$00003B40815F3B00,$4700003E40815F3E,$815F47000047605F,;;;;;;;
$45305F4500004710,$000043605F430000,$3C00003E10815F3E,$605F3B00003C305F,;;;;;;;
$0040605F4000003B,$3C00003E605F3E00,$815F3B00003C605F,$20825F4260003B40,;;;;;;;
$3E20825F3E000042,$003C20825F3C0000,$00003B40815F3B00,$5F47000047605F47,;;;;;;;
$305F450000471081,$0043605F43000045,$00003E10815F3E00,$5F3B00003C305F3C,;;;;;;;
$40605F4000003B60,$00003E605F3E0000,$5F3B00003C605F3C,$605F3B00003B4081,;;;;;;;
$3C20825F3C00003B,$003C20825F3C0000,$3B00003C605F3C00,$5F3E00003B40815F,;;;;;;;
$605F4700003E4081,$4710815F47000047,$000045305F450000,$5F3E000043605F43,;;;;;;;
$305F3C00003E1081,$003B605F3B00003C,$3E000040605F4000,$605F3C00003E605F,;;;;;;;
$3B40815F3B00003C,$004220825F426000,$00003E20825F3E00,$3B00003C20825F3C,;;;;;;;
$2FFF00003B40815F,$0200006B72544D00,$202E450A03FF0073,$0031206F6E616950,;;;;;;;
$6E616C6F520C04FF,$0035352D43532064,$305F2B92208204C2,$0032305F3200002B,;;;;;;;
$00003740815F3700,$5F3200002B305F2B,$40815F3700003230,$3720825F37000037,;;;;;;;
$00002B305F2B0000,$5F37000032305F32,$825F360000374081,$20825F3600003620,;;;;;;;
$3220825F32000036,$00002B305F2B0000,$5F37000032305F32,$305F2B0000374081,;;;;;;;
$0032305F3200002B,$00003740815F3700,$5F3200002B305F2B,$40815F3700003230,;;;;;;;
$3720825F37000037,$00002B305F2B0000,$5F37000032305F32,$825F390000374081,;;;;;;;
$20825F3700003920,$3920825F39000037,$003240815F320000,$3200002B305F2B60,;;;;;;;
$815F37000032305F,$2B305F2B00003740,$000032305F320000,$3700003740815F37,;;;;;;;
$5F2B00003720825F,$32305F3200002B30,$003740815F370000,$00003620825F3600,;;;;;;;
$3200003620825F36,$5F2B00003220825F,$32305F3200002B30,$003740815F370000,;;;;;;;
$3200002B305F2B00,$815F37000032305F,$2B305F2B00003740,$000032305F320000,;;;;;;;
$3700003740815F37,$5F2B00003720825F,$32305F3200002B30,$003740815F370000,;;;;;;;
$00003920825F3900,$3900003720825F37,$5F3200003920825F,$305F2B6000324081,;;;;;;;
$0032305F3200002B,$00003740815F3700,$5F3200002B305F2B,$40815F3700003230,;;;;;;;
$3720825F37000037,$00002B305F2B0000,$5F37000032305F32,$825F360000374081,;;;;;;;
$20825F3600003620,$3220825F32000036,$00002B305F2B0000,$5F37000032305F32,;;;;;;;
$305F2B0000374081,$0032305F3200002B,$00003740815F3700,$5F3200002B305F2B,;;;;;;;
$40815F3700003230,$3720825F37000037,$00002B305F2B0000,$5F37000032305F32,;;;;;;;
$825F390000374081,$20825F3700003920,$3920825F39000037,$003240815F320000,;;;;;;;
$6B72544D002FFF00,$0A03FF0089010000,$6F6E616950202E45,$6F520C04FF003120,;;;;;;;
$2D435320646E616C,$93208204C3003535,$2B00002B20825F2B,$5F3000002B20825F,;;;;;;;
$825F2B0000302082,$20825F2D00002B20,$3220825F3200002D,$002B20825F2B0000,;;;;;;;
$00002B20825F2B00,$2B00002B20825F2B,$5F3000002B20825F,$825F2B0000302082,;;;;;;;
$20825F3200002B20,$3220825F32000032,$003040815F300000,$2B000032605F3200,;;;;;;;
$5F2B60002B40815F,$825F2B00002B2082,$20825F3000002B20,$2B20825F2B000030,;;;;;;;
$002D20825F2D0000,$00003220825F3200,$2B00002B20825F2B,$5F2B00002B20825F,;;;;;;;
$825F2B00002B2082,$20825F3000002B20,$2B20825F2B000030,$003220825F320000,;;;;;;;
$00003220825F3200,$3200003040815F30,$815F2B000032605F,$20825F2B60002B40,;;;;;;;
$2B20825F2B00002B,$003020825F300000,$00002B20825F2B00,$3200002D20825F2D,;;;;;;;
$5F2B00003220825F,$825F2B00002B2082,$20825F2B00002B20,$2B20825F2B00002B,;;;;;;;
$003020825F300000,$00002B20825F2B00,$3200003220825F32,$5F3000003220825F,;;;;;;;
$605F320000304081,$2B40815F2B000032:Data.b $00,$00,$FF,$2F,$00;;;;;;;;;;;;;;;;;
mid_end:;:EndDataSection;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:idea: Compress your code with PurePunch Cruncher
http://www.purebasic.fr/english/viewtop ... 51#p448851

:!: do not compress the DataSection with this tool.

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
es_91
Enthusiast
Enthusiast
Posts: 298
Joined: Thu Jan 27, 2011 12:00 pm
Location: DE

Re: XMas 2014 PurePunch Contest

Post by es_91 »

helpy wrote:How good can you predict before optimizing/compressing if your program will fit the rules?
Well, it's a bit dangerous. You rather should not intend to do too much. Also: find two or three ideas, program them quickly and then decide for one. Perfectionize only the one that suites the rules and the aims of yours best.

My opinion. I'm curious to read some answers from long-term pros!
:mrgreen:
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: XMas 2014 PurePunch Contest

Post by helpy »

Does the linebreak count to the 80 characters? ;-) :-)
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Re: XMas 2014 PurePunch Contest

Post by djes »

Well, maybe if you can say to me what should we take as linebreak, $d, $a, both, chr(27)+$d, chr(27)+"s"+chr(27)+$d+$a+chr(27)+"u", or whatever !

Chr(9)+chr(9)+chr(9)
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: XMas 2014 PurePunch Contest

Post by helpy »

It dont matter if a line break counts 1 or 2 bytes!

I just asked because your header (first posting) has 78 characters and the max. line length of falsams code is 79 characters.

cu,
guido
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
User avatar
majikeyric
Enthusiast
Enthusiast
Posts: 187
Joined: Mon Oct 21, 2013 5:21 pm
Location: France
Contact:

Re: XMas 2014 PurePunch Contest

Post by majikeyric »

Snowball

Image

Are you ready for a snow battle with your friends ? :D

Your are the blue player,
When you shoot another player you gain 1 point.
When your are shot you lost 1 point.
The first with 10 points wins the game !

Controls:

Cursor Left and Cursor Right to move
Cursor Down to pick up snow + SPACE to throw it

Source and executables : http://majikeyric.free.fr/wordpress/?wp ... 90bGluaw==

(64 lines of code and only 78 data lines !)

Code: Select all

;*****************************************************************************
;*
;* XMas 2014 PurePunch contest
;* PureBasic 5.31
;* 64 lines of 80 chars of code + 78 (only!) lines of data
;*
;* Name     : Snowball
;* Author   : Majikeyric ( http://majikeyric.free.fr )
;* Date     : 08/12/2014
;*
;* Are you ready for a snow battle with your friends ?
;* 
;* Your are the blue player,
;* When you shoot another player you gain 1 point.
;* When your are shot you lost 1 point.
;* The first with 10 points wins the game !
;* 
;* Controls:
;* 
;* Cursor Left and Cursor Right to move
;*
;* Cursor Down to pick up snow + Space to throw it
;*
;* Credits  : original C64 graphics by Ashley Routledge (from Snowball sunday)
;*
;*****************************************************************************
#P=2922:#U=13463:#SS=8135:#L=640:#H=480:#NF=200:#Y=380:#W=#White:#D=194:Macro M;
Macro:EndMacro:Macro E:End:End#M:Macro _:Data:End#M:Macro SD(a):st#a#drawing;;;;
EndMacro:Macro Z:Sprite:E#M:Macro R:Structure:E#M:M ES:EndSelect:E#M:Macro DTS;;
DisplayTransparentSprite:EndMacro:M K:KeyboardPushed:End#M:M EI:EndIf:End#M:M Q;
Procedure:EndMacro:M SR:Screen:E#M:M W:Window:E#M:M U:Memory:E#M:M N:Next:E#M;;;
M EL:Else:E#M:M FE:ForEach:E#M:M SL:Select:E#M:M CA:Case:E#M:M RP:Repeat:E#M;;;;
M EE:Element:E#M:M LS:List:E#M:M RD:Random:E#M:M M2(v):j=Create#Z(#PB_Any,24,21,
#PB_#Z#_PixelCollision):s(i+13*(v))=j:SD(art)(Z#Output(j)):For k=0 To 20;;;;;;;;
For l=0 To 23:Plot(l,k,s2\b[k*24+l]):N:N:SD(op)():Zoom#Z(j,48,42):EndMacro;;;;;;
M M1(c,v):s\p[2]=c:CS(@s,@s2.s2):M2(v):I(@s2):M2(v+1):EndMacro:M UT:Until:E#M;;;
M IN:Clear#LS(Z()):For i=0 To 2:ADD#EE(Z()):Z()\N=i:Z()\Y=#Y:Z()\X=RD(319)&$ffe;
Z()\CA=1:Z()\IA=1:sc(i)=0:op(i)=Z():N:Clear#LS(B()):d="":*op1.K=op(0):EndMacro;;
R M:m.a[40*80]:E#R:R N:a.a[8*16]:E#R:R c1:b.a[8]:p.l[4]:E#R:R c2:b.l[8*8]:E#R;;;
R s1:b.a[64]:p.l[4]:E#R:R s2:b.l[24*21]:E#R:R O:X.i:Y.f:V.f:E#R:R K:N.i:D.i:X.i;
Y.i:E.i:P.i:*C.K:T.i:B.i:CA.i:IA.i:S.i:E#R:R BN:T.i:X.f:Y.f:VX.f:VY.f:E#R;;;;;;;
#O=#PB_Key_Space:Dim op(3):Dim ts(256):Dim p.l(16):Dim sc(3):New#LS O.O();;;;;;;
New#LS Z.K():New#LS B.BN():Global Dim s(79),*m.M,*a.N:#C=$ff00ff:G.f=0.2;;;;;;;;
Q A(*b.K,x):*b\CA-1:If*b\CA=0:*b\CA=*a\a[x<<4]:If*a\a[x<<4+*b\IA]=0:f=1:*b\IA=1;
EI:*b\S=s(*a\a[x<<4+*b\IA]+*b\N*26+*b\D*13):*b\IA+1:EI:Q#Return f:E#Q:Q CE(*b.K,
s):*b\E=s:*b\CA=1:*b\IA=1:E#Q:Q CS(*s.s1,*d.s2):For k=0 To 20:For i=0 To 2:d=6;;
For j=0 To 3:c.l=*s\p[*s\b[l]>>d&3]:z=k*24+i*8+j*2:*d\b[z]=c:*d\b[z+1]=c:d-2:N;;
l+1:N:N:E#Q:Q CC(*s.c1,*d.c2):For k=0 To 7:d=6:For j=0 To 3:#Z=#PB_Key_Escape;;;
c.l=*s\p[*s\b[l]>>d&3]:z=k*8+j*2:*d\b[z]=c:*d\b[z+1]=c:d-2:N:l+1:N:E#Q;;;;;;;;;;
Q I(*s.s2):For i=0 To 20:For j=0 To 11:z=i*24+j:z2=i*24+(23-j):p1.l=*s\b[z];;;;;
*s\b[z]=*s\b[z2]:*s\b[z2]=p1:N:N:E#Q:*s=Allocate#U(#P):UseLZMAPacker();;;;;;;;;;
*d=Allocate#U(#U):Restore a:*p=*s:i=#P:Read.s d.s:While i:o.s=Left(d,2):d=Mid(d,
3):If o="" And i:Read.s d:EL#If o:PokeA(*p,Val("$"+o)):*p+1:i-1:EI:Wend;;;;;;;;;
Uncompress#U(*s,#P,*d,#U,#PB_PackerPlugin_LZMA):InitKeyboard():Init#Z();;;;;;;;;
InitMovie():Open#W(0,0,0,#L,#H,"",#PB_#W#_ScreenCentered):Open#W#ed#SR(W#ID(0),;
0,0,#L,#H):Transparent#Z#Color(#PB_Default,#C):*s=*d:Copy#U(*s,@p(0),64):*s+64;;
s.s1\p[0]=#C:s\p[1]=0:s\p[3]=p(10):i=1:RP:Copy#U(*s,@s\b[0],64):M1(p(6),0);;;;;;
M1(p(2),2):M1(p(12),4):*s+64:i+1:UT i=14:c.c1\p[0]=#C:c\p[1]=p(1):c\p[2]=p(15);;
*p=*s:i=0:f$="1.mid":RP:Copy#U(*s,@c\b[0],8):c\p[3]=p(PeekA(*p+2048+i)-8):CC(@c,
@c2.c2):j=Create#Z(#PB_Any,8,8):ts(i)=j:SD(art)(Z#Output(j)):For k=0 To 7;;;;;;;
For l=0 To 7:Plot(l,k,c2\b[k*8+l]):N:N:SD(op)():Zoom#Z(j,16,16):*s+8:i+1;;;;;;;;
UT i=256:*s+256:*m=*s:*s+2000:CreateFile(0,f$):WriteData(0,*s,#SS):CloseFile(0);
*s+#SS:*a=*s:For i=0 To #NF-1:ADD#EE(O()):O()\Y=RD(479):O()\X=RD(1279);;;;;;;;;;
O()\V=RD(2,1)+RD(9,1)/10:N:f=Create#Z(#PB_Any,2,2):SD(art)(Z#Output(f)):Box(0,0,
2,2,#W):SD(op)():LoadMovie(0,f$):IN:RP:RP:UT W#Event()=0:If MovieStatus(0)=0;;;;
PlayMovie(0,W#ID(0)):EI:ExamineKeyboard():If d="":FE Z():If Z()\N:AT=0:AG=0:AD=0
AB=0:*op2=op(Z()\N!3):SL Z()\P:CA 0:If RD(1):Z()\C=*op1:EL:Z()\C=*op2:EI:Z()\P=1
CA 1:If Z()\B:Z()\P=2:EL:AB=1:EI:CA 2:i=Z()\X-Z()\C\X:If Abs(i)>#D:If i<0:AD=1;;
EL:AG=1:EI:EL#If Abs(i)<#D:If i<0:AG=1:EL:AD=1:EI:EL:If i<0:Z()\D=0:EL:Z()\D=1;;
EI:Z()\P=3:EI:CA 3:If Z()\B:AT=1:EL:Z()\P=4:Z()\T=90:Z()\D!1:EI:CA 4:Z()\T-1;;;;
If Z()\D:AG=1:EL:AD=1:EI:If Z()\T=0:Z()\P=0:EI:ES:EL:AT=K(#O):AG=K(#PB_Key_Left)
AD=K(#PB_Key_Right):AB=K(#PB_Key_Down):EI:SL Z()\E:CA 4:If A(Z(),4):CE(Z(),0):EI
CA 5:If A(Z(),5):CE(Z(),0):EI:CA 2:If A(Z(),2):Z()\B=1:CE(Z(),0):EI:CA 3;;;;;;;;
If Z()\IA=2 And Z()\CA=1:Z()\B=0:ADD#EE(B()):B()\T=Z()\N:B()\Y=Z()\Y+10;;;;;;;;;
B()\VY=-2.5:If Z()\D:B()\X=Z()\X-5:B()\VX=-7:EL:B()\X=Z()\X+45:B()\VX=7:EI:EI;;;
If A(Z(),3):CE(Z(),0):EI:Default:If AB:CE(Z(),2):EL#If AT And Z()\B:CE(Z(),3);;;
EL#If AD:Z()\D=0:If Z()\E<>1:CE(Z(),1):EI:Z()\X+2:EL#If AG:Z()\D=1:If Z()\E<>1;;
CE(Z(),1):EI:Z()\X-2:EL:CE(Z(),0):EI:A(Z(),Z()\E):ES:N:EI:Clear#SR(p(14));;;;;;;
SD(art)(SR#Output()):Box(0,400,#L,80,#W):SD(op)():ox=*op1\X-296:If ox<0:ox=0;;;;
EL#If ox>#L:ox=#L:EI:x=ox/16:dx=ox%16:For i=0 To 24:For j=0 To 40:l=*m\m[i*80+x+
j]:If l:DTS(ts(l),j*16-dx,i*16):EI:N:N:If d="":FE Z():DTS(Z()\S,Z()\X-ox,Z()\Y);
N:FE B():B()\X+B()\VX:B()\Y+B()\VY:B()\VY+G:If B()\Y>420:Delete#EE(B()):EL;;;;;;
DTS(s(65),B()\X-ox,B()\Y):If B()\Y<410:FE Z():If Z#PixelCollision(s(65),B()\X,;;
B()\Y,Z()\S,Z()\X,Z()\Y):sc(Z()\N)-1:sc(B()\T)+1:If (Z()\D=0 And B()\VX<0) Or;;;
(Z()\D=1 And B()\VX>0):CE(Z(),5):EL:CE(Z(),4):EI:Delete#EE(B()):Break:EI:N:EI:EI
N:EI:FE O():If O()\X>ox And O()\X<ox+#L:Display#Z(f,O()\X-ox,O()\y):O()\Y+O()\V;
If O()\Y>420:O()\Y=0:EI:EI:N:For k=0 To 2:DTS(s(1+26*k),580,k*42);;;;;;;;;;;;;;;
SD(art)(SR#Output()):DrawText(620,k*42+18,Str(sc(k))):SD(op)():N:If sc(1)=10 Or;
sc(2)=10:d="loose":EL#If sc(0)=10:d="win":EI:If d:SD(art)(SR#Output());;;;;;;;;;
DrawText(280,220,"You "+d):SD(op)():If K(#O):IN:EI:EI:FlipBuffers():UT K(#Z);;;;
_#Section:a: :_.s"5D00000001000068BE5100372D947F456664499A252B19095F5D99422F6A",;1
"564DC1180EA39182B5994FE60F566CF97F5423C7315C8BA305145FEB5DA1C6C01C703F870154",;2
"5A77D3B6DBF5C5FEFE4E14C70AB1D5D2489689657E08BF864BBB41842CF7F973BBC4F8098C67",;3
"49BD036D048D1A5FC2B841323830A0BC2775687DA7952197BF69D340FF0F259CCEC7990849B0",;4
"500F5F984D9A8C9B03F481FC7A896CAA7A38E90602EC3E281D402AB8EB1B8DBA44A9FB7EA3E5",;5
"06D3BFBA7D5FCE4EDC06FA06A555187BB8DF10927FB95E3F7F9AFA087A4A35EAFCB8F7FD0A1D",;6
"A1D71E2E14503F579213B55F925AF4AF1A234F2B978985F4F6C74271738975431FAE00A5366D",;7
"A44EE4EC63482A7C87CE03BD683134E153DB4899979448C57952535A178EB3CA0085247C4264",;8
"92877A4BE8E3BA922344E394B6096C8C0D4E6E32AB089376356ED3489881BAD37EF73378F147",;9
"EE154E2D6CC98BEEE0E568653AFAACB3DBB696E71348AA1E88103F9A741917B0E612F31652AE",;10
"F0A3D14505889F9A24575B15E743542F62CE1F849DBECEB046103212D5260ECB8BC0FA08E336",;11
"AFEBBEE6635B805A9A2CE0C6D6640323777ECF6DB16CC0CB3F536B8A9B49B668B178548B0BB4",;12
"D91FF2A8DDD30742A10522C11F4B2D3CED244D413947FD86C3911AFF559153CA85E74ACDBE51",;13
"5B926E204AEA64238446054CEF2923936CC8B2016327D04A89EEA1DE81ED458393D207DFBDA2",;14
"731E6AAD21014D73E722CAF6B1D57F7245F03C56E6EADED6A7FEBEA69DAB93E134BCFDEF692C",;15
"18859ED3D7812C289F649A32BCF85EE3A01C5319352F9AF4E6C1ECE4354423C0AABFEB08359E",;16
"59871EE521B70B4D4F32155E353452721F639F01CF1288ADE9C1AE8438DB3330276F9FD13B65",;17
"6C31C30B471D9D86FE26B0D9A5D7F7C51C89ABE99E521EAAA3B16AFF2263449524D3C050A4B9",;18
"4A03E6CB9433C85EDAFD28FAC385CDF3D1A31F34098823D7402335AEDBAFE73F160CCEA68900",;19
"F8D715E32B6C1ADBA65450C1206C6FC16E4C81D5642D0C4FE60220B4817BC6EF885D3E87FFDE",;20
"66F99998EB3D9D4AF2335FD35A4CB7B12E71393878FEC6BE9153C2DAB1FEE3E109E34ACFC9D8",;21
"83CA42F4D576A9AA4AEF6ABE67EB8D0071F8E9C29FC90AEB3663231716B663BCD1CB95E07743",;22
"DC4ECAF07F2E73FEA256C98885CB576306A9F2B40496046F2BFDFCDDA99FA3A786D7D892FA3B",;23
"42C533D0880AD365EFD09A615E2D7D92A1F9DAE6CBDCC6E11385B900913853095328C85B9CBD",;24
"C2599CA6C73E8DCAE9D732BDB73FD2F6D48581F66CCA12040B691802571808A5A75421CF2061",;25
"745484BCEE1D41C55B3B9A872A88027C6BB93088C04795344F0C4DF58D9D4C23BFB56BF010D5",;26
"10963B6F18FAAA57CA90A46B205295B786A8A5B3E26EB8A80C5284BB0BB4151B0BB3194AB8EB",;27
"9ED87A5C5475C086A5FF8ED206BB1575B02195BCECEFEDA14A3CEF9BCF38B7A6446A869BC2D8",;28
"2CF149B1F882BDFEB69E6BCD6456E4FF21326F4C12C9A6576EDE5BDB1581F38061F13EE8B1FF",;29
"23E63571569A3725CF2F0384150D32A4385612C4019E83E9DC30608617AF1421BA5CC7554036",;30
"50BFF9680F7014AC4BD6AA7639F48DFE10488D4D839EB77C4C9B01877F977E60D726D8EF5A3A",;31
"09AB4F5F5F593EC5AFBC87C13469D92CB2ED157F07A75927446D7708E2C9E7A29482D0C07257",;32
"8F6777A6D4DB32269AFD9CEA2265C70792B07DEA52E4987BB3F3DFEAB047EA467529715A5436",;33
"81178061B587E49F3D807AA915C06CC83109B8DD6D3BBDF0AE44C9D27AF64EA3D08DF351114D",;34
"2BAD9D50CEC0039AA25F15E339C412A3D482A22DEC48687D3929DD1CB863B74F26CCC40D3124",;35
"8C3AE0F48FAF004062368910E211D3C4B6C76FAF4B93FA8D61EC9E95020D87795C2DDCB8AC0E",;36
"331444E710FB1CCF74A1F91020B59B24623F0ECBB8E4FA42051292E3FFF8239C99B2C358A92A",;37
"178219699D0538620066539E612FD69940F84784C32970F97789F5FEB513CFA65402E0350044",;38
"6DB862EFD926654EF519E75434823CE9316292DBA3BEB96F43E1916CBAFEDD5176D548A4A61E",;39
"03E9FB89D1EB5BD3CC79054317E06190031BB54F62CC77A6971F6D241225C64A367E5504B8A4",;40
"AA78682246F0375CBDC44A69285F3B9FEBCEA02C65757D914E891125582E90DECA8CE96C84BA",;41
"C600C03AA33175A1FF42F350FBE2D867FECDF36B48B3BAEB5F31D3D0660E7CC2428602BE14A5",;42
"812EAA62B09A465EF1C71E28AD7DD5C75D4EF8C67B18A7EC3DB13742C1E3E0CB9DB86FF44F7F",;43
"59F0593FB8382359DEF70CA94C0B917B5CF1E76F84E1F07D096C132941380D5836F699B8F219",;44
"0A24008BA30A8B46D8AD1B0A3F027FB335323166005592E05B8E77FA4190EE75513C618A9875",;45
"A2DC66652AB61F65ACD25587C6E54047AE9644E302FA7565B36EADAF8079A65DAF6A509DCE4E",;46
"659A3259257DD20FB77020F2180D87356EA91B5B97DA92DDEEECF20CA7A96CC017B965525A0F",;47
"60C34FEA4704F3BB3EB53556E576B6BEECE400F16481A5B727D7BCF9344EF5E68C1233EAD4B6",;48
"01D9178B8ACC74ABD11E981FD8B309AEC41F998E777DC4939222DE89BB06E4EC6674A3801AD4",;49
"5ACE6C65E6AA5256B830F7FD4C3D7A1E81AB7577F22153DAFAD65FB91CF90FC478A46A881605",;50
"124D312A633950E8733F4073B0F449D403ACC4BC1F1628B9F7F9CABA855850E4B3FEFED6599C",;51
"985D5E7231E19A2AA7B084EF3B04D3DB438FDB9E08A29F354EA15326EB3A789CC66C77F23151",;52
"C235CB6CCA7C9AEFB759C8BA9E91CD2C3DB7882B148CDB0ED4F7D5F05118B2AC0B297F63D6A2",;53
"A776C9FC3AA42356A06ECF72F32C2D3431B70EC87F03F5E26F9C57F96D6904556EA4DD84A815",;54
"93B9909BE8509DFCFE6691B98BB0808A83EF0F795EC6425781D317598ED46D9E629979357773",;55
"3AA605EC8D9EE5A890DA4CF777DF06D0B32501E44E4A57013EAFA20F94D826B437930689C72F",;56
"89CA74EA95DFC4E1F9A48E9BEBF47D8827CF844873FB15D1CF36C30D00A0D5966D1710A83500",;57
"D31DD8A7A2478F00D55B1F1215692A8A51382EEBF647CCBFFDDA23818FAC3B3B301865B7481F",;58
"6EA2C7E3BF7F111FFA41D38F689E31848B69C07688045FE25D5EE040F5228A0C4D23C02995D2",;59
"DE3DB97F89ABB5A85307C72A3742F1D5EF492B858C77804E7B4BE82105A70E466C937E9DA8AC",;60
"402917C7CFA9B348CE380C01ACC46921FEC9853510554BBD4986DBB78FBFDF355F428F235EF0",;61
"8C322F3A946865326C3E2D5C40C6F181B7A36A70F40552E9DEB509AFE068DAF2B4373BC47DF8",;62
"F40982CBD8CDD837AE8D2920779E330F4FDE7EAF226F53E819DD7AF0AB8A09D30A77A99B516D",;63
"1C75C6E1A5A1FC140083DB946D5BC8FB1B747A4F36A986346535222C1ED55357D438D5648F78",;64
"819DEACA94EB139D6F1E910D41AFC12649D2A1FC3B6988BBFD798049B1A2D6ADA54AB88B571F",;65
"85F2DCA1CBC8501981054E5B784E53FBCC61BD234D4CCD573220400996C2FBA3C82F590EE2C2",;66
"D2C998AC03BE27085E3A743F2F5347E5DE81D6F55CC7AA3D5D1A245145D806DAC4D695471316",;67
"2550B21980C717AB8DD810345446EF8DFAEDD66B3EE2FB19F7BFD6B461468C86FBAC288F64FF",;68
"DA08B37E825C9B1A9B36B6EE4C7D7AB6F34B8299D125B656F2BADE50B42316A7B8A001ED85FF",;69
"9ECE5509D553835862606D0E957548507EAE1B0EFAE642BC06248194981E55D1B8A7C324FC7E",;70
"A41CDD27309D8716C09C4B3F2155421BD0600329BBA9337B1BCA4DE139C6CE01B4540137BDE7",;71
"8E68DECA68DA1A77D43297520F65FBEACED063977395898D1A8F9F674F8CC361C56F12184CFB",;72
"6F49B9A42486A78DE1FB36C7E717A3ADC73B0EA7A6773309AC43397F4C6AF234E06A27E055F7",;73
"0DF121E97C1BC5E0C618338B4CDC84223FBDFD5360BB4A73621D6A1C87A1499B4836B82EA227",;74
"3260083A7A452BDC18B31A1FBDF5CD900835ECFE22D33FBCCAAA35353073B4E8A21808340C88",;75
"1B32D60ADDB4AEE9AA46D0B8F718DCAE8439B19F158A82A5AC9F3012D2A8767B7D5A4C3E6A2C",;76
"425C65DFA86FE8139DD768DEFE21281348994E0C8B0B10364DCEAA472489A46DF282B9A9D129",;77
"60C75057":E#_#Section;78
Last edited by majikeyric on Tue Dec 09, 2014 5:44 pm, edited 3 times in total.
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 544
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: XMas 2014 PurePunch Contest

Post by bbanelli »

majikeyric wrote:Snowball

Image

Are you ready for a snow battle with your friends ? :D
I know that this isn't thread about praises (we will have time for voting) but this is absolutely fantastic!!! Great job!
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: XMas 2014 PurePunch Contest

Post by Tenaja »

bbanelli wrote:I know that this isn't thread about praises (we will have time for voting) but this is absolutely fantastic!!! Great job!
ditto.
My only "complaint" would be to use space bar to throw. I kept pressing it (out of habit), and nothing happened...
User avatar
majikeyric
Enthusiast
Enthusiast
Posts: 187
Joined: Mon Oct 21, 2013 5:21 pm
Location: France
Contact:

Re: XMas 2014 PurePunch Contest

Post by majikeyric »

Tenaja wrote:My only "complaint" would be to use space bar to throw. I kept pressing it (out of habit), and nothing happened...
Fixed :)
User avatar
falsam
Enthusiast
Enthusiast
Posts: 632
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: XMas 2014 PurePunch Contest

Post by falsam »

Very very nice work. The challenge is going to be difficult with this code. I hate you! .... ha ha

➽ Windows 11 64-bit - PB 6.21 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect 🤪
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: XMas 2014 PurePunch Contest

Post by davido »

@majikeyric

Delightful! - Pure magic! :D
DE AA EB
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: XMas 2014 PurePunch Contest

Post by Tenaja »

majikeyric wrote:
Tenaja wrote:My only "complaint" would be to use space bar to throw. I kept pressing it (out of habit), and nothing happened...
Fixed :)
:D
pretty neat.
User avatar
majikeyric
Enthusiast
Enthusiast
Posts: 187
Joined: Mon Oct 21, 2013 5:21 pm
Location: France
Contact:

Re: XMas 2014 PurePunch Contest

Post by majikeyric »

Thanks for your nice comments :)
Post Reply