NaaLaa
Pixeli Lander Test - Printable Version

+- NaaLaa (https://www.naalaa.com/forum)
+-- Forum: NaaLaa (https://www.naalaa.com/forum/forum-1.html)
+--- Forum: NaaLaa 7 Code (https://www.naalaa.com/forum/forum-4.html)
+--- Thread: Pixeli Lander Test (/thread-119.html)



Pixeli Lander Test - johnno56 - 04-15-2024

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.


.zip   pixelTest.zip (Size: 70.7 KB / Downloads: 5)


RE: Pixeli Lander Test - 1micha.elok - 04-15-2024

(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.

...

   
click the image to zoom in

something error when I ran the Pixeli Lander Test : "Undeclared identifier 'pixeli' ...


RE: Pixeli Lander Test - johnno56 - 04-15-2024

You need to make sure that you have installed N7_240414 update...


RE: Pixeli Lander Test - 1micha.elok - 04-15-2024

(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


RE: Pixeli Lander Test - Marcus - 04-15-2024

(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


RE: Pixeli Lander Test - johnno56 - 04-15-2024

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