Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:37 12 Jul 2025 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 4 of 8    
Author Message
JoOngle
Regular Member

Joined: 25/07/2020
Location: Sweden
Posts: 82
Posted: 11:47pm 27 Mar 2021
Copy link to clipboard 
Print this post

A humble (but perhaps too time consuming?) request from a working guy...

Do you think you guys could post videos every time you make a program? I simply don't always have time to fire up the CMM2, and load all the software, in out with the SD card etc.

Also..

if you post your videos - the WORLD will see what cool stuff we can make with the CMM2.
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 11:24am 28 Mar 2021
Copy link to clipboard 
Print this post

Maybe a little less time consuming way will be to add new programs to CMM2.fun...

When you are not videoblogger (and I want not to offend anybody, but I think most of us have another life values than expose himself on YT), it's not so easy every time switch video- and sound- output to grabber and make video.

But I agree, for popularisation of CMM it could be very positive.
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4302
Posted: 11:56am 28 Mar 2021
Copy link to clipboard 
Print this post

Hi folks,

Only a week to go, if you've got something in the works then please finish it and send it to cmmprogrammingchallenge@gmail.com

@vegipete, if you want one of your entries to be considered ... actually send them all, but indicate which one you are entering into the challenge.

@lizby, still awaiting submission of your entry too.

  JoOngle said  A humble (but perhaps too time consuming?) request from a working guy...

Do you think you guys could post videos every time you make a program? I simply don't always have time to fire up the CMM2, and load all the software, in out with the SD card etc.


This would be great in general, as would submitting programs to CMM2.fun - pokes @vegipete.

Specifically for the programming challenge I will be uploading all the programs to a github repository and once judging is complete I will *try* to create a video highlighting the submissions - and we (myself included) can all wonder at who the strange Mancunian doing the voiceover is. However I am not a videoblogger, so this will probably take me some time, so have patience ... I'm also a working guy ;-)

Good luck and happy programming,

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

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

  thwill said  @lizby, still awaiting submission of your entry too.


Odd. My "sent" list says I sent it on March 3. I've sent it again. Please let me know if you don't receive it

------------------
Wed, Mar 3, 2021 6:50 pm
lb@somewhere.com
To cmmprogrammingchallenge@gmail.com

[ChemiNoImage.bas]
This is a greatly compacted version of VegiPete's ChemiChaos game, restricted to 5 vials.

The object is to sort the vials so that all balls of the same color are in the same vial. There are 10 rounds to play.

Three keys allow the user to play--

Spacebar (" ") picks the topmost ball from a vial, depending on where the arrow cursor is, or, if a ball has already been picked, places the ball in the vial below the cursor if there is space available and if the topmost ball is of the same color as the "picked" one.

"1" moves the cursor to the left, if not already at the leftmost vial.

"2" moves the cursor to the right, if not already at the rightmost vial.

In addition, "z" restarts the current round, and "x" moves to the next round.

The game does not detect when the player has succeeded in sorting all balls. The player must type "x" to move to the next round.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5058
Posted: 05:07pm 28 Mar 2021
Copy link to clipboard 
Print this post

Ok, one day of bad weather, wife out the door, a last moment release for the TLS (Ten Line Sokoban) entry.
I am still within the boundaries for the challenge (100 characters, 48 lines).
This is 37 lines of 80 characters. I had to improve the sprites a bit. Using 14x14 now versus 9x9.

s=11:z=15: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 14:Read a$:b=Len(a$):v$(j)="":If b=1Then:v$(j)=v$(Val(a$))
Else:For k=1To b Step 2:n=Val("&h"+Mid$(a$,k,1)):r$=Mid$(a$,k+1,1):For l=1To n
v$(j)=v$(j)+r$:Next l,k:EndIf:Print#1,v$(j)+"  ":Next j:Print#1,Spc(16)
Print#1,Spc(16):Next i:Close#1:Restore:Return:Data s,E0,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,E0,1,1,3016601630,4016401640,5016201650,602660,7,6,5,4,1,1,1,2210821022
Data 1,E0,1,1,1,1,1,1,1,1,3,1,1,4410441044,1,E0,14104410441024,4,3,1,1,3,4,4,3
Data 1,1,2730443027,2720642027,2710841027,27102445241027,271014154415141027
Data 27111564151127,2711841127,7,7,10171184111710,1031643110,2031443120,308130
Data 406140,406140,308130,2031443120,1031643110,10171184111710,2711841127,6,6
Data 27111564151127,271014154415141027,27102445241027,2710841027,2720642027
Data 2730443027,9750,A71130,507120,203415443110,1034156431,34158421,6,6,6,5,4,3
Data 2,1,5097,3011A7,207150,103144153420,3164153410,21841534,6,6,6,5,4,3,2,1


Game task: move the green boxes onto the yellow crosses.
You (the Mario type guy) can only push the boxes, not pull.
Typing lower case "r" reloads the current level.
There are 20 levels. The level is shown in the left top corner.
Mario is controlled using cursor keys

A picture of the game play...



Edited 2021-03-29 03:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 10:14pm 28 Mar 2021
Copy link to clipboard 
Print this post

Hi
here is my "piece of gold" - Tower of Hanoi. I worked on it all the weekend, but it still can't be compared to Mauro's or Vegipete's work  

OPTION DEFAULT INTEGER:X1=135:X2=395:X3=655:cr=&hFFF0000:cy=&hFFFFF00:cw=&hFFFFFFF:tp=-1:frq=196
du$="112211112211112211221122111122111122112211221111112112211111121122111111211221111112":y3=799
mu$="ihfhiklkhifhefdbedabihfhiklkhifhefdbedabklmimlkiopmklmkpomlkhiklmimlkiopmklmkpomlkhi":ps=0
hz$="196,220,247,262,294,330,349,392,440,494,523,587,659,698,784,880,988":rr=250:xc=400:yc=300:n=13
DIM jt$(6)=(" Made by JirSoft for  ","CMM PRG Challenge 2021","Max. 48x100 characters","","","","")
jt$(3)="Very simple game, but ":jt$(4)=" I learned new things ":jt$(5)="  and it was FUN...   "
cb=RGB(NOTBLACK):cc=&hF0000FF:DIM d$(2):ke$="123qnb+-m":f$="emmmquxhlr":v=-1:j=1:SETTICK rr,z,1
y=480:w=100:MODE 1:TEXT 400,2,"TOWER of HANOI","CT",5,2,cy:BLIT 2,2,2,0,796,64,,4:y1=271:y2=599
BLIT 2,2,2,4,798,64,,4:BLIT 2,2,0,2,798,64,,4:BLIT 2,2,4,2,798,64,,4:PAGE WRITE 1:c$="0000":CLS
TEXT 400,2,"TOWER of HANOI","CT",5,2,cr:PAGE WRITE 0:BLIT 0,0,0,0,800,600,1,4:tn=0:SETTICK 100,tm,2
COLOUR RGB(CYAN):?@(4,y+34)"You have to move ALL discs from pillar 1 to pillar 3 with help of ";
?"pillar 2. There is just one rule:":COLOUR cr:?@(228)"You CAN'T put BIGGER disc onto SMALLER one."
COLOUR cw:?@(0,540)"KEYS: 123 ... get/put disc from/to pillar";:?@(360)"Q ... QUIT game":?@(48);
?"B   ... BEST solution (LCTRL=slow)";:BOX 0,y,800,30,1,cw,cc:f1=1:f2=3:?@(360)"N ... NEW game"
?@(48)"+-  ... change number of discs";:?@(360)"M ... music ON/OFF";:y4=210:p5=500:u:x:n=1:u:pt=0
DO:fk=INSTR(ke$,LCASE$(INKEY$)):fn$=MID$(f$,fk+1,1):CALL fn$:LOOP:SUB e:END SUB:SUB wk
DO WHILE INKEY$="":LOOP:END SUB:SUB h:INC n,n<13:u:END SUB:SUB tm:INC ti,tn:t2=(ti\10) MOD 60:
BLIT 98,y+2,100,y+2,200,27:j1=(frq-196)/31:jd:IF ti>10 THEN rn=rn AND (KEYDOWN(0)=0)
LINE 100,y+27-j1,100,y+27,1,cw:PIXEL 100,y+27,cc:t1=ti\600:BLIT 0,0,y3,0,1,66:BLIT 1,0,0,0,y3,66
IF tp<>t2 THEN TEXT 791,y+4,STR$(t1,2,0,"0")+":"+STR$(t2,2,0,"0"),"RT",1,2,cy,cc:tp=t2
END SUB:SUB q:qq:BOX 218,265,364,70,0,cc,cc:tx " Have a nice life ","  with your CMM2  ":wk:END
END SUB:SUB r:rr=250-rr:frq=196:SETTICK rr,z,1:END SUB:SUB l:INC n,-(n>1):u:END SUB
SUB rt:BOX 0,80,800,50,0,cb,cb:END SUB:SUB m:IF v THEN p(fk-1) ELSE IF d$(fk-1)<>"" THEN g(fk-1)
tn=1:t:END SUB:SUB ds(px,py,ww,cc):IF cc THEN BOX px,py,ww,20,1,cb,cb:EXIT SUB
BOX px,py,ww,20,1,cr,cy:FOR ix=2 TO ww-3:FOR iy=2 TO 17 STEP 3:IF RND>.9 THEN PIXEL px+ix,py+iy,cr
NEXT:NEXT:END SUB:SUB x:u:tn=1:TEXT 400,80," PRESS KEY TO START ","CT",4,2,cb,cy:rn=1:a n,0,2,1:
IF rn=0 THEN rt:u:EXIT SUB
tn=0:wk:h:u:END SUB:SUB a(nn,s,dd,hh):IF rn*nn=1 THEN g(s):pp:p(dd):pp:EXIT SUB
jt$(6)="Music by JBmusics.com ":IF rn THEN a nn-1,s,hh,dd:g(s):pp:p(dd):pp:a nn-1,hh,dd,s
END SUB:SUB g(i):v=ASC(LEFT$(d$(i),1))-48:o=LEN(d$(i)):xx=140-v*10:yy=y-o*20:xs=135+i*260
ds xx+260,130,v*20:ds xx+i*260,yy,v*20,1:BOX xs,yy,10,20,1,cw,cc:BOX xs+1,yy,8,20,1,cc,cc
d$(i)=MID$(d$(i),2):END SUB:SUB t:IF LEN(d$(2))<n THEN EXIT SUB
ts=1:FOR i=1 TO n:ts=ts AND ((ASC(MID$(d$(2),i,1))-48)=i):NEXT i:IF ts THEN wi
END SUB:SUB p(i):o=LEN(d$(i))+1:IF o>1 THEN IF (ASC(LEFT$(d$(i),1))-48)<v THEN EXIT SUB
d$(i)=CHR$(v+48)+d$(i):INC mo:ds 400-v*10,130,v*20,1:ds 140-v*10+i*260,y-o*20,v*20:v=0
TEXT 10,y+4,STR$(mo,4,0,"0"),"LT",1,2,cy,cc:END SUB:SUB u:BOX 0,y4,800,y-y4,0,cb,cb:ERASE d$:rt
BOX x1,y4,10,y1-n*20,1,cw,cc:BOX x2,y4,10,y1,1,cw,cc:BOX x3,y4,10,y1,1,cw,cc:DIM d$(2):FOR i=1 TO n
v=n-i+1:p(0):NEXT:ti=0:mo=0:TEXT 9,y+4,c$,"LT",1,2,cy,cc:TEXT x1+5,180,"1","CT",3,,cw,cb
TEXT x2+5,180,"2","CT",3,,cw,cb:TEXT x3+5,180,"3","CT",3,,cw,cb:tn=0:tp=-1
TEXT 400,y+4," LEVEL "+STR$(n)+" ","CT",1,2,cy,cc:END SUB:SUB z:dur=p5*VAL(MID$(du$,j,1))
frq=VAL(FIELD$(hz$,ASC(MID$(mu$,j,1))-96,",")):SETTICK dur,z,1:PLAY TONE frq/f1,frq/f2,dur:INC j
INC j,-LEN(mu$)*(j>LEN(mu$))):END SUB:SUB pp:wp=w+p5*(KEYDOWN(7)AND 2):w1=TIMER:DO WHILE TIMER-w1<wp
LOOP:END SUB:SUB wi:t9$="":IF mo<2^n THEN t9$="  OPTIMALLY  ":BOX 268,300,264,34,0,cr,cr
BOX 268,265,264,37,0,cr,cr:tx " You did it! ",t9$:tn=0:DO WHILE INKEY$="":LOOP:rt:h:END SUB:SUB qq
FOR i=0 TO y3 STEP 5:i1=65+i*.7:LINE i,65,y3-i,y2,1,cy::LINE 0,i1,y3,i1,1,cy:NEXT:END SUB
SUB tx(t8$,t9$):TEXT xc,yc,t8$,"CB",4,2,cb,cy:TEXT xc,yc,t9$,"CT",4,2,cb,cy:END SUB:SUB jd
BOX 547,y2-pt,252,25,0,cb,cb:TEXT y3,y2-pt,jt$(ps),"RT",2,,cy:INC pt,(pt<50):INC ps,(pt=50)*(ps<7)
INC pt,-50*(pt=50):INC ps,-(ps>6)*7:END SUB


Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 12:53am 29 Mar 2021
Copy link to clipboard 
Print this post

  Volhout said  I had to improve the sprites a bit. Using 14x14 now versus 9x9.

Looking pretty slick!
Could you check level 6?
(Data 6,6,,,3FF,3FC3,3C23,3CE3,3163,317F,32F0,30C0,3FC0)
Visit Vegipete's *Mite Library for cool programs.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5058
Posted: 06:51am 29 Mar 2021
Copy link to clipboard 
Print this post

Hi Vegipete,

I fixed that level in a previous release. But the change got lost (I need version control....;). The correct level should be:

Data 6,6,,,3FF,3F03,3023,30E3,3163,317F,32F0,30C0,3FC0

I do this at my work, from a piece of paper and memory. Do not have my CMM1 here.
Tonight I will check on the machine itself, and update my entry for the challenge.

Thanks for finding the bug...

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5058
Posted: 07:53pm 29 Mar 2021
Copy link to clipboard 
Print this post

Vegipete, thanks for checking the game. Really appreciate it.

This is the full listing. After checking all levels, I found one more bug.
Here is the final listing with all levels playable.

s=11:z=16: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,3F03,3023,30E3,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,36683,32043,31FFF,3FC00,10,7,,FF
Data 3FFCC3,300FE3,339003,331FEF,339C0C,301CEC,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 14:Read a$:b=Len(a$):v$(j)="":If b=1Then:v$(j)=v$(Val(a$))
Else:For k=1To b Step 2:n=Val("&h"+Mid$(a$,k,1)):r$=Mid$(a$,k+1,1):For l=1To n
v$(j)=v$(j)+r$:Next l,k:EndIf:Print#1,v$(j)+"  ":Next j:Print#1,Spc(16)
Print#1,Spc(16):Next i:Close#1:Restore:Return:Data s,E0,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,E0,1,1,3016601630,4016401640,5016201650,602660,7,6,5,4,1,1,1,2210821022
Data 1,E0,1,1,1,1,1,1,1,1,3,1,1,4410441044,1,E0,14104410441024,4,3,1,1,3,4,4,3
Data 1,1,2730443027,2720642027,2710841027,27102445241027,271014154415141027
Data 27111564151127,2711841127,7,7,10171184111710,1031643110,2031443120,308130
Data 406140,406140,308130,2031443120,1031643110,10171184111710,2711841127,6,6
Data 27111564151127,271014154415141027,27102445241027,2710841027,2720642027
Data 2730443027,9750,A71130,507120,203415443110,1034156431,34158421,6,6,6,5,4,3
Data 2,1,5097,3011A7,207150,103144153420,3164153410,21841534,6,6,6,5,4,3,2,1


Happy Sokobanning.....
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4302
Posted: 12:09pm 01 Apr 2021
Copy link to clipboard 
Print this post

OK folks,

Last call for submissions, the challenge closes at 1 minute past midnight (BST) on Saturday April 2nd. If you think you have submitted already but haven't received an acknowledgement email then let us know on this thread.

Good luck,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7865
Posted: 01:36pm 01 Apr 2021
Copy link to clipboard 
Print this post

*Saturday* April 2nd, Tom? It's a Friday (here in Lancashire anyway :) )
I assume you mean 00:01 on 3rd April, allowing entries up to midnight on the Friday night.  

Entry sent.
Edited 2021-04-01 23:42 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4302
Posted: 01:42pm 01 Apr 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  *Saturday* April 2nd, Tom? It's a Friday (here in Lancashire anyway :) )


Eee you fancy lads over the border with your hot and cold running water and accurate calendars .

You are correct, I did mean 1 minute past midnight (BST) on Saturday April 3rd ... I was too busy trying to work out whether midnight was the beginning or the end of the day and whether our antipodean cousins were ahead of us or behind ... probably I need to apologise to the Yanks now. In reality if it's been received by the time I crank up the CMM2 on Saturday afternoon to start aggregatng the entries then it's arrived on time.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4302
Posted: 09:22pm 01 Apr 2021
Copy link to clipboard 
Print this post

We're on eight entries. Can we manage two more and deprive Mick of more of his precious PCBs ? ... or looking at it another way, every extra entry is one more that I have to commentate on in a YouTube video rather than working on my own projects ;-)

Have a great evening everyone,

Tom
Edited 2021-04-02 07:44 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
realbobele
Newbie

Joined: 09/07/2020
Location: Germany
Posts: 23
Posted: 12:44pm 02 Apr 2021
Copy link to clipboard 
Print this post

WOW...

Just at the beginning of a week off of work and at last I found the time to look at what you guys achieved. Better did that BEFORE I joined the competition ;)

I was utterly impressed, especially by Vegipetes Green Hills Epos, Part 3 in particular . All of this in a single screen of code. But then I tried Mauros Hope Robot and was blown away. This is so ingenious. 4K Arcade Quality. Now I feel highly motivated to learn a lot :)

Simply... WOW!!

Greetings from Germany
Boris
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7865
Posted: 03:46pm 02 Apr 2021
Copy link to clipboard 
Print this post

I'm afraid I started mine a bit late. I had to order the bits, build the CMM2, and figure out how to use it (it's not that similar to the Micromite Backpack!) before I got round to writing anything. Then the prog I was going to enter turned out to be much too big and I couldn't squash it down far enough. Eventually I started my entry with two days to go. :) My challenge wasn't to win anything, it was to get an entry in and I've managed that so I'm happy now. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4302
Posted: 03:39pm 03 Apr 2021
Copy link to clipboard 
Print this post

Hi folks,

So the competition is officially closed and we have had 8 entries:

   Tower of Hanoi - @jirsoft
   Chemi Chaos (Redux) - @lizby
   Hope Robot - @MauroXavier
   Resistors - @Mixtel90
   Iceberg - @realbobele
   Gravity Assist - @TimD
   Escape to the Green Hills - @vegipete
   (Thirty-ish line) Sokoban - @Volhout

Our thanks to everyone for submitting their code.

For everybody's convenience (especially the judge's) I've uploaded these (basically) unedited to GitHub: https://github.com/thwill1000/cmm2-basic-challenge, or as a .zip file: https://github.com/thwill1000/cmm2-basic-challenge/archive/refs/heads/main.zip. I will try to clean up the instructions, grab some screen-shots and do some other cosmetic work on the repository (not touching the actual code) over the next few days.

I've smoke tested all the entires and they are all running with the exception of @Volhout's which is giving a "No DATA to read" error on the CMM2. @Volhout only has a CMM1 (making his contribution IMO doubly impressive even when it isn't running.) If there is a kind soul who could make it run on the CMM2 (ideally make it run on both, you can now ignore the competitions restrictions on number of lines) then it would make the judge's lives easier - I believe Mick has misplaced his CMM1, Nimue doesn't have one, and as you might imagine I've got quite a lot on my plate with this competition already .

Apparently we are due to announce a winner on Friday 16th April 2021

Best wishes,

Tom
Edited 2021-04-04 01:42 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5058
Posted: 05:06pm 03 Apr 2021
Copy link to clipboard 
Print this post

For the person who wants to try an run this CMM1 (basic 4.5C) version of TLS on a CMM2...
First of all, thank you for trying. But if you start, please try this first:


I noticed by loading the code into the MMBasic DOS interpreter (newer basic 5.04) that (besides the commands it does no know) the interpreter adds spaces in some locations.
This makes the lines slightly longer.
Especially for the FOR-NEXT and DO-LOOP commands the NEXT and LOOP must be close enough to the associated FOR and DO counterparts or this will cause trouble. Maybe related to the way the MMBasic interpreter look-ahead buffer works. But if you place the NEXT and LOOP at the beginning of a new line, it works.

Below program simply puts LOOP and NEXT at a new line. Maybe that makes it work.

Of coarse you need "OPTION LEGACY ON".

Alternatively I can make a nicely formatted version, that also make the code much more readable....



s=11:z=16: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,3F03,3023,30E3,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,36683,32043,31FFF,3FC00,10,7,,FF
Data 3FFCC3,300FE3,339003,331FEF,339C0C,301CEC,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 14:Read a$:b=Len(a$):v$(j)="":If b=1Then:v$(j)=v$(Val(a$))
Else:For k=1To b Step 2:n=Val("&h"+Mid$(a$,k,1)):r$=Mid$(a$,k+1,1):For l=1To n
v$(j)=v$(j)+r$:
Next l,k:EndIf:Print#1,v$(j)+"  ":
Next j:Print#1,Spc(16)
Print#1,Spc(16):
Next i:Close#1:Restore:Return:Data s,E0,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,E0,1,1,3016601630,4016401640,5016201650,602660,7,6,5,4,1,1,1,2210821022
Data 1,E0,1,1,1,1,1,1,1,1,3,1,1,4410441044,1,E0,14104410441024,4,3,1,1,3,4,4,3
Data 1,1,2730443027,2720642027,2710841027,27102445241027,271014154415141027
Data 27111564151127,2711841127,7,7,10171184111710,1031643110,2031443120,308130
Data 406140,406140,308130,2031443120,1031643110,10171184111710,2711841127,6,6
Data 27111564151127,271014154415141027,27102445241027,2710841027,2720642027
Data 2730443027,9750,A71130,507120,203415443110,1034156431,34158421,6,6,6,5,4,3
Data 2,1,5097,3011A7,207150,103144153420,3164153410,21841534,6,6,6,5,4,3,2,1

Edited 2021-04-04 03:09 by Volhout
PicomiteVGA PETSCII ROBOTS
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 05:20pm 03 Apr 2021
Copy link to clipboard 
Print this post

I got it running on my CMM2 easily enough, as I recall.

Perhaps on line 7-ish of the above, ensure no program statements are AFTER a data statement on the same line.

I didn't keep a compressed running version, only an expanded one.
Visit Vegipete's *Mite Library for cool programs.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1129
Posted: 05:52pm 03 Apr 2021
Copy link to clipboard 
Print this post

Oh yes, SPRITE PASTE must be changed to SPRITE WRITE for the CMM2.

Here's a lightly crunched version that comfortably fits on one CMM2 editor page:
(Volhout's Soko-engine is so tight that this is easy to accomplish!)
option legacy on
s=11:z=15:Dim f(s,s),t(s,s),v$(16):GoSub 1:Sprite Load "x.s":Do:Mode 4:Read x,y
For i=1 To s:Read a$:l=Val("&h"+a$):For j=1 To s:f(i,j)=3 And 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=1 To s:For j=1 To s:k=f(i,j)
o=120+z*(i-6):p=99+z*(j-6):Sprite write Int(k+1+((k=4)*n)),o,p:d=d+(k=1):Next j,i
If d+q=0 Then:w=w+1:Exit:EndIf:Do:a$=Inkey$
Loop While a$="":n=3 And Asc(a$):c=(n<2)*(n*2-1):b=(n>1)*(n*2-5):e=x+b:g=y+c
If f(e,g)=3 Then: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:If a$="n" Then:w=w+1:Exit:EndIf
Loop:Restore:For i=1To(s+2)*w:Read a$:Next i:Loop:
Data 9,2,FFC,3003,3003,30C3,FC0,,FFC,3217,3203,3003,FFC
Data 5,2,,,,FFFF,D5F3,CBC3,C023,C3CF,EC0C,C0FC,FFC0
Data 8,5,,,,FC0,DC0,CFF,FE87,D83F,FFB0,370,3F0
Data 6,3,,,3FF,3FF03,30FA3,30083,303FF,3F300,C3F0,C570,FFF0
Data 5,4,,,,FF0,C30,E3F,3DA3,3163,3163,3F03,3FF
Data 7,7,,,,FF00,C3F0,C03F,CE07,C897,C87F,C3F0,FF00
Data 6,6,,,3FF,3F03,3023,30E3,3163,317F,32F0,30C0,3FC0
Data 9,7,,,,,FFFF,C017,C897,FABB,C897,C017,FFFF
Data 7,6,,,FFFF,D503,D1B3,CB03,C23F,F30C,328C,3F0C,3FC
Data 7,6,,,,3FF0,303F,3053,3373,32B3,3C23,C0F,FFC
Data 8,2,,,,FF0,C3F,FC03,C273,CE23,C44F,FF0C,3FC
Data 6,2,,,,,FFFF,C303,C0B3,DA13,CDEF,C10C,FFFC
Data 2,3,FFC,3FC0C,30C8C,300BF,37F23,37203,3703F,37230,37F30,30030,3FFF0
'Data 6,3,,,,3FFFC,321DC,32FCF,31323,377C3,32043,31FFF,3FC00
Data 6,3,,,,3FFFC,321DC,32FCF,31323,36683,32043,31FFF,3FC00
Data 10,7,,FF,3FFCC3,300FE3,339003,331FEF,339C0C,3C1CEC,3F100C,30FFC,3FC00
Data 5,10,,,3FFFC0,3005C0,33F5FF,303003,32B0C3,3E3FCF,32000C,303F0C,3FF3FC
Data 5,3,3FC0,30FF,F023,C2C3,CC8F,C0BC,FF0C,F0C,D0C,D5C,FFC
Data 3,8,FFFFC,C3C0C,C008C,C0F0F,FC8C3,C803,FC3F,3570,3030,30F0,3FC0
Data 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=1 To 8:For j=1 To 14:Read a$:b=Len(a$):v$(j)="":If b=1Then:v$(j)=v$(Val(a$))
Else:For k=1 To b Step 2:n=Val("&h"+Mid$(a$,k,1)):r$=Mid$(a$,k+1,1):For l=1 To n
v$(j)=v$(j)+r$:Next l,k:EndIf:Print#1,v$(j)+"  ":Next j:Print#1,Space$(16)
Print#1,Space$(16):Next i:Close#1:Restore:Return:
Data s,E0,1,1,1,1,1,1,1,1,1,1,1,1
Data 1,E0,1,1,3016601630,4016401640,5016201650,602660,7,6,5,4,1,1,1,2210821022
Data 1,E0,1,1,1,1,1,1,1,1,3,1,1,4410441044,1,E0,14104410441024,4,3,1,1,3,4,4,3
Data 1,1,2730443027,2720642027,2710841027,27102445241027,271014154415141027
Data 27111564151127,2711841127,7,7,10171184111710,1031643110,2031443120,308130
Data 406140,406140,308130,2031443120,1031643110,10171184111710,2711841127,6,6
Data 27111564151127,271014154415141027,27102445241027,2710841027,2720642027
Data 2730443027,9750,A71130,507120,203415443110,1034156431,34158421,6,6,6,5,4,3
Data 2,1,5097,3011A7,207150,103144153420,3164153410,21841534,6,6,6,5,4,3,2,1

(I added a cheat to skip levels ;-)
Visit Vegipete's *Mite Library for cool programs.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5058
Posted: 10:16pm 03 Apr 2021
Copy link to clipboard 
Print this post

Thanks Vegipete,

I noticed you also replaced SPC() with Space$(). Small lingual differences.
Nice implementation of the "n" for next level.


Please also replace:
Data 2,3,FFC,3FC0C,30C8C,300BF,37F23,37203,3703F,37230,37F30,30030,3FFF0


With:
Data 2,3,FFC,3FC0C,30C8C,300BF,37F23,37203,37003,3723F,37F30,30030,3FFF0


Otherwise level 12 gets very hard to solve.....

Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 4 of 8    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025