Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pixeli Lander Test
#1
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)
Logic is the beginning of wisdom.
Reply
#2
(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' ...
Reply
#3
You need to make sure that you have installed N7_240414 update...
Logic is the beginning of wisdom.
Reply
#4
(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
Reply
#5
(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
Reply
#6
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
Logic is the beginning of wisdom.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)