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 : Lunar Lander picomite VGA
Author | Message | ||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
Hi, do we have code for the old Lunar Lander game? Couldn’t find it. It think some years ago, ther was a thread…..? |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3801 |
Not the most recent but a fair start here John |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
Ok, anyone who ported ist to Picomite Vga? |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
mode 1 cls circle 100,98,10 box 92,108,16,8 line 92,116,88,126 line 108,116,112,126 line 86,126,90,126 line 110,126,114,126 line 96,116,100,126:line 100,126,104,116 |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4233 |
This is your chance atmega8, the game itself is not hard to port, only you need a plan for the rotation of the lander itself. It calculates 38 sprites. 50900beta should be able to handle 38 sprites. 50800 can do only 32 Volhout PicomiteVGA PETSCII ROBOTS |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
Not my chance, this will ruin me May be in my summer holidays. As i can see, PicomiteVGA has another keyboard handling... Think i can handle this.. Rotation of Lander.. ok. THX |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
Start fresh for picomite. With floats, the gravity and thrust will be easier than integers and I want to draw the lander as a polygon and use the new polygon rotate perhaps. |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
Alas, not quite so easy. The CMM2 can flip sprites left/right and up/down, so only a quarter of the full rotation of 72 images were needed. (x 2 for engine on.) Not so with the PicoMite. I agree with Stan, polygon and polygon rotate seems most likely to succeed. Visit Vegipete's *Mite Library for cool programs. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
a gcbasic 328 version just to demo ili read pixel function , not a game. piece of cake with mmbasic. https://www.youtube.com/watch?v=SGJFApFqx1Q |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
The real lunar lander didn't rotate, more like a quad copter but stayed horizontal. seems more like asteroids. |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4233 |
Huh ??? PicoMiteVGA can do the same (I guess). See "options" Volhout Edited 2024-02-22 07:47 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6787 |
IIRC the original game didn't rotate it. The first version I remember used an ASCII text display so it couldn't rotate. :) I even have a version (in BASIC COMPUTER GAMES - David Ahl et. al.) with no display - it was written in BASIC to print out on a teletype. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
POLYGON n, xarray%(), yarray%() [, bordercolour] [, fillcolour] POLYGON n(), xarray%(), yarray%() [, bordercolour()] [, fillcolour()] POLYGON n(), xarray%(), yarray%() [, bordercolour] [, fillcolour] Draws a filled or outline polygon with n xy-coordinate pairs in xarray%() and yarray%(). If ‘fillcolour’ is omitted then just the polygon outline is drawn. If ‘bordercolour’ is omitted then it will default to the current default foreground colour. If the last xy-coordinate pair is not the same as the first the firmware will automatically create an additional xy-coordinate pair to complete the polygon. The size of the arrays should be at least as big as the number of x,y coordinate pairs. 'n' can be an array and the colours can also optionally be arrays as follows: POLYGON n(), xarray%(), yarray%() [, bordercolour()] [, fillcolour()] POLYGON n(), xarray%(), yarray%() [, bordercolour] [, fillcolour] The elements of array n() define the number of xy-coordinate pairs in each of the polygons. e.g. DIM n(1)=(3,3) would define that 2 polygons are to be drawn with three vertices each. The size of the n array determines the number of polygons that will be drawn unless an element is found with the value zero in which case the firmware only processes polygons up to that point. The x,y-coordinate pairs for all the polygons are stored in xarray%() and yarray%(). The xarray%() and yarray%() parameters must have at least as many elements as the total of the values in the n array. Each polygon can be closed with the first and last elements the same. If the last element is not the same as the first the firmware will automatically create an additional x,y-coordinate pair to complete the polygon. If fill colour is omitted then just the polygon outlines are drawn. MATH V_ROTATE x, y, a, xin(), yin(), xout(), yout() This command rotates the coordinate pairs in “xin()” and “yin()” around the centre point defined by “x” and “y” by the angle “a” and puts the results in “xout()” and “yout()”. NB: the input and output arrays can be the same and the rotation angle is, by default, in radians but this can be changed using the OPTION ANGLE command. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2129 |
It's just down to landing it slowly and not run out of fuel. get that right and still a bit of fun. |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
[snip] Not so with the PicoMite. Huh ??? PicoMiteVGA can do the same (I guess). See "options" You are correct. It's the SPRITE MEMORY and SPRITE COMPRESSED commands that can't flip. So SPRITES could be used. But I don't see IMAGE ROTATE so a different method to generate the images will be needed. Visit Vegipete's *Mite Library for cool programs. |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1241 |
do we have code for the old Lunar Lander game? Couldn’t find it. It think some years ago, ther was a thread…..? Maybe this one? causality ≠ correlation ≠ coincidence |
||||
zeitfest Guru Joined: 31/07/2019 Location: AustraliaPosts: 482 |
There is a LEM program on this Basic in JS site |
||||
Print this page |