Contents
How can I Make my Enemies move smooth?
(Graphics are from our totally free shoot-’em-up sprite pack .) This enemy moves up and down, shooting bullets at regular intervals as it goes: This enemy weaves across the screen: Both types of movement are handy for shoot-’em-up games. Notice how smooth and gradual the motion feels – no sudden movements, no “jerk” as the enemy changes direction.
How to make an enemy move at half its normal speed?
This code is messy, but you get the idea: if the enemy is within 100px of its highest or lowest boundaries, it moves at half of its normal speed. This works, although it’s not perfect. The enemy will still have a “jump” in speed when it changes direction, but at least it won’t be as noticeable.
Why does the enemy move bumpy on the way up?
The reason for this bumpy motion is that the enemy’s vertical speed makes a sudden huge change – even though the value of ufo.ySpeed stays the same. Suppose ufo.ySpeed is 10. On the way up, the enemy is moving upwards at 10px/tick (pixels per tick, where a “tick” is the length of one game loop).
How does the enemy move in UFO yspeed?
Suppose ufo.ySpeed is 10. On the way up, the enemy is moving upwards at 10px/tick (pixels per tick, where a “tick” is the length of one game loop). Once the enemy reaches the top, it reverses direction, and is suddenly moving at 10px/tick downwards.
How can you make an enemy move horizontally?
The enemy can be made to move horizontally by setting its xSpeed to any number other than zero: a negative number makes it move left, and a positive number makes it move right. These examples show what this kind of motion looks like.
How to design enemies pattern in non-Bullet Shooter?
Closed 6 years ago. I am making a top down shooter. Enemies will come in waves and attack in many different patterns (i.e. wave of 10 enemies flying in a elliptic curves, or a huge boss floating and shooting at you, etc.).