(20 pts total; broken down into component parts below) Include a 2nd, "boss" enemy type, which uses different art than your main enemy type, and behaves in a different way than your other enemies according to the following rules:
(4 pts) Must be a "multi-hit" enemy, which takes more than 1 intersection with a bullet or player to be destroyed (1pt of the full 3pts), and changes its appearance to reflect its remaining health (2pts of the full 3 pts).
SUGGESTIONS: Similar to above for the animated explosion, many of the same principles could be used with other sprite sheets or separate image files that you find, create, or modify. One example of a useful sprite sheet isthis one(slightly modified to more tightly contain the artwork and have a transparent background, altered from the creative commons zero licensedwork from artist "KenneY").
(2 pt) Worth more score when destroyed than regular enemies (as you see fit)
(10 pts) Movement/Shooting of this enemy should be a delayed horizontal mirror of the player, meaning that when the player moves left this enemy moves left, player to right then enemy to right; but player up, then enemy down and when player down, enemy up (as though a mirror was placed along the center horizontal plane). However, rather than player movement immediately changing this enemy's movement, there should be a delay of some number of frames (maybe 10 or 30) between when a player moved in a direction and the enemy takes the responding movement. Similarly, this enemy should fire using the same delay from when the player fires.
SUGGESTIONS: Consider a logical Queue of player movements that is updated every frame, and maintained at a constant "depth" by removing elements after an initial delay of your choice. When an enemy of this type appears, its movement would be determined by the first element in such a Queue at each frame.
(2 pt) Should randomly appear throughout the game with some small probability
(2 pt) Only ONE enemy of this type should ever be alive/active at any given time; but multiple could/should appear within a single longer game.
(10 pts) Show animated explosions on player and enemy deaths
SUGGESTIONS: Animating something is easiest to achieve by thinking of "frames" or pages of a flip-book, and when the frames are seen at rates fast enough (> 12-15 frames/sec), then the human eye begins to perceive smooth, animated motion. One way to do this is to create a collection of Images with some iteration ability (either by looping over indexes, with an iterator/next setup, or some linked structure, etc) and looping over the collection frame by frame. You could read in multiple separate image files that you create or find online and organize them into a collection that you use to produce animation. But perhaps a simpler way is to use a single image, called a sprite sheet, which contains many frames of an animation, side-by-side, all together. With an Image object from ScalaFX, you can display a portion of the larger sprite sheet by using the version of GraphicsContext's .drawImage() method that takes9 arguments(the first is the Image, the next 4 are the upper left corner x, y, then width and height of the subimage; the final 4 are the upper left corner x, y, and width, height of where to display the subimage within the canvas). An example of an explosion sprite sheet can be found here at multiple resolutions:128 pixelsper frame,64 pixelsper frame, or32 pixelsper frame. In all cases there are 8 frames across and 6 down in the sprite sheet. Of course, you are welcome to find/edit/create your own.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here