Thanks, I'll try just sticking it in my code and seeing if thats all i have to do

. I hope it wont be too hard to understand...
I'll repost if I have problems.
EDIT:
whoah, I don't get a single line of this stuff.I think ill just stick it on the bottom of the program and replace spritehit with spritepixelcollision ().
EDIT2: I had a problem

. I inserted that into the code, and the Main Player (A green Circle for now) got lodged inside the ground o-o. The second time, it went right on through. Is this code stable?
here is all of my code:
(only the gravity is done)
Rem Project: 2D Platformer
Rem Created: 3/27/2005 5:47:59 PM
Rem ***** Main Source File *****
`****************
` set up
`****************
sync on
sync rate 30
hide mouse
`*****************
`declare variables
`*****************
player_x = 106
player_y = 100
`gravity's acceleration
grav_accel# = 3
`ground touch defined in touch_detection
`***************
`load the dookie
`***************
load image "player.bmp",1
load image "level.bmp",2
`**************
`Main Function
`**************
Do
`make sprites
SPRITE 1,player_x,player_y,1
Sprite 2,0,396,2
`go subroutines! o/
gosub gravity
gosub touch_check
sync
Loop
`*********************
` Subroutines
`*********************
touch_check:
`0 = no 1 = yes
ground_touch = SpritePixelCollision(2,1)
return
gravity:
`this makes it so that the circle falls at a faster and faster pace
if ground_touch = 0 Then grav_accel# = grav_accel# + 0.7 : Player_y = player_y + grav_accel#
`this makes the speed of the drop stop as the acceleration reaches 4.5
if grav_accel# > 4.5 then grav_accel# = 4.5
return
`****************
` FUNTIONS D=
`****************
function SpritePixelCollision(sprite1 as integer, sprite2 as integer)
local Sprite1Base as dword
local Sprite2Base as dword
local Sprite1Addr as dword
local Sprite2Addr as dword
local V as dword
if sprite collision (sprite1, sprite2) > 0
make memblock from image 255,sprite image(sprite1)
make memblock from image 256,sprite image(sprite2)
Sprite1Base=get memblock ptr(255)
Sprite2Base=get memblock ptr(256)
XPos1=sprite x(sprite1)-sprite offset x(sprite1)
YPos1=sprite y(sprite1)-sprite offset y(sprite2)
Width1=*Sprite1Base
inc Sprite1Base, 4
Height1=*Sprite1Base
inc Sprite1Base, 11
XPos2=sprite x(sprite2)-sprite offset x(sprite2)
YPos2=sprite y(sprite2)-sprite offset y(sprite2)
Width2=*Sprite2Base
inc Sprite2Base, 4
Height2=*Sprite2Base
inc Sprite2Base, 11
if XPos2 > XPos1
XStart1=XPos2-XPos1
XStart2=0
XOverlapSize=(Width1-XStart1)-1
if XOverlapSize >= Width2 then XOverlapSize=Width2-1
else
XStart2=XPos1-XPos2
XStart1=0
XOverlapSize=(Width2-XStart2)-1
if XOverlapSize >= Width1 then XOverlapSize=Width1-1
endif
if YPos2 > YPos1
YStart1=YPos2-YPos1
YStart2=0
YOverlapSize=(Height1-YStart1)-1
if YOverlapSize >= Height2 then YOverlapSize=Height2-1
else
YStart2=YPos1-YPos2
YStart1=0
YOverlapSize=(Height2-YStart2)-1
if YOverlapSize >= Height1 then YOperlapSize=Height1-1
endif
XStart1=XStart1*4
XStart2=XStart2*4
Width1=Width1*4
Width2=Width2*4
for YOffset=YOverlapSize to 0 step -1
Sprite1Addr=Sprite1Base + ((YOffset+YStart1)*Width1) + XStart1
Sprite2Addr=Sprite2Base + ((YOffset+YStart2)*Width2) + XStart2
for XOffset=XOverlapSize to 0 step -1
v=*Sprite1Addr
if (v && 0xff000000) <> 0
v=*Sprite2Addr
if (v && 0xff000000) <> 0
delete memblock 255
delete memblock 256
exitfunction 1
endif
endif
inc Sprite1Addr, 4
inc Sprite2Addr, 4
next XOffset
next YOffset
delete memblock 255
delete memblock 256
endif
endFunction 0
Is this the one that required Alpha Channel?
Stan: OH MY GOD! THEY KILLED KENNY
Stan's Grandpa: You Bastards!
Kyle: HEY! ><