This is just like my first game! And its not really the right way to do it. Trust me. I've been down that road!
So i edited a couple things so you could see what i mean.
1st. Some draw actor events can be moved to createactor. For example, if you put an actor>follow mouse in CreateActor, it will still follow the mouse for the entire game. In draw actor, its a repetitive action that uses cpu, but doesn't result in anything.
Likewise, putting yvelocity in createactor will keep it going that direction for the whole game. Or until you tell it to stop.
2nd. Mapping out the waves isn't the best way, and i'll quote:
Superbeni wrote:maybe i will add some waves.
You don't have to add waves if you instead spawn enemies. In Configurator's draw actor script, i put a code that will randomly spawn enemies. You'll see what i mean.
Then, instead of a trigger to start the new level, just have it count how many enemies you've made and end the wave when you've reached your quota.
This is superpowerful because, you can set the quota each wave to....quota+(wave);
So if wave 4 has 23 enemies, wave five would have 28, 6 would have 34, etc.. With this automation scheme...you guessed it- The game can play forever, with its own waves, and you don't have to add any!
3rd. Don't double up your collisions. You had the ship colliding with lifeup, then lifeup colliding with ship. So i just removed the collision from lifeup, and added it to the ship, using the command (DestroyActor("Collide Actor"); to destroy the lifefup it just touched.
I also sped up the bullets a bit, and added a fire on space (its good to be able to shoot instantly).
Here's the GED file only.
- Space Fight 2 (rem).ged.zip
- Saved from Linux version of GE, let me know if you have any issues with it.
- (9.72 KiB) Downloaded 137 times
If you understand what i've just told you, and what i've done to the scripts in your ged file, you'll save yourself several weeks/months of trial and error. And of course, ge is powerful enough that you can have hundreds of enemies onscreen at once, so huge powerups, like spreads, lasers, autocannon could result in HUGE ACTION!
Still, its a nice game (love the cursor).