0 Members and 1 Guest are viewing this topic.
This is always the first thing I notice in a game, and I bother you with it while it is still easy to fix it Do you plan on adding the possibility to play as a girl or will girls have to deal with that guy ? Other than that, those animations look great indeed
The character sprites look great!
for example if i kept the array in L3Code: [Select]Lbl bulletsreturn!if {L3}r //L3r will have the number of bullets currently in play, so quit routine if no bulletsL3+2->F //F will keep track of the current array pointer{L3}r+1while -1->E{F+2}r+{F+4}r -> {F+2}r //update bullet x, if bullet x is kept in index+2 and xvel is kept in index+4If (bullet on screen)Pt-On(plaX-{F+2}r,{F+6}r,{F}r*8+pic0) //draw bullets, assume buly is in index+6 and bullet type is in index+0endF+8->F //move to next bulletEend
Lbl bulletsreturn!if {L3}r //L3r will have the number of bullets currently in play, so quit routine if no bulletsL3+2->F //F will keep track of the current array pointer{L3}r+1while -1->E{F+2}r+{F+4}r -> {F+2}r //update bullet x, if bullet x is kept in index+2 and xvel is kept in index+4If (bullet on screen)Pt-On(plaX-{F+2}r,{F+6}r,{F}r*8+pic0) //draw bullets, assume buly is in index+6 and bullet type is in index+0endF+8->F //move to next bulletEend
typedef struct{ unsigned short x; unsigned short y; short xvel; short yvel;}Bullet;
Bullet bul = {.x = 20, .y = 35, .xvel = 2, .yvel = 3};
bul.x += bul.xvel;bul.y += bul.yvel;
YOu have a struct like this:Code: [Select]typedef struct{ unsigned short x; unsigned short y; short xvel; short yvel;}Bullet;And you can init it like this:Code: [Select]Bullet bul = {.x = 20, .y = 35, .xvel = 2, .yvel = 3};YOu can later add things like type id, lifetime, or whatever you want! And adding xvel and yvel to the bullet:Code: [Select]bul.x += bul.xvel;bul.y += bul.yvel;
unsigned char array[5];
Bullets myBullets[100];
for(unsigned i = 0; i < 100; ++i) { displayBullet(myBullets[i]); //display_sprite(myBullets[i].x, myBullets[i].y, myBulletSprite);}