Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:30 26 Nov 2024 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 : Lunar Lander picomite VGA

Author Message
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 09:17pm 20 Feb 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 3801
Posted: 09:46pm 20 Feb 2024
Copy link to clipboard 
Print this post

Not the most recent but a fair start here

John
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 10:09pm 20 Feb 2024
Copy link to clipboard 
Print this post

Ok,

anyone who ported ist to Picomite Vga?
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 01:48am 21 Feb 2024
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 4233
Posted: 08:39am 21 Feb 2024
Copy link to clipboard 
Print this post

  atmega8 said  Ok,

anyone who ported ist to Picomite Vga?


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: Germany
Posts: 722
Posted: 08:45am 21 Feb 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2129
Posted: 01:58pm 21 Feb 2024
Copy link to clipboard 
Print this post

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: Canada
Posts: 1109
Posted: 07:00pm 21 Feb 2024
Copy link to clipboard 
Print this post

  Quote  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


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 Kingdom
Posts: 2129
Posted: 07:15pm 21 Feb 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2129
Posted: 07:34pm 21 Feb 2024
Copy link to clipboard 
Print this post

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: Netherlands
Posts: 4233
Posted: 09:45pm 21 Feb 2024
Copy link to clipboard 
Print this post

  vegipete said  
  Quote  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


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.




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 Kingdom
Posts: 6787
Posted: 09:46pm 21 Feb 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2129
Posted: 10:11pm 21 Feb 2024
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2129
Posted: 10:15pm 21 Feb 2024
Copy link to clipboard 
Print this post

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: Canada
Posts: 1109
Posted: 05:16am 22 Feb 2024
Copy link to clipboard 
Print this post

  Volhout said  
  vegipete said  The CMM2 can flip sprites left/right and up/down,
[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: Germany
Posts: 1241
Posted: 12:52pm 22 Feb 2024
Copy link to clipboard 
Print this post

  atmega8 said  Hi,


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: Australia
Posts: 482
Posted: 08:33pm 23 Feb 2024
Copy link to clipboard 
Print this post

There is a LEM program on this Basic in JS  site
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024