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 : Picomite VGA games
Page 1 of 4 | |||||
Author | Message | ||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
This thread has been edited at the request of Volhout, to remove all non-game related posts, or posts that do not link to games. Please do no post anything on this thread other then new links to or code for new games. (GROGSTER) The question has been asked on the forum before: "is there any place where I can find games for the PicoMite(VGA)?". Let's put them in one thread. I'll open the the thread with a PicoMite VGA patch of my 2021 programming challenge entry "Ten Line Sokoban". Don't try to understand how the code works...but enjoy it on the PicoMiteVGA. Just make sure you run MMBasic 5.07.07 since the program uses the fact that there is a filesystem to create a sprite file. Or add SD card support for the file system. TLS - the game s=11:z=16:Dim f(s,s),t(s,s),v$(16):GoSub 1:Sprite Load "x.s":Do :MODE 2: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 write Int(k+1+((k=4)*n)),o,p,0: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,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 hope others follow my example, and make this into a valuable thread... Volhout Edited 2023-08-05 15:10 by Grogster PicomiteVGA PETSCII ROBOTS |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2109 |
We don't all have psychic abilities :) What is the code/idea? |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
Sorry, should have explained.... Sokoban PicomiteVGA PETSCII ROBOTS |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
Good idea, here is the Tetris clone that is included in the firmware download (for any who might have missed it): Blocks.zip Geoff Geoff Graham - http://geoffg.net |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
One year ago I made a demo game for the NES controller interface running on PIO. Nobody could play the game, it was a 2 player game. I spend 2 hours to convert it to single player, keyboard control. You play against the computer. CIRCLE ONE A fast paced game for PicoMiteVGA You are a blue creature that needs to eat apples to grow. When you have grown to screen size you win the game. Your competitor will do anything to get to the food first. The AI is slower, but can run diagonal, you can't. Between levels you can catch your breath until you press the "a" key.. Bon Appetite circle_one.zip PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4026 |
Lazer Cycle by me: https://github.com/thwill1000/mmbasic-lazer-cycle/releases/download/1.0.0/lazer-cycle-pmvga-100.bas PicoVaders - PicoMite Space Invaders clone by @Martin H: https://www.thebackshed.com/forum/ViewTopic.php?TID=14976 Stellar Battle in the Seven Green Hills Zone by @vegipete: https://www.thebackshed.com/forum/ViewTopic.php?TID=14697&PID=190080 Mario Apple Panic by @gadgetjack: https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=15528 Mario Run by @gadgetjack: https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=15544 Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
@Geoff, A simple way to add game sound to the game..... Below is Geoff's Blocks with few lines added to create game sound. Thank you Geoff for this well polished version of Blocks... 'start endless music now Play volume 50,50 'adjust for best gameplay (0-100) restartplay 'start music (endless loop) 'timed interrupt to restart the gameboy tetris tune when ended (1:16 duration) Sub restartplay Play wav "tet16cut.wav",restartplay 'start music, and restart when end End Sub The sound file I recorded from a nintendo gameboy... Blocks_sound.zip Happy gaming... Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Something I ve been working on last year: 'Pico Frog ' by Martin Herhaus 2022 ' This is a Frogger game that is similar to the original arcade version ' released by Konami (c) in 1981, but completely rewritten in MMBasic for the ' Raspberry PicoVGA ' ' This code has an open source license, you can copy it, change it, ' for any purpose for commercial use or not. But these comments ' should be in you main file. ' The graphics and Music are based upon but not the original '------ ' developed on PicoMite Version 5.07.05RC... ' runs on PicoMite Version 5.07.06 ' would not run on lower Versions due to the use of ' Framebuffer, Layer and Sprites. For this, the Pico also has to run ' at 252000 KHz or higher ' 'Use OPTION CPUSPEED 252000 or OPTION CPUSPEED 378000 It is playable but surly can be enhanced.. I have trouble with 5.07.07RC/Beta with the Game-Controller Routines but maybe Tom can fix it PicoFrog.zip Edited 2023-04-18 16:26 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
Wauw Martin, this is great !!! So near to the actual game. A marvel !! Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6764 |
It doesn't really show off the PicoMite, but it's quite fun. :) Eliza.zip I'm currently attempting a port of Super Star Trek and it's looking promising, although rather buggy at the moment. Might do something a bit graphical with it later. Edited 2023-04-18 17:28 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
Hi Martin, This is the "keyboard only" version of the frog. Runs on 50707RC4. Stripped out some controller stuff since it would not run (as is) on my VGA picoMite. Best at 378MHz, otherwise runs fairly slow... picofrog_keyb.zip Volhout P.S. Martin, any suggestions as how to make it slightly more responsive ? Edited 2023-04-18 21:02 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Hi Tom The Error I get is: [809] If Call(read_fn$(i%)) = expected%(i%) Then Error : Unknown user function in Function ctrl.poll$ ... Do For i% = 0 To Bound(read_fn$(), 1) ctrl.open(read_fn$(i%)) t% = Min(expires%, Timer + 100) ' Try to read the controller multiple times within a 100ms window. Do If Call(read_fn$(i%)) = expected%(i%) Then ctrl.poll$ = read_fn$(i%) Exit Function EndIf Loop Until Timer >= t% Next Loop Until Timer >= expires% or [435] Select Case Call(controller$) ' @thwill Error : Unknown user function my System : PicoMiteVGA MMBasic Version 5.07.07RC4 OPTION KEYBOARD GR OPTION CPUSPEED (KHz) 252000 OPTION SDCARD GP10, GP12, GP11, GP13 OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3 I hope that helps Edited 2023-04-18 22:58 by Martin H. 'no comment |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
This is the "keyboard only" version of the frog. Runs on 50707RC4. Stripped out some controller stuff since it would not run (as is) on my VGA picoMite. Best at 378MHz, otherwise runs fairly slow... picofrog_keyb.zip Volhout P.S. Martin, any suggestions as how to make it slightly more responsive ? I tested your KB Version with RC6, Speed is Ok now @252 000 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4026 |
Pico Frogger with updated PicoGAME VGA support for NES and Atari controllers: picofrog.zip This version should also work with the standard PicoMiteVGA. When it is first run it will prompt for whether to enable PicoGAME support and it will remember this for the future(*). (*) I have made an executive decision that there can be a file "A:/.config" in the simplest INI file format (it was going to be JSON, but PicoMite does not have that function). At the moment the only content of interest in the file is a line: pcb = pico-game-vga or: pcb = generic If and when this file gets more use I will write a utility to maintain it, until then "it is, what it is". Let the disagreements begin ... but please start a new thread in which to berate me. Best wishes, Tom Edited 2023-04-21 06:39 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
picofrog.zip This version should also work with the standard PicoMiteVGA. brilliant just tested in Pico Game (V2) with NES Controller Firmware 5.07.06 and Firmware 5.07.07RC6 in my opinion, this should be the official version of Pico Frog. Graet job, thank you Tom BTW:The idea to do it without a config file dates back to the Firmware, when the PicoMite without SSD did not have a real file system. Cheers Mart!n Edited 2023-04-21 17:47 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
Comming to this theater soon ..... PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
SNAKE for Picomite VGA In this game you control a snake (more a caterpillar with uncontrolled appetite) through a grass field, where fruit falls from the trees. The snake, ever hungry, eats all there is. Also thorny bushes, or even itself. Needless to say that these last 2 hurt him to death. The game is progressive, as is the music. At scores of 50 and higher it comes to its full potential... so practise a lot... There is a high score list that registers your achievements. But in this version it only remains as long as you keep this game in memory (VAR SAVE). The game design is driven from a similar game I wrote 40 years ago for the ORIC-1. Initially I thought of using it as an entry in the programming competition, but I will think of something new by that time. Or become a judge... When you crunch the game it is not even 3 kbyte in size (just remove comments). I tried to run this on MMB4W in mode 7 but that did not run, probably because the incompatibility in the sprite file. Conversion to LCD on the pico might work, but that is not my intention. Leave that to others... Enjoy the game, and give feedback. En list your highscore here !!! 'snake for Picomite VGA 5.07.07 'play snake game using cursor keys. Avoid eating scrub and yourself 'eat all fruit to grow. 'version ' s1 = basic ASCII text snake ' s2 = using sprites for snake ' s3 = adding fruit and tone ' s4/s4_1 = 8 sprites ' s5/s5_1 = dynamic game experience, music ' s6/s6_1 = highscore + compressed music ' s7/S7_1 = add sprites to bas file, add intro ' snake8 = release 'init arrays and restore previous highscore list z=255:Dim s(z,1),n$(9):VAR restore 'start graphics and sound MODE 2 SetTick 120,music 'variables used, and default values ' s(x,y)=head coord, (v,w)=head motion, tail erase unless food ' h=head poiter, t=tail pointer, l=length snake = level ' z=max length snake, p=pixel ahead, n$()=highscore list ' c=food delay, (i,j)=food coordiates, u=field color dark green ' d=tick counter music, e=music pointer, m$=music, f=tone ' a$=input, b=key h=0:t=0:l=2:d=0:b=131:x=120:y=x:s(h,0)=x:s(h,1)=y:c=79:e=1:u=16384 'compressed sound score containing bass, metrum, and melody m$="QQE\STSE\Q\SOC\X\SC\\\QMA\STSA\Q\QL@\P\Q@\S\QQE\STSE\Q\SOC\X\SC\\\TMA\VXVA\T\VO@\[\XC\\\" 'create sprite file in filesystem and load 8 sprites Open "8.spr" For output As #1 Print #1,"8,8,8" For i=1 To 64 Read a$:Print #1,a$ Next Close #1 Sprite load "8.spr",1 'intro screen CLS u 'empty grass field 'game title j=3*Pi/2 For i=0 To 3*Pi Step Pi/16 'print S as a series of snake sprites Sprite write 1,80-40*Cos(i),(1+(i>j))*80-40*Sin(i+Pi*(i>j)) Pause 100 Next Sprite write 3,120,160 'append head Text 140,40,"nake",,,6,RGB(orange),u 'legend and enter player name For i=4 To 7 Sprite write i,120+i*12,110 Next Sprite write 1,168,130:Sprite write 8,180,130 Text 220,110,"good food",,,,,u Text 220,130,"death",,,,,u Text 168,165,"use cursor keys",,,,,u Text 168,200,"enter name ......",,,,,u n$(0)="" Do a$=Inkey$ If a$<>"" Then n$(0)=n$(0)+a$ Text 240,200,n$(0),,,,,u EndIf Loop Until a$=Chr$(13) 'Input n$(0) 'n(0) is new game info, n(1..9)=highscore 'playfield For i=0 To 39 'bushes around field For j=0 To 30 Sprite write 8,8*i,8*j Next :Next Box 8,8,304,224,1,u,u 'dark green ground 'main game loop Do If b>127 Then 'calculate movement when b<>0 v=(b=131)-(b=130) 'change only at key press w=(b=129)-(b=128) 'else keep moving same EndIf a$=Inkey$:b=Asc(a$) 'detect arrow keys If b=27 Then Save image "game.bmp" x=x+8*v:y=y+8*w 'new x,y no protection relies on fence p=Pixel(x+4,y+4) 'look ahead what is coming Text 0,0,Str$(l) 'show level = length If p=u Then 'when background then empty Sprite write 1,s(h,0),s(h,1) 'write body shape over old head h=(h+1) And z:s(h,0)=x:s(h,1)=y 'new head pointer and store x,y t=(h-l) And z 'new tail pointer Sprite write 2+(v=0),x,y,4+(v=1)+2*(w=1) Box s(t,0),s(t,1),8,8,1,u,u 'erase tail ElseIf p=65280 Or p=RGB(brown) Then 'if wall or body then die SetTick 0,0:Play stop Text 160,100,"HIGHSCORE",C,,,,u score Text 160,60,"You died, <CR> or 'q' to quit",C,,,,u Do :a$=Inkey$:Loop While a$="" If a$="q" Then End Else Run 'very brute end game control Else 'is food Box x,y,8,8,1,u,u 'erase food eaten l=Min(l+4,z):c=79 EndIf Inc c,1 'new food after 80 moves If c=80 Then 'after 80 snake moves provide new food Do 'find free location i=8*Int(1+Rnd()*38):j=8*Int(1+Rnd()*28) Loop Until Pixel(i+4,j+4)=u c=0:Sprite write 4+(l>50)+Int(Rnd()*4),i,j 'OK and plot EndIf Pause Max(180-l,80) 'dynamic speed Loop 'dynamic music play Sub music gn If f<700 And l>50 Then Play sound 1,B,Q,f,l/16 'melody sounds when l>50 If (d And 3) = 0 Then gn :Play sound 2,B,Q,f,l/16 'metrum increases EndIf If d=0 Or d=8 Then gn :Play sound 3,B,S,f 'bass always EndIf d=(d+1) And 15 'count in 1/16 note If e>Len(m$) Then e=1 'wrap score to beginning End Sub Sub gn f=110*2^((Asc(Mid$(m$,e,1))-59)/12) 'calc freq Inc e,1 'next note End Sub 'manages the highscore list, uses n$(0) for new entry, show n$(1..9) Sub score n$(0)=Right$("00"+Str$(l),3)+" "+n$(0) 'combine level and name Sort n$():VAR save n$() 'sort and save For i=1 To 9 Text 133,200-i*9,n$(i),,,,,u 'show list Next i End Sub 'sprite data Data 00EEEE00,0EECCEE0,EEECCEEE,ECCECCCE,ECCCECCE,EEECCEEE,0EECCEE0,00EEEE00 Data 00EEEEE0,0E77CCEE,47177CCE,4477CCCC,4477CCCC,47177CCE,0E77CCEE,00EEEEE0 Data 00444400,0E7447E0,E717717E,E777777E,EC7CC7CE,ECCCCCCE,EECCCCEE,0EECCEE0 Data 00009900,00229000,02AAA220,2AAA2AA2,2AAAAAA2,2AAAAAA2,02AAAA20,0028A200 Data 000000E0,000000E0,00000666,00006666,00066E60,00666600,E66E6000,06600000 Data 00009000,00009000,04444440,44444444,44444444,44444444,04444440,00444400 Data 00EEEE00,0ECCCCE0,EC7CCCCC,ECCCCCCC,ECCCCCCC,ECCCCCCC,0ECCCCC0,00CCCC00 Data A002020A,0A020A02,020A0202,00202002,202A2020,0A02A020,0022A200,000AAA00 Volhout P.S. if you press <ESC> during the game, it saves the screen to a file "game.bmp" as proof that you achieved what you claim.... P.P.S. For Tom and Martin: the music compression is very simple: the lowest frequency is 147Hz, the highest 698Hz, all notes in between are calculated from an index that is derived from the ASCII value of each character. The Bass is 1/2 tempe, the Metrum is 1/4 tempo, and the melody is 1/16 tempo. All in one ASCII string. Edited 2023-06-27 05:11 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2109 |
I got no sound PicoMiteVGA MMBasic Version 5.07.07 OPTION AUTORUN ON OPTION KEYBOARD US OPTION CPUSPEED (KHz) 378000 OPTION DISPLAY 20, 40 OPTION AUDIO GP0,GP1, ON PWM CHANNEL 0 OPTION DISPLAY 20, 40??? |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
Sound will build up during gameplay. Try to reach a score of 60 or higher... PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4218 |
This is a version of the classic "STARTREK" text adventure game from 1978 that is adapted for picomite. super_startrek_pico.zip Enjoy... Volhout Edited 2023-07-20 22:35 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 1 of 4 |
Print this page |