NaaLaa

Full Version: Pixeli Lander Test
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok. This is a VERY crude Lander test. It uses "pixeli()" for collision with the Landing Pad and normal AABB for the ground...

I would appreciate an examination of how I have implemented the pixeli command and suggest any and all corrections.

Note: The ship can land from beneath the pad... Not an error. The landing pad (except for a concept level) is always on the ground.

The usual controls: Arrow keys.
Note: BOTH landing struts MUST contact the pad.
Watch your landing velocity.

[attachment=204]
(04-15-2024, 12:48 AM)johnno56 Wrote: [ -> ]Ok. This is a VERY crude Lander test. It uses "pixeli()" for collision with the Landing Pad and normal AABB for the ground...

I would appreciate an examination of how I have implemented the pixeli command and suggest any and all corrections.

...

[attachment=205]
click the image to zoom in

something error when I ran the Pixeli Lander Test : "Undeclared identifier 'pixeli' ...
You need to make sure that you have installed N7_240414 update...
(04-15-2024, 09:53 AM)johnno56 Wrote: [ -> ]You need to make sure that you have installed N7_240414 update...

It's my mistake.... I haven't installed the newest update .... Big Grin Big Grin Big Grin
(04-15-2024, 12:48 AM)johnno56 Wrote: [ -> ]Ok. This is a VERY crude Lander test. It uses "pixeli()" for collision with the Landing Pad and normal AABB for the ground...

I would appreciate an examination of how I have implemented the pixeli command and suggest any and all corrections.

Note: The ship can land from beneath the pad... Not an error. The landing pad (except for a concept level) is always on the ground.

The usual controls: Arrow keys.
Note: BOTH landing struts MUST contact the pad.
Watch your landing velocity.

I would create a variabe,

Code:
visible padColor = RGB(255, 255, 0)

, and instead of

Code:
    if alpha(getPixel) = 255 and red(getPixel) = 255 and green(getPixel) = 255 and blue(getPixel) = 0
        if alpha(getPixel2) = 255 and red(getPixel2) = 255 and green(getPixel2) = 255 and blue(getPixel2) = 0

, just write:

Code:
    if getPixel = padColor and getPixel2 = padColor

Works nice anyhow Smile
Ah... I just knew that there had to be a simpler way to do it... lol

Thank you...

I have completed the conversion of a moon lander that I wrote using RCBasic... I presumed that the pixeli() would work ok and modified it as well. As soon as I add your suggestions I will post it... It is not pretty to look at but it is playable... The hiscore read/write needs some work... lol