Hi Erel,
I have just purchased basic4ppc, up to this point I have been a GLBasic
person as it can compile for multiple Operating Systems.
I have been trying to get my head around Sprites and Transparency in
basic4ppc as they are used in a different way!
GLBasic:
LOADSPRITE "ship.bmp",0
LOADSPRITE "shot.bmp",1
LOADSPRITE "buga.bmp",2
LOADSPRITE "boom.bmp",3
The sprite's are referred to numerically or given names.
// Player
INC playerx, MOUSEAXIS(0)
playerx = MAX(MIN(playerx,600),32)
SPRITE 0, playerx, 456 //sets the ship.bmp position
SHOWSCREEN
The ship.bmp has a background colour of RGB(255,0,128) which is transparent
the sprites in basci4ppc also have transparency bur an image does no seem to
have thia capabillity, the image button is no use for this either as its
transparency is the same as the Form or Panel background colour?
// Invaders
TYPE FOE
x
y
speed = 3
amour = 4
ENDTYPE
LOCAL bugs[] AS FOE
FOREACH bug IN bugs[] / draw the invaders on the screen and animate
INC bug.x, bug.speed
IF bug.x<0 OR bug.x>640
bug.speed = - bug.speed
INC bug.y, 32
ENDIF
NEXT
How would I handle all this in basic4ppc, I will end up with six rows of
invaders, each row will have a score value, top will have the highest score
so I need to know which sprite has been destroyed.
Can I put the sprites in a structure or an Array?
I am not asking you to do the programming for me but I would like more info
on how to controll the sprites within the game.
Regards,
Andrew.
I have just purchased basic4ppc, up to this point I have been a GLBasic
person as it can compile for multiple Operating Systems.
I have been trying to get my head around Sprites and Transparency in
basic4ppc as they are used in a different way!
GLBasic:
LOADSPRITE "ship.bmp",0
LOADSPRITE "shot.bmp",1
LOADSPRITE "buga.bmp",2
LOADSPRITE "boom.bmp",3
The sprite's are referred to numerically or given names.
// Player
INC playerx, MOUSEAXIS(0)
playerx = MAX(MIN(playerx,600),32)
SPRITE 0, playerx, 456 //sets the ship.bmp position
SHOWSCREEN
The ship.bmp has a background colour of RGB(255,0,128) which is transparent
the sprites in basci4ppc also have transparency bur an image does no seem to
have thia capabillity, the image button is no use for this either as its
transparency is the same as the Form or Panel background colour?
// Invaders
TYPE FOE
x
y
speed = 3
amour = 4
ENDTYPE
LOCAL bugs[] AS FOE
FOREACH bug IN bugs[] / draw the invaders on the screen and animate
INC bug.x, bug.speed
IF bug.x<0 OR bug.x>640
bug.speed = - bug.speed
INC bug.y, 32
ENDIF
NEXT
How would I handle all this in basic4ppc, I will end up with six rows of
invaders, each row will have a score value, top will have the highest score
so I need to know which sprite has been destroyed.
Can I put the sprites in a structure or an Array?
I am not asking you to do the programming for me but I would like more info
on how to controll the sprites within the game.
Regards,
Andrew.