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 : Playing with Transparency and the Ultimate Game
Page 2 of 3 | |||||
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Stan, Peter told you how to fix the syntax issue in your original thread, remove the redundant w, h parameters from the call to BLIT WRITE #b, x, y. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Best wishes to you Tom BLIT WRITE #b, x, y. it's like #b in the manual, what is it? ie # what is it? simply what should BLIT WRITE 1,spx(temp),spy(temp), 16, 16 be, that gives the syntax error, to not be please? |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
BLIT WRITE #1,spx(temp),spy(temp) Or BLIT WRITE 1,spx(temp),spy(temp) The # is optional, simply a matter of style. The 16, 16 was redundant and is now a syntax error - sprite #1 already knows it is 16x16 without you repeating it. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6792 |
There are no width and height parameters now. the "16,16" is redundant and will trigger a syntax error. w and h are only used for BLIT READ You can't use the existing manual for RC12. b is the source memory buffer number The hash sign is optional (which is why it's in square brackets). Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
[63] Blit WRITE 1,spx(temp),spy(temp)', 16, 16 'draw sprite1 at new position Error : 241 is invalid (valid is -15 to 240) another error. what't the syntax for blit write please |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Deleted, my bad. Edited 2023-11-02 05:56 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
What is the value of spy(temp) ? My guess, 241, which is completely off the display and hence now being reported as a syntax error ... not really a syntax issue IMO, but still an error Tom Edited 2023-11-02 05:59 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6792 |
It's here spy(temp) holds 241 and the maximum height is 240. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Shouldn't the maximum y be 239 given that 240 is also off display? Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
er if no ht , wid then how,s it know? must be set up first?? dunno . 21 pages all dynamic, hard for a beginner to follow as not for lcd until page xx says vga only spi too slow. BLIT READ 1,10,10,16,16 'reads sprite1 from screen to blit buffer1 works no error BLIT WRITE 1,spx(temp),spy(temp) , 16, 16 'draw sprite1 at new position gives syntax error BLIT WRITE #1,spx(temp),spy(temp) ', 16, 16 'draw sprite1 at new position works for a second then the Error : 241 is invalid (valid is -15 to 240) is a framebuffer need be setup before blit usage for lcd now or even vga? |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
God, it shouldn't be this hard. It knows the height and the width of the sprite from when it was READ into that sprite buffer. You are getting the 241 error because you are trying to write the sprite completely off the screen. MMBasic shouldn't be calling it a syntax error, but it is an error. No, a frame buffer is not obligatory. And I am out, Tom Edited 2023-11-02 06:46 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
If what Stan posted is accurate and complete, MMBasic didn't call it a syntax error, just an error: "Error : 241 is invalid (valid is -15 to 240)" Re 240 versus 239, Peter has allowed BLIT WRITEs which begin off the screen and end off the screen, but not ones which begin so far off the screen to the left or above that nothing appears--but you can BLIT entirely off the screen to the right or below by having x be mm.hres or y be mm.vres. > cls rgb(red) > blit read #1,0,0,16,16 > cls > blit write #1,310,230 > blit write #1,158,239 > blit write #1,200,240 > blit write #1,220,241 Error : 241 is invalid (valid is -15 to 240) > blit write #1,-15,-15 > blit write #1,-16,-15 Error : -16 is invalid (valid is -15 to 320) The first BLIT WRITE shows 10x10 red pixels at the bottom right; the 2nd shows a single row of 16 pixels at the bottom middle of the screen; the 3rd is entirely off the screen at the bottom; the 4th is like Stan's error--can't BLIT to a y value greater than mm.vres; the 5th shows a single red pixel in the upper left of the screen; the 6th produces an error because the x value is such that no pixels can be written to the screen. (And apologies to vegipete) ~ Edited 2023-11-02 09:03 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Sweet the iris, I did something similar with the Fade_in, Fade Out for the start menu. Just not round but 16x16 squares. What I'm wondering is how does the compression algorithm for the levels work? Looks good, Cheers Martin 'no comment |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
@lizby. yes, my bad. When I reflashed rc12 I set lcd to landscape but code was for portrait... :( seem "BLIT WRITE #1,spx(temp),spy(temp) ', 16, 16 'draw sprite1 at new position" works, the size must come from the corresponding "BLIT READ 1,10,10,16,16 'reads sprite1 from screen to blit buffer1" regards, stan. |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
When I went looking for levels, the ArduBoy project had the biggest accessible collection so I went with them. (There's the odd slight difference compared to the Apple][ levels that I've seen.) Player, enemy and exit ladder coordinates are listed first, plus 4 coords of something called "re-entry location" - purpose unknown. The remaining data is the level itself. This is either unencoded, or run length encoded in rows or columns. For the RLE encoding, 5 bits of each byte are the count, 3 bits are the tile. I've implemented both RLE decoders. I haven't come across an unencoded level yet so that bit remains untouched. Visit Vegipete's *Mite Library for cool programs. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Ta Tom as well. not hard just new. I like familiar not boldly go.captain's log jammed the bog. dunno if bbc micro and amstrad 464 used same graphics but you could draw lines in different colours then swap the colours but leave the lines. pallet switching? can this be done |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Not on the PicoMite{VGA}, though it might be possible on the Colour Maximite 2. When it comes to VGA from the PicoMite one should not complain that the dog sings badly, one should be astounded that it sings at all. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Tom.I got vga set up kb, monitor, sound but I'm a lcd on vero type so what's relevant to lcd ilixxxx and silk purse from spi is interesting. lots of new stuff. stan new stuff rc12 Edited 2023-11-03 05:01 by stanleyella |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Here is an improved demo of Lode Runner. Connect a Wii controller to the system I2C and let your little fellow run. At this point, the 'enemies' have no brains, and are completely harmless. Blast holes to your heart's content, but don't get stuck in the holes. Use the {start} button to restart the current level. Use the right joystick to move. Use {cursor left} and {cursor right} to blast holes in the brick. Player movement needs improving - it is not as fluid as it should be, and there are the odd movement glitches. Comes from the fact that the player position is pixel based but the ability to move is tile based. Included is a bin file with a few levels, ripped from an Apple ][ disk image. Copy it to the same place as the program. Visit Vegipete's *Mite Library for cool programs. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Where is rocks in space and is it adaptable to pico please or don't bother? stan don't see download for above link Edited 2024-01-07 07:40 by stanleyella |
||||
Page 2 of 3 |
Print this page |