Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / DBC - Checking bkground colour around sprite

Author
Message
Ginga
20
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 19th Sep 2006 00:59
BASICALLY,,, I've made a VERY simple 2d demo thingy, just to test out physics. Though i cant get it working.

It draws a red box slightly lowerd, and a couple of lines at either ends. A sprite is then loaded (2 images) and placed in a black area at the top right. Using some point and array commands, i wanted it to check the area infront and beneath it to get the red value, and if its all black then move one pixel. But ti dont work it al lchecks out saying that the RGBR value = 0. something must be wrong with my logic. Any one care to help?


Use any old 32x32 images as sprites, even a yellow n blue box will do. Cheers in advance
Zergei
21
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 19th Sep 2006 18:43
You've got lots of problems there, that i can assure.
However the main problem to the fact that it is not moving is that LtR# , UtD# , LtR and UtD are messed up. I suppose that both of them shouldn't exist and that you just forgot to add the #. Also, LtR# appears in the UtD# sequence, and it shouldn't.

Further on my stuff at...
Ginga
20
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 21st Sep 2006 13:55
Wow dude, I hadnt even noticed when i was trying to debug it myself. Thanks alot, i'll see if i can fix it now.

Login to post a reply

Server time is: 2026-07-07 03:23:15
Your offset time is: 2026-07-07 03:23:15