Author Topic: Pixel Test Help  (Read 2647 times)

0 Members and 1 Guest are viewing this topic.

Offline Tgooseman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 17
  • Rating: +1/-0
    • View Profile
Pixel Test Help
« on: May 16, 2011, 12:12:55 am »
Can somebody clear up exactly how pixel-test( works? For the Helicopter game I have been working on I just threw a bunch of them together, and I achieved a sort of half working collision detection.

I am using an 8x16 helicopter sprite, if that is important.  And the bricks I am colliding with are 3 pixels wide by 8 pixels tall.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Pixel Test Help
« Reply #1 on: May 16, 2011, 12:13:35 am »
Pixel-test(x,y) returns 1 if the pixel at (x,y) is solid and 0 otherwise.
In-progress: Graviter (...)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixel Test Help
« Reply #2 on: May 16, 2011, 12:14:29 am »
And remember it's X,Y (instead of Y,X like in BASIC).