@ Shinobi - Danke - hab`s gerade erst gelesen, da habe ich meinen eigenen Thread übersehen
Tipps von Galaga-Kennern sind immer herzlich willkommen. Dein Moopatrol habe ich mir gerade gesogen. Bin gespannt.
YEAH - it`s done. I have rewritten enemy functions. Instead of 15 single functions only one. Puh - I never expected, that you have to be as careful with var values when everythings in a while loop the whole time
What`s new in the video:
Option menu:If you choose an option there is a little animation. First little decoration - more is planed
Enemy behaviorGalaga enemys enter "battlefield" in three different variants. You can see all of them.
Level UpChanging levels is not done yet, but prepared. You can see 3 different levels. I just changed the vars by hand (for the values, take a look to the top left)
Level 1:Enemies don`t shoot, if they fly in. They are quite slow and you get no additional enemies during flight in.
Level 16:Every fourth enemy shoots. speed is increased by 8 and you get 4 additional enemys each wave of flight in.
Level 32:Every enemy shoots, speed is increased by 16 and you get 8 additional enemies each wave.
Time between enemy attack decreases depending on the increase of enemy speed. If you like, take a look:
My fist 78 seconds video(updated 10.27 MB) There are 2 main problems now.
- the radius of enemy loops increase although they depend on enemy speed - I guess I will get this alone
- if enemies are in wait position collision doesn`t work I don`t know why. It happens, if my.STATE = 8 or my.STATE = 9.
Cheers Ditje
Here ist the code:
// Warte Positionen ///////////////////////////////////////////////////
if(my.STATE == 7) // Drehungen zurückstellen - Endposition
{
c_move(me, vector(0, 0, 0), vector(0, 0, 0), IGNORE_ME | IGNORE_PUSH);
me.pan = 0;
me.tilt = 0;
me.roll = 0;
me.x = epos[my.ENEMID][0];
me.y = epos[my.ENEMID][1];
me.z = epos[my.ENEMID][2];
my.STATE = 8;
}
if(my.STATE == 8) // Auf Angriffs Position hin und her
{
c_move(me, vector(0, 0, 0), vector(-0.5*time_step, 0, 0), IGNORE_ME | IGNORE_PUSH);
if(me.x <= epos[my.ENEMID][0]-5) my.STATE = 9;
}
if(my.STATE == 9) // Auf Angriffs Position hin und her
{
c_move(me, vector(0, 0, 0), vector(0.5*time_step, 0, 0), IGNORE_ME | IGNORE_PUSH);
if(me.x >= epos[my.ENEMID][0]+5) my.STATE = 8;
}