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 : VegiPete's Renewed Defense of the Green Hills on PicoMite
Author | Message | ||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Here is VegiPete's "Renewed Defense of the Green Hills" #2, (a variation of Missile Command) converted from CMM2 for the PicoMite using an ILI9488 for the display and touch instead of a mouse. I had previously converted it for an LCD on the Armmite F4, but there were still some changes required. The only real non-cosmetic change was to reduce the number of missiles from 48 to 32 because the PicoMite didn't have enough memory. Even when running the PicoMite at the top speed, with "OPTION CPUSPEED 378000", the pace of the game is, say, stately--just about right for my motor skills. (Note that "OPTION GUI CONTROLS 40" is needed for touch to be enabled.) Pete's original code is here, but good luck, since it was published for the CMM2 2021 Programming Challenge, and is one dense uncommented block of code. At some point he provided a somewhat formatted and commented version which I used to make the port to the F4. Here are the options: OPTION SYSTEM SPI GP18,GP19,GP16 OPTION KEYBOARD US OPTION CPUSPEED (KHz) 378000 OPTION LCDPANEL ILI9488, RLANDSCAPE,GP21,GP20,GP17 OPTION GUI CONTROLS 40 OPTION TOUCH GP22,GP7 GUI CALIBRATE 0, 158, 282, 1252, 887 Here's a youtube video: Missiles on PicoMite The color rendition of the video is terrible. I tried the cameras on two cell phones, and what is green to the eye and when the phone is two inches from the LCD is white when it is far enough away to frame the entire LCD. The orange with yellow bordered explosions are also not rendered accurately. Here's the code: gh2.zip For the F4 port, I had used MM.DEVICE$ to distinguish between CMM2 and F4. I continued that, adding the PicoMite. I tried to keep it so that this program will run on all 3 devices, but I didn't go back and check for the F4 and CMM2. I ran up to wave 12 before I lost a base station and the program crashed with an array dimension exceeded while trying to erase the missile supply for that base. I've tried to fix that problem, but haven't gotten back to that condition, so it could crash still (or could crash for other reasons). This is a really fine game which VegiPete wrote. It's a little slow on the PicoMite, but can still entertain. Thanks, Pete, for your challenging and fun MMBasic games. ~ Edited 2023-05-17 03:36 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Nice video @lizby, I want to do it myself though for the challenge. I'm impressed with touch and the line to cursor which I must sort on my tod. my effort at game on 328 https://www.youtube.com/watch?v=9pys3Y8_bns |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
Thanks Lance, that will save me some effort porting it to the Bintendo ... may have to do something about the speed though. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4250 |
There are not many dynamic changes on the screen. It should be possible to make the game speed such that SPI speed is the bottle neck (determining factor). Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9129 |
The way to make is much faster is to do all the work in a framebuffer and then use FRAMEBUFFER BLIT to move just the areas that have changed onto the physical display |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
That is what I figured. Do you know off hand approximately how long a FRAMEBUFFER BLIT of the full 320x240 display (ILI9341) takes ? Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Or, as it would be in this case, a 480x320 ILI9488? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
True, not a lot going on and then mostly plotting lines not blit images. Should be playable on spi glcd. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I unzipped the code, lots, inc b(l),-1 'b(l)=b(l)-1 was interesting. The code looks more complicated than it needs to be imho. I will sort the line pixels at a time even if short lines a few pixels. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
I unzipped the code, lots, inc b(l),-1 'b(l)=b(l)-1 was interesting. The code looks more complicated than it needs to be imho. I will sort the line pixels at a time even if short lines a few pixels. It's simpler than pacman :) |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
This makes lines easy :) https://www.google.com/search?client=opera&q=x1+y1+x2+y2&sourceid=opera&ie=UTF-8&oe=UTF-8#fpstate=ive&vld=cid:63e0246e,vid:PwLQd-k0oQQ |
||||
Print this page |