Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 12:44 17 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Colour Maximite 1 & 2 BASIC Programming Challenge 2021

     Page 3 of 8    
Author Message
TimD
Newbie

Joined: 23/02/2021
Location: United Kingdom
Posts: 27
Posted: 12:03am 02 Mar 2021
Copy link to clipboard 
Print this post

  thwill said  With only one month to go there has been exactly ...

... ONE entry sent to the official email address cmmprogrammingchallenge@gmail.com - and the crowd goes wild with excitement .

My entry is getting there, so hopefully if all goes well it'll be keeping the other entry company soon

I expect there are many other attempts in progress.  I think it's a bit like a painting - it's tempting to keep dabbing away at it, trying to refine it further and further - the problem is deciding when it's finished...

I'd encourage everyone to have a go - it's a really enjoyable and satisfying challenge!
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 04:55am 02 Mar 2021
Copy link to clipboard 
Print this post

Come ON,

Let's make bigmik go broke with prize give aways.. (too late I am already broke)..

Seriously,

The more the merrier..

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 12:27pm 03 Mar 2021
Copy link to clipboard 
Print this post

  TimD said  My entry is getting there, so hopefully if all goes well it'll be keeping the other entry company soon

I expect there are many other attempts in progress.  I think it's a bit like a painting - it's tempting to keep dabbing away at it, trying to refine it further and further - the problem is deciding when it's finished...

I'd encourage everyone to have a go - it's a really enjoyable and satisfying challenge!


Thank you Tim !

@vegipete, @lizby is there any reason you haven't submitted your entries despite having posted them on TBS ?

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 01:54pm 03 Mar 2021
Copy link to clipboard 
Print this post

  thwill said  ... @lizby is there any reason ...


Sloth, breakage of my VGA to HDMI adapter, bitter cold inhibiting treks to the barn where my VGA monitor is. I'll get to it, but I have to review it first to make sure I submit a working version.

~
Edited 2021-03-03 23:55 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 02:35pm 03 Mar 2021
Copy link to clipboard 
Print this post

  lizby said  I'll get to it, but I have to review it first to make sure I submit a working version.


Thank you!

It's another world where people are storing their VGA monitor in a "barn"

Best wishes,

Tom
Edited 2021-03-04 00:37 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3585
Posted: 02:47pm 03 Mar 2021
Copy link to clipboard 
Print this post

Mine is in the attic.... another world for sure.. Bitter cold in winter, and blazing hot in summer.

P.S. thwill, I will send an entry, but it simply is not ready. AFAIK there are still 4 weeks to go...
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 02:53pm 03 Mar 2021
Copy link to clipboard 
Print this post

  Volhout said  Mine is in the attic.... another world for sure.. Bitter cold in winter, and blazing hot in summer.


I try to keep electronics out of the attic, fortunately we have a dry cellar.

  Quote  
P.S. thwill, I will send an entry, but it simply is not ready. AFAIK there are still 4 weeks to go...


That's brilliant, and yes the closing date is Friday 2nd April.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 03:57pm 03 Mar 2021
Copy link to clipboard 
Print this post

  thwill said  ... in a "barn"




Barn enough for you?

Right-side interior changed a bit in 2004:


Shots below construction views are "after" views. Wooden table in upper right now turned to come out from the wall and completely covered with electronics stuff, including VGA monitor.

My view: live webcam

Eagles regularly come to that big snag on the right.

And the whole thing is just a tad more crowded than those shots show.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 07:23pm 03 Mar 2021
Copy link to clipboard 
Print this post

OK, more than a bit jealous ;-)

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3585
Posted: 08:20am 04 Mar 2021
Copy link to clipboard 
Print this post

@lizby
Wauw, you have a view over the lake / river.
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3585
Posted: 07:39am 12 Mar 2021
Copy link to clipboard 
Print this post

Hi Mick and Tom,

I have submitted my entry for the contest. It is a CMM1 game, running on a CGCOLORMAX2. You should be able to run it on a CMM2 with OPTION LEGACY ON.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 04:12pm 14 Mar 2021
Copy link to clipboard 
Print this post

We have now received THREE submissions to the official email address cmmprogrammingchallenge@gmail.com.

Only about 2.5 weeks to go so everyone else better get their skates on

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1085
Posted: 06:29am 17 Mar 2021
Copy link to clipboard 
Print this post

Here is another One Page Wonder.

Once again, the Green Hills are under attack! Do you have what it takes to take command?

This requires a mouse and uses all three buttons - left, right and wheel. Move the mouse for targeting, of course.

If your mouse is connected directly to the CMM2, you will need (and will probably already be using) beta firmware 5.07.00bX.

If your mouse is connected through a Hobbytronics or equivalent, firmware release 5.06.00 should work fine.

The very first statement of the first line sets the mouse port. Adjust this to match your system. "mp=0" means use the built-in port available with 5.07.00bX

If you don't have a mouse? Well, I guess the green hills are doomed.

mp=0:sd=&hF000000:rd=RGB(RED):gn=&hF00FF00:bl=RGB(BLUE):yl=rd OR gn:mode 2,12,bl:cls:pause 999:hs=0
sh=MM.HRES:sv=MM.VRES:p 1:?@(20,0)"Wave:":controller mouse open mp:sub c k:text t(k),sv-40,h$,CT
end sub:?@(60+sh/3,0)"Score:":?@(.7*sh,0)"High Score:":dh:gui cursor on 1,0,0,rd:settick 25,MM,1
dim x(15,1)=(3,3,2,4,1,3,5,0,2,4,6,1,3,5,2,4,6,0,1,1,2,2,2,3,3,3,3,4,4,4,5,5),vc(5)=(1,2,3,5,6,7)
math scale x(),5,x():dim m(48,6),u(1),e(100,3),a(48,7),t(8),v(8),b(2):h$=string$(3,165)
for i=-4 to 4:t(i+4)=sh*(.5+i/10):next:?@(0,0)chr$(142):for i=1 to 48:sprite read i,2,4,4,4:next:cls
p 3:cls:for i=0 to sh:line i,sv,i,sv-30-r(4)-10*(abs(cos(i*8.0/sh+2.26)))^6,1,gn:next:f 0:f 4:f 8
p 0:dc:do:math set 1,v():wv=0:text sh/2,sv*3/4,"Click to play...",CM:ws:w=0:s=0:done=0:do:am=26
es=min(10+w,25):w=w+1:dc:for i=1 to 25:nin i,r(sh),0,r(9):next:for i=1 to 5:a(11+r(10),0)=1:next:do
if timer>100 then:if ml then:NM 0:endif:if mw then:NM 1:endif:if mr then:NM 2:endif:endif
for i=1 to 48:if m(i,0)then:if m(i,3)or m(i,4)then:inc m(i,1),m(i,3):inc m(i,2),m(i,4)
if (abs(m(i,2)-m(i,6))<2)and(abs(m(i,1)-m(i,5))<2)then:m(i,0)=0:e(i,0)=2:e(i,1)= m(i,1):inc en
e(i,2)=m(i,2):e(i,3)=.1:m(i,1)=sh-1:m(i,2)=sv-1:endif:endif:endif:sprite show i,m(i,1),m(i,2),1
next:for i=1 to 100:if e(i,0)then:if e(i,0)>30 then:e(i,3)=-.1:endif:sub p k:page write k:end sub
if e(i,3)<0 then:circle e(i,1),e(i,2),e(i,0),1,1,0,0:endif:if e(i,0)<2 then:e(i,0)=0:en=en-(en>0)
else:inc e(i,0),e(i,3):circle e(i,1),e(i,2),e(i,0),4,1,yl,rd/e(i,0)OR sd:endif:endif:next
if( an<10)and(rnd<.0025)and(es>0)then:inc an:a(es,2)=1:es=es-1:endif:for i=1 to 48:if a(i,2)then
line a(i,1),a(i,2),a(i,5),a(i,6),1,0:inc a(i,1),a(i,3):inc a(i,2),a(i,4):if a(i,2)<sv-40 then
if pixel(a(i,1),a(i,2))=yl then:ix i+49:a(i,2)=0:ss 10:else:line a(i,1),a(i,2),a(i,5),a(i,6)
if a(i,0)=1 and rnd<.002 and a(i,2)<sv/3 then:a(i,0)=0:z1=r(8):if z1>=a(i,7)then:inc z1:endif
z2=r(7):if z2>=a(i,7)then:inc z2:endif:if z1=z2 then:inc z2:endif:nin am,a(i,1),a(i,2),z2
nin am+1,a(i,1),a(i,2),z1:am=am+2:an=an+2:endif:endif:else:ix i+49:a(i,2)=0:v1=25:v(a(i,7))=0
play sound 1,b,n,100,v1:if a(i,7)mod 4=0 then:z=a(i,7)\4:b(z)=0:for j=1 to 16:if m(j+16*z,4)=0 then
m(j+16*z,0)=0:m(j+16*z,1)=sh-1:m(j+16*z,2)=sv-1:endif:next j:endif:endif:endif:next i
loop until es+an+en=0:bn=0:bp=200:d=sh/4:text sh/2,sv/2-20,"Wave "+str$(w)+" done!",CT
?@(60+sh/3,sv/2)"Bonus:":for i=1 to 48:if m(i,0)then:d=d+8:bn=bn+50:?@(d,20+sv/2)chr$(142):ss 50
?@(sh/2,sv/2)bn:sprite show i,sh-1,sv-1,1:up:pause 5:endif:next:d=sh/4:wv=6:for i=0 to 5
if v(vc(i))then:wv=wv-1:d=d+40:bn=bn+300:?@(d,40+sv/2)h$:?@(sh/2,sv/2)bn" ":ss 300:up:pause 55
endif:next:if bn=0 then:text sh/2,sv/2+20,"All is destroyed. Game Over.",CT,4,,rd:dh:done=1
elseif wv then:text sh/2,sv/2+80,"Bonus! One village rebuilt.",CT:endif:pause 4000:loop until done
loop:sub ix k:e(k,0)=2:e(k,1)=a(i,1):e(k,2)=a(i,2):e(k,3)=.1:inc en:an=an-(an>0):end sub:sub ss k
p 1:s=s+k:?@(sh/2,0)s:p 0:end sub:sub dh:p 1:hs=max(hs,s):?@(.7*sh+85,0)hs:p 0:end sub:sub scl k2
for k=1 to 51:blit 0,sv-51,0,sv-50*(k2=0)-k*(k2=2),sh,50,k2:pause 20:next:end sub:sub nin k,ax,ay,q
a(k,7)=q:a(k,6)=ay:a(k,5)=ax:u(0)=t(q)-ax:u(1)=sv-40-ay:MATH V_NORMALISE u(),u():q=atn(w/20)
a(k,4)=u(1)*q:a(k,3)=u(0)*q:a(k,2)=a(k,6):a(k,1)=a(k,5):a(k,0)=0:end sub:sub NM l:if b(l) then
v2=25:play sound 2,b,p,100,v2:k=b(l)+l*16:inc b(l),-1:m(k,1)=t(l*4):m(k,2)=sv-50:m(k,5)=mouse(x,mp)
m(k,6)=min(sv-80,mouse(y,mp)):u(0)=m(k,5)-m(k,1):u(1)=m(k,6)-sv+50:MATH V_NORMALISE u(),u()
m(k,3)=u(0)*2.5:m(k,4)=u(1)*2.5:timer=0:endif:end sub:sub dc:scl 0:math set 0,m():for k=1 to 48
m(k,0)=1:m(k,1)=-16+x(k mod 16,0)+t(4*((k-1)\16)):m(k,2)=sv-11-x(k mod 16,1):next:math set 16,b()
math set 0,e():if wv then:do:k=r(6):loop until v(vc(k))=0:v(vc(k))=1:endif:cls:p 1:?@(85,0)w
page copy 3,2:p 2:for k=0 to 5:if v(vc(k))then:c vc(k):endif:next:p 0:scl 2:end sub:function r(k)
r=int(rnd*k):end function:sub f k:text t(k),sv-52,chr$(150),CT,,,,-1:end sub:sub m2 a,b,d:a=b XOR d
a=a AND d:b=d:end sub:sub MM:gui cursor mouse(x,mp),min(sv-80,mouse(y,mp)):m2 ml,L0,mouse(L,mp)
m2 mw,W0,mouse(W,mp):m2 mr,R0,mouse(R,mp):v1=max(0,v1-(v1>0)/4):play sound 1,b,n,100,v1:v2=v2-(v2>0)
play sound 2,b,p,100-v2,v2:end sub:sub ws:g$="In Renewed Defense of the Green Hills    by vegipete"
o=0:do:for k=1 to 52:text 50+k*10,sv/4+10*sin((k+o)/4),mid$(g$,k,1),,4,,yl:next:o=o+.02
loop until ml or mw or mr:end sub:sub up:play sound 2,b,t,bp,12:bp=bp+50:pause 45:play stop:end sub

Let me know if you find any bugs. Have fun.
Visit Vegipete's *Mite Library for cool programs.
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 08:23pm 18 Mar 2021
Copy link to clipboard 
Print this post

This is my last version of HOPE ROBOT:

DIM XP(2),YP(2),FX(4),FY(4),FA(4),FD(4),FS(4),PX(99),PY(99),CX(99),CY(99),PA(99),PM(99),PP(99),Z(99)
SUB PR F,T,X,Y,C,O,A$,Z,S:PG 1:FONT #F,T:COLOR S:FOR ZA=-Z TO Z+1:FOR ZB=-Z TO Z:?@(X+ZA,Y+ZB,1) A$;
NEXT:NEXT:COLOR O:?@(X+1,Y,1) A$;:COLOR C:?@(X,Y,1) A$;:END SUB:OPTION ANGLE DEGREES:YW=10^8:R=7.8^8
SUB HR:IF PU OR LF=0 THEN PLAY SOUND 4,B,Q,900,10 ELSE PLAY SOUND 4,B,O:END SUB:SUB MT C:SN C,"O",1
END SUB:SUB PG T:PAGE WRITE T:END SUB:XX=640:YY=400:TC=&HFF2800:W=10^8.4:N=&HFF00BF:SUB SN C,P$,F,V
EXECUTE "PLAY SOUND "+STR$(C)+",B,"+P$+","+STR$(F)+","+STR$(V):END SUB:MODE 2,8:DO:YD=7763456:V=V+1
YB=50^4:Y=200:LF=Y-V*2:DN=300:U=4^11:GO=0:DD=0:SETTICK 0,HR:PLAY STOP:X=0:L=.1:IF SV=0 THEN SC=0:V=2
DO WHILE KEYDOWN(1)<>32 AND SV=0:PG 1:CLS 99:T=COS(I)*1+1:PR 3,3,82,145,R,R,"HOPE ROBOT",T,R:B=255
PR 7,2,4,4,W,W,"HIGH SCORE:"+FORMAT$(HS,"%06.0f"),2:S=T*99:PR 7,2,238,DN,S,S,"PRESS SPACE",2:I=I+30
PR 1,1,230,385,W,W,"MAURO XAVIER - 2021",2:PAGE COPY 1 TO 0:SN 1,"T",T*75+1,25:LOOP:CLS TC:PG 2:SV=0
MS$="GAME OVER":D=0:S=65:MATH SET 0,FA():MATH SET 0,PA():SETTICK 25,HR:AN=0:TIMER=0:UP=99:CLS TC
BOX 0,170,XX,60,0,,U:DO WHILE LF>=0:PG 2:SW=G MOD 2:RA=RND*10-5:RB=RND*10-5:A=XX-M:IF WL<1 THEN CP=U
WL=WL-1:UP=MAX(P,MIN(DN-80,UP)):DN=MAX(UP+80,MIN(380,DN)):BOX A,0,M,YY,0,,TC:BOX A,UP,M,DN-UP,0,,CP
FOR T=0 TO 19 STEP 4:C=RGB(255-T*9,40-T,0):BOX A,UP+T,M,2,0,,C:BOX A,DN-T,M,2,0,,C:NEXT:CP=YD:DG=G*H
SX=-6*(X>610):M=V+X\35:IF RND>0.8 THEN:DO WHILE I<=39:INC I:IF PA(I)=0 THEN:PM(I)=0:CX(I)=-RND*4-M
PA(I)=3:PY(I)=UP+5+RND*(DN-UP-9):PP(I)=R:PX(I)=XX:CY(I)=RND*8-4:Z(I)=RND*3+2:I=40:ENDIF:LOOP:ENDIF
PG 1:FOR T=0 TO XX STEP 30:DG=DG+12:BLIT T,0,T,COS(DG)*8,30,YY,2:NEXT:IF TIMER>999 AND LF>0 THEN
PT=680:SY=0:PAGE SCROLL 2,-M,0,0:UP=UP+RA:DN=DN+RB:FOR T=1 TO 4:K=KEYDOWN(T):IF K=32*(F+1) THEN F=1
SX=SX+((K=131)-(K=130))*3:SY=SY+((K=129)-(K=128))*3:NEXT:GO=1:ELSE:EN=0:ENDIF:TX$="SAVED":S=S-SGN(S)
SC=SC+IS*(1-DD):D=D+SY:S=S+SX:X=X+S/10:Y=Y+D/10:SN 1,EG$,(9-S\13)\3+TM,9:EG$="N":IF X<0 THEN X=0:S=0
SS=S:SS=MAX(-5,MIN(9,SS)):D=D-SGN(D)*(SY=0):D=MAX(-40,MIN(40,D)):XP(1)=X+COS(D+120)*TM:IS=M/50+SV*50
XP(0)=X+COS(D)*P:YP(0)=Y+SIN(D)*P:YP(1)=Y+SIN(D+120)*TM:YP(1)=Y+SIN(D+120)*TM:XP(2)=X+COS(D+240)*TM
YP(2)=Y+SIN(D+240)*TM:PG 1:POLYGON 3,XP(),YP(),0,&HBBBB:XP(0)=X-COS(D)*(SS+M*7):YP(0)=Y-SIN(D*2)*P
H=H-L:MT 2:TT=M-V:PU=TIMER MOD (((LF\50)+1)*250)<200:IF SW THEN POLYGON 3,XP(),YP(),U,RGB(127,0,0)
IF EN=0 THEN:IF RND<0.01 THEN:YS=RND*6-3:YE=UP+P+RND*(DN-UP-P):XS=-RND*V:XE=PT:EN=GO:ER=0:ENDIF:ELSE
INC ER,15:EA=COS(ER)*4+15:A=L*(2*(XE<X)-1):INC XS,A:INC YE,YS:INC XE,XS-M:C=L*(2*(YE<Y)-1):INC YS,C
Q=Q+YS:K=0:FOR T=Q TO 360+Q STEP P:A=-COS(T)*EA:C=-SIN(T)*EA:LINE XE,YE,XE-A*1.4,YE-C*1.4,1,W
O=PIXEL(XE-A,YE-C):IF O=TC OR O=YD THEN:MT 3:INC XS,A/5:INC YS,C/5:INC XE,A:INC YE,C:ENDIF:NEXT
CIRCLE XE,YE,EA,,,0,N:SN 3,"T",EA*15,P:IF XE<0 OR XE>PT THEN:EN=0:MT 3:ENDIF:ENDIF:FOR T=1 TO 4:PG 1
IF FA(T)=1 THEN:INC FX(T),14-TT:INC FS(T),-1:INC FY(T),FD(T):IF FX(T)>XX OR FY(T)<0 OR FY(T)>YY THEN
FA(T)=0:ELSEIF FS(T)>1 THEN:SN 2,"W",FS(T)*50,25:ENDIF:LINE FX(T)-30,FY(T)-FD(T)*2,FX(T),FY(T),1,YW
FOR E=1 TO 9:O=PIXEL(FX(T)+E,FY(T)):IF (O=TC OR O=N OR O=YD) THEN:PC=YB:A=3:FA(T)=30:IF O=TC THEN
PC=R:H=50:A=-8:ELSEIF O=N THEN:PC=7.3^8:IS=150:A=25:EN=0:ENDIF:LF=LF+A:MT 3:EXIT FOR:ENDIF:NEXT
ENDIF:IF KEYDOWN(T)=32 THEN:K=2:ENDIF:IF FA(T)>1 THEN:PG 1:C=FA(T)*8+9:A=RGB(C,C,C):INC FX(T),-M
SN 3,"N",61-FA(T)*2,25:INC FA(T),-3:CIRCLE FX(T),FY(T),35-FA(T),,,YW,A:IF FA(T)<3 THEN:FA(T)=0:PG 2
MT 3:CIRCLE FX(T),FY(T),33,1,1,U,U:ENDIF:I=0:PT=0:DO WHILE I<=39 AND PT<10:IF PA(I)=0 THEN:PP(I)=PC
PX(I)=FX(T):PA(I)=1:CX(I)=RND*7-5:CY(I)=RND*8-4:Z(I)=4:INC PT:PM(I)=0:PY(I)=FY(T)+(YY-FY(T))/99
ENDIF:INC I:LOOP:ENDIF:PG 2:A=X+COS(D)*35:IF FA(T)=0 AND F=1 THEN:FY(T)=Y+SIN(D)*50:FA(T)=1:FX(T)=A
F=2:FD(T)=D/2:FS(T)=10:EXIT FOR:ENDIF:NEXT:ENDIF:F=K:IF LF>349 THEN:LF=350:MS$=TX$+"!!":SV=1:ENDIF
G=1+G MOD 360:TM=COS(AN)*4+9:IF RND>0.99 AND GO THEN:WL=9:ENDIF:P=20:FOR I=0 TO 39:IF PA(I)>0 THEN:
PG 1:INC PY(I),CY(I):INC PX(I),CX(I)-M-PA(I):J=PP(I):O=PIXEL(PX(I),PY(I)):IF PX(I)<0 THEN PA(I)=0
IF O=TC OR O=YD THEN INC PM(I):CX(I)=-CX(I)/4:CY(I)=-CY(I)/4:IF PM(I)>6 THEN PA(I)=0:PG 2
CIRCLE PX(I),PY(I),Z(I),,,J,J:ENDIF:NEXT:FOR T=0 TO 360 STEP 45:A=COS(T)*15+5:C=SIN(T)*TM:PG 1
I=PIXEL(X+A,Y+C):IF I=TC OR I=N OR I=YD THEN:S=S-A:D=D-C*2:EG$="W":LF=LF-1:ENDIF:NEXT:HS=MAX(HS,SC)
IF LF<1 OR SV=1 THEN:D=0:S=0:LF=SV*300:IF DD=0 THEN:PLAY STOP:TIMER=0:ENDIF:IF TIMER>4^6 THEN LF=-1
DD=1:EN=0:PR 3,3+SV,95,145,YW,B,MS$,3,B*SW:ELSE:LF=LF-L:INC AN,M*3:BOX 50,18,LF,9,1,0,B+PU*W:I=-1
BOX 50,18,350,9,1,W:PR 1,1,11,16,W,B,"LIFE",1:ENDIF:TY$="SCORE:"+FORMAT$(SC,"%06.0f")+"  "+TX$+":"
PR 1,1+DD*2,11-DD*2,4,W,B,TY$+STR$(V-2),1+DD:H=MAX(14-LF\10,MIN(99,H)):PAGE COPY 1 TO 0,I:LOOP:LOOP


I do not know if I will update the version that I sent to the contest as this new version of Hope Robot have some new effects, and these enhancements using 100x48 characters was possible thanks to vegipete, which gave me some awesome suggestions to compress even more the source code, then maybe would be unfair to send this version.

If the judges do not think it is against the rules, then I would send the update.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3585
Posted: 07:16am 22 Mar 2021
Copy link to clipboard 
Print this post

Tom, Nimue, Mick,

I have been working hard this week to bring my TLS game Ten Line Sokoban / Twenty-four Line Sokoban to a version that exactly matches the CMM1 screen (Thirty-four Line Sokoban) but have given up. After nights of debugging, I realized (I had to read it in  the manual) that the CMM1 uses 24 bit integers, not 32 bit. And 32 bits where crucial to compress 8 sprites into 8 lines of code (since external files are not allowed, I had to "generate" the sprites file from the 34 lines program, and then load it back in with SPRITE LOAD "xx"), then kill the sprite file, so no-one would have know it existed.

Summarizing: my entry will not get an update anymore. It will stay as it is (in the end it is playable, though not very beautiful).

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 10:44am 22 Mar 2021
Copy link to clipboard 
Print this post

Hi folks,

We're in the final countdown, less than 2 weeks to go and only 3 entries have been sent to cmmprogrammingchallenge@gmail.com. Come on folks we can't let Mick live it up on his PCB hoard ;-)

  MauroXavier said  If the judges do not think it is against the rules, then I would send the update.


The rules don't say you can't have help, so my ruling is that you should send your enhanced version.

  Volhout said  I have been working hard this week ... but have given up.


That's unfortunate, but nevertheless TLS is an awesome achievement and will no doubt get bonus points for having been achieved on the original CMM.

Good luck,

Tom
Edited 2021-03-22 20:46 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
realbobele
Newbie

Joined: 09/07/2020
Location: Germany
Posts: 23
Posted: 01:42pm 22 Mar 2021
Copy link to clipboard 
Print this post

  thwill said  Hi folks,

We're in the final countdown, less than 2 weeks to go and only 3 entries have been sent to cmmprogrammingchallenge@gmail.com. Come on folks we can't let Mick live it up on his PCB hoard ;-)



I am sure that most submissions will arrive exatly meeting the deadline. And judging the forum from how dedicated most people seem to be to the Mites, I am also sure that we will reach at least the 10 submissions necessary for a second price.

Raise the counter to 4, btw. Just sent in mine.

Thanks for organizing and greetings
Boris
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3863
Posted: 02:52pm 22 Mar 2021
Copy link to clipboard 
Print this post

  realbobele said  Raise the counter to 4, btw. Just sent in mine.


Thank you Boris, I can confirm receipt. I LOVE the cover for the manual.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1085
Posted: 07:46pm 27 Mar 2021
Copy link to clipboard 
Print this post



Part Three of the Green Hills Saga!

To round things off as the contest comes to a close, I have created a
third episode, "Escape to the Green Hills" in which the player must
navigate a maze. The alien command pyramid is hovering just above the
ground. Your job is to find and activate the self-destruct device. Others
have tried before you but apparently without success. We hope someone has
left a message for you. As far as we know, all levels except the smallest
one near the top, where we can infiltrate you, have an item of interest.
But beware! Some of those items are likely to be aliens, greenish blobs
according to reports. Destroy the pyramid to save the green hills, and
hopefully escape out the bottom to tell the tale.

Here is a zip
with all 3 episodes, plus expanded copies, more info and a maze utility.

It took some squashing to get this one in ... plus a fight with a DATA bug.
The largest maze is 19x19!

mode 1,8:M6=MM.VRES:M3=M6/2:M8=MM.HRES:M4=M8/2:C=100:for i=1 to 64:h=i*4-1:map(207+i/4)=rgb(h,0,h)
map(63+i)=h<<8:map(63+i/4)=rgb(h,h,h):map(175+i/2)=rgb(h,i*2-1,0):map(31+i/2)=h:next:map set:dn=0
cls map(65):T2$="The Green Hills":T1$="Escape to ":text M4,M4/2,T1$+T2$,CM,5,1,map(99),-1:SA:p 2:cls
for i=0 to M3:line 0,i,M8,i,1,map(63-i/10):line 0,M6-i,M8,M6-i,1,map(207-i/10):next:page copy 2,3
triangle M3,M3,-1,M6/3+4,-1,4*M3/3-4,,map(70):triangle M3,M3,M6,M6/3+4,M6,4*M3/3-4,,map(70):pA=0
p 3:for i=0 to 47:circle 950,700,C+i*7,9,1.5,map(127-i):next:dim g1(4),mz(900),dD(3)=(-30,1,30,-1)
for i=0 to 47:circle C,750,158+i*7,9,1.5,map(127-i):next:p 1:g$="This is l":data 62,91,0,9,1,"G9C9G"
dim bx(7)=(3,3,1.5,1.5,3,12,12,3),by(7)=(-3,3,1.5,-1.5,-3,-3,3,3),px(7),py(7),dx(4)=(8,-8,-4,4,8)
dim ix(4)=(3,-9,-1,8,3),iy(4)=(4,5,-5,-6,4),dy(4)=(10,10,-15,-15,10):g$=g$+"evel 7. Don't miss the"
dim g2(4),gx(4)=(0,-1,-3,-2,5),gy(4)=(0,5,5,-2,-1),ax(4)=(2,1,-1,-2,2),ay(4)=(-11,-8,-8,-11,-11):RN
dim hx(4)=(2,1,-1,-2,2),hy(4)=(-11,-14,-14,-11,-11):pause 999:DV:de=0:da=0:do:ld=0:do:k=asc(INKEY$)
ud=0:select case k:case 128,129:np=pP+dD(pA)*((k=128)-(k=129)):if mz(np)<>9 then:pP=np:ud=1:endif
case 32:if gp then:line M6,M6,M4,M3,1,rgb(yellow):for i=1 to 150:play tone M6-i,510-i:pause 1:next:z
sp=pP:do while mz(sp)<>9:if mz(sp)<>4 then:sp=sp+dD(pA):else:af=af-1:if af=1 then:mz(sp)=0:e=0:endif
sp=0:endif:loop:ud=1:endif:case 115:save image "screenshot",0,0,M4,M4:case 130,131:pA=pA+1+2*(k=130)
pA=pA mod 4:ud=1:end select:if timer>999 and e=4 then:hd=int(rnd*4):if mz(hz+dD(hd))=0 then
mz(hz)=0:hz=hz+dD(hd):ud=1:mz(hz)=4:endif:timer=0:endif:if ud then:DV:ud=0:endif:if da=2 then
mz(pP)=6:da=1:pause 500:DV:endif:loop until ld+de:if not de then:RN:DV 1:circle M3,0,48,1,3.5,0,0:
p 0:for i=1 to 15:blit C,5,C,0,M6,594:next:for i=0 to M6 step 5:data 93,95,35,2,2,")g)))e)9)E)))g"
if dn then:blit C,5,C,0,M6,M6-i-5:blit 0,M6-i-5,0,M6-i-5,M8,i+5,3:else:blit C,5,C,0,M6,594
blit 0,0,C,M6-i,M6,i,1:endif:next:endif:loop until dn+de:data 153,155,93,3,2,"/g,)-],=-E-=-],)/g"
if da then:text M4,M4/2,T2$+" - safe at last?",CM,5,1,map(99),-1:else:pause 2500
text M4,M4/2,"No destruct.",CB,5,1,map(224),-1:text M4,M4/2,T2$+" are Doomed!",CT,5,1,map(224),-1
pause 3000:for j=1 to 5000:x=rnd*800:y=rnd*600:for i=1 to 15:circle x+i,y-i,i,1,3,map(79-i):next i,j
endif:?@(0,M6-50)"The End":end:sub ST t$,f,b:text M3,M3,t$,CM,,,MAP(f),MAP(b):end sub:sub DV ns:p 1
page copy 2,1:for d=7 to 0 step -1:vp=pP+dD(pA)*d:if vp>0 and vp<900 then:SW(7-d,-1):SW(7-d,1)
ah=mz(vp):if ah=9 then:off=by(1)*2^(7-d):box M3-off,M3-off,2*off+1,2*off+1,1,,map(71-d) 'Look at all
elseif ah<>0 then:DT d,ah:endif:endif:next:data 37,35,151,4,2,"Gg9)?e=9=E=)<?9Y?E8)Gg"  'this unused
if ns then:exit sub:endif:if af=1 then:af=0:ST "Got 'im!",0,121:endif:p 0:blit 0,0,C,0,M6,M6,1'space
end sub:data 186,338,279,4,3,")gg))))?e)89)E=)-])\-)-])_-))e)E-)19)gg":sub SA:au$="by VegiPete"'WOW!
text M4,M3,au$,CM,3,1,map(99),-1:end sub:sub SW d,sd:sp=max(0,min(vp+dD((pA+2-sd)AND 3),900))
if mz(sp)=9 then:math scale bx(),sd*2^d,px():math add px(),M3,px():math scale by(),sd*2^d,py()
math add py(),M3,py():polygon 8,px(),py(),,map(64+d):endif:end sub:sub p k:page write k:end sub
sub DC h:circle M3,M3+h,ey,0,1.5,0,MAP(115-2*d):end sub:sub DT d,q:select case q:case 8
off=min(M3,4.5*2^(6-d)):circle M3,M3+off,off/6,1,3.5,0,0:ld=(d=0):case 4:ey=2^(7-d):DC ey:DC -ey
circle M3,M3,ey,0,2,0,MAP(121-2*d):if d=0 then:ST "Gotcha!",0,121:de=1:endif:case 2:if d=0 then
ST g$+" destruct button on level 3!",0,255:mz(pP)=0:else:DS ix(),iy(),d,78-d:endif:case 3
if d=0 then:ST "A Phasor! Awesome!",0,221:mz(pP)=0:gp=1:else:DS gx(),gy(),d,221-d:endif:case 5,6
DS dx(),dy(),d,60-d:if d=0 and q=5 then:ST "Destruct Activated!",255,60:da=2:endif:if q=5 then
DS hx(),hy(),d,224:else:DS ax(),ay(),d,126:endif:end select:end sub:sub DS xa(),ya(),d,cl
math scale xa(),2^(4-d),g1():math add g1(),M3,g1():math scale ya(),2^(4-d),g2()
math add g2(),M3+2^(8-d),g2():polygon 5,g1(),g2(),,map(cl):end sub:data 217,338,340,5,3
sub RN:mp=0:read a:if a=0 then:dn=1:exit sub:data "/gg-)),?E-89-E=--=-_],,=-g--)e-E--19-E?,(9/gg"
endif:pP=a:read a,hz,e,w:read m$:math set 1,mz():for i=1 to len(m$)-w+1 step w:r=0:for j=1 to w
r=r*64+asc(mid$(m$,j+i-1))-40:next:for j=1 to 6*w:mz(mp)=r and 1:mp=mp+1:r=r>>1:next
mp=(mp+30)\30*30:next:math scale mz(),9,mz():mz(a)=8:mz(hz)=e:af=5:end sub:sub z:play stop:end sub
data 217,45,75,4,3,"Ggg<,)=_E9<9EE=9)=?_=8,=GG]8)-?=E9E9E=?9(9?ge8()Ggg":data 163,511,278,4,4
data ")ggg)))))E=E)8<-)?_]),89)_??)-99)EEE)))))EeE),-9)]e?),(9)?_])8<-)E=E)))))ggg":data 0

Visit Vegipete's *Mite Library for cool programs.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3585
Posted: 10:32pm 27 Mar 2021
Copy link to clipboard 
Print this post

Here is my entry to the challenge. I will update the official entry to this one.

Sokoban

A game where a guy has to move boxes in a warehouse to the designated positions.
He can only push boxes, not pull.

I originally created this for the ten line basic challenge on a CMM1.

But the 10 lines could only hold 2 levels. That was to limited. I added 18 more levels, and build the screen from sprites in this version, consisting of 34 lines of 80 characters (the screen size of the CMM1).

Because CMM1 uses 24bit integers, my intended compression for the sprites did not work. In this version I used RLE (run length encoding) and tokenizing to create 8 sprites with 9x9 active pixels and some transparent plastering (CMM knows only 16x16 sprites).

This is the code
' TLSS = Ten Line Sokoban with Sprites

' control by cursor keys-128 (128,129,130,131 => 0,1,2,3 => ^ V < >)
' playfield values 0=empty, 1=target, 2=block, 3=wall
' press "r" to redo the level

'z   = size block
'x,y = position human
'e,g = new position human
'o,p = position onscreen
'n   = ascii value key
'b,c = direction human
'd   = done
'a$  = key pressed
'l,m = vars for decoding rooms
'i,j = counters
'k   = value field f(i,j)
'f() = playing field
't() = target locations for the boxes
's   = size playfield (sxs)
'q   = boolean (human on target)
'w   = level (0....nn)
'v$()= array to create sprites
'r$  = sprite color

'----------the compacted code---------
'w=18

s=11:z=11:Dim f(s,s),t(s,s),v$(16):GoSub 1:Sprite Load "x.s":Do:Mode 4:Read x,y
For i=1To s:Read a$:l=Val("&h"+a$):For j=1To s:f(i,j)=3And l:t(i,j)=(f(i,j)=1)
l=l\4:Next j,i:Cls:Print w,,"TLS":f(x,y)=4:Do:d=0:For i=1To s:For j=1To s:k=f(i,j)
o=120+z*(i-6):p=99+z*(j-6):Sprite paste Int(k+1+((k=4)*n)),o,p:d=d+(k=1):Next j,i
If d+q=0Then:w=w+1:Exit:EndIf:Data 9,2,FFC,3003,3003,30C3:Do:a$=Inkey$
Loop While a$="":n=3And Asc(a$):c=(n<2)*(n*2-1):b=(n>1)*(n*2-5):e=x+b:g=y+c
If f(e,g)=3Then:b=0:c=0:ElseIf f(e,g)=2Then:If f(e+b,g+c)<2Then:f(e,g)=t(e,g)
f(e+b,g+c)=2:Else:b=0:c=0:EndIf:EndIf:f(x,y)=t(x,y):x=x+b:y=y+c:f(x,y)=4:q=t(x,y)
If a$="r"Then:Exit:EndIf:Data FC0,,FFC,3217,3203,3003,FFC,5,2,,,,FFFF,D5F3,CBC3
Loop:Restore:For i=1To(s+2)*w:Read a$:Next i:Loop:Data C023,C3CF,EC0C,C0FC,FFC0
Data 8,5,,,,FC0,DC0,CFF,FE87,D83F,FFB0,370,3F0,6,3,,,3FF,3FF03,30FA3,30083,303FF
Data 3F300,C3F0,C570,FFF0,5,4,,,,FF0,C30,E3F,3DA3,3163,3163,3F03,3FF,7,7,,,,FF00
Data C3F0,C03F,CE07,C897,C87F,C3F0,FF00,6,6,,,3FF,3FC3,3C23,3CE3,3163,317F,32F0
Data 30C0,3FC0,9,7,,,,,FFFF,C017,C897,FABB,C897,C017,FFFF,7,6,,,FFFF,D503,D1B3
Data CB03,C23F,F30C,328C,3F0C,3FC,7,6,,,,3FF0,303F,3053,3373,32B3,3C23,C0F,FFC
Data 8,2,,,,FF0,C3F,FC03,C273,CE23,C44F,FF0C,3FC,6,2,,,,,FFFF,C303,C0B3,DA13
Data CDEF,C10C,FFFC,2,3,FFC,3FC0C,30C8C,300BF,37F23,37203,3703F,37230,37F30
Data 30030,3FFF0,6,3,,,,3FFFC,321DC,32FCF,31323,377C3,32043,31FFF,3FC00,10,7,,FF
Data 3FFCC3,300FE3,339003,331FEF,339C0C,3C1CEC,3F100C,30FFC,3FC00,5,10,,,3FFFC0
Data 3005C0,33F5FF,303003,32B0C3,3E3FCF,32000C,303F0C,3FF3FC,5,3,3FC0,30FF,F023
Data C2C3,CC8F,C0BC,FF0C,F0C,D0C,D5C,FFC,3,8,FFFFC,C3C0C,C008C,C0F0F,FC8C3,C803
Data FC3F,3570,3030,30F0,3FC0,9,7,,,,3FFF,3003,3333,3003,FF3F,C2A3,C153,FFFF
Data 10,10,3FF003,3333FF,303003,0,3FF3FF,8030,3FF3FF,0,3FF3FF,307333,FC303
1 Open"x.s"For output As#1:Print#1,"16,8":Do:Read a$:Loop Until a$="s"
For i=1To 8:For j=1To 9:Read a$:b=Len(a$):v$(j)="":If b=1Then:v$(j)=v$(Val(a$))
Else:For k=1To b Step 2:n=Val(Mid$(a$,k,1)):For l=1To n:v$(j)=v$(j)+Mid$(a$,k+1,1)
Next l,k:v$(j)=v$(j)+Spc(7):EndIf:Print#1,v$(j):Next j:For k=1To 7:Print#1,Spc(16)
Next k,i:Close#1:Restore:Return
Data s,90,1,1,1,1,1,1,1,1,147014,1014501410,2014301420,3014101430,401440,4,3,2,1
Data 421042,94,1,1,1,1,1,2,1,91,431143,2,1,731113,5,1,131173,8,265026,215021
Data 2120162021,2110361021,215721,1011571110,205720,303730,90,90,303730,205720
Data 1011571110,215721,2110361021,2120162021,215021,265026,164140,165130,30113720
Data 30164710,20264710,4,3,2,1,404116,305116,20371130,10471630,10472620,4,3,2,1


The code shows still the history of development:
10 lines of code of the original 10 liner: the core
14 lines of extra levels
10 lines of code that creates the sprite file from data statements.

For some of you who played the previous version: in one level there was an error. It is corrected here.

Happy sokobanning
PicomiteVGA PETSCII ROBOTS
 
     Page 3 of 8    
Print this page
© JAQ Software 2024