Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

programming java

sana
sana  


HI,i have an programming assignment which i need help with have attached the specification. thank you Attachments Tags
Clarifications

Answers

Space-invaders game

felo
felo 



Find attached running program.

To play the game : press Enter to start the game

: use space bar to shoot
: navigation keys for direction
Attachments
Invaders.zip (209 K) Download












Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview
//frames[0] = sprite; frames[0] = SpriteStore.get().getSprite("sprites/alien.gif"); frames[1] = SpriteStore.get().getSprite("sprites/alien2.gif"); sprite = frames[0]; super.setSprite(sprite); this.game = game; this.type = type; dx = -moveSpeed; } } public AlienEntity(Game game, int x, int y, int type, int moveSpeed){ super("sprites/alien.gif",x,y); frames[0] = sprite; frames[1] = SpriteStore.get().getSprite("sprites/alien2.gif"); this.game = game; this.type =

Preview
void draw(Graphics g){ sprite.draw(g, (int) x, (int) y) ; //System.out.println("y"); } public void setHMovement(double dx){ this.dx = dx; } public void setVMovement(double dy){ this.dy = dy; } public int getX(){ return (int)x; } public int getY(){ return (int) y; } public void setY(int y){ this.y = y; } public boolean

Preview
private Sprite menu; private int highscore = 0; private int score = 0; private int level = 1; private int gamemode = 1; private BufferStrategy strategy; private boolean gamerunning = true; private ArrayList<Entity> entities = new ArrayList<Entity>(); private ArrayList<Entity> removeList = new ArrayList<Entity>(); private Entity ship; private int alienCount; private

Preview

Preview

Preview

Preview
private Game game; public ShipEntity(Game game, String ref, int x, int y){ super(ref, x, y); this.game =game;

Preview
Game game; private double moveSpeed = -270; private boolean used = false; private int otherType; public ShotEntity(Game game, String ref, int x,

Preview
} public void draw(Graphics g, int x, int y){ g.drawImage(image, x, y, null);

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview

Preview
{ fail("Failed to load: "+ref); } // create an accelerated image of the right size to store our sprite in GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration(); Image image = gc.createCompatibleImage(sourceImage.getWidth(),sourceImage.getHeight(),Transparency.BITMASK); image.getGraphics().drawImage(sourceImage,0,0,null); //image= sourceImage; Sprite sprite = new Sprite(image); sprites.put(ref, sprite); retu

spaceinvadersshooting.png (110 K) Download Preview

spaceinvaders1.png (108 K) Download Preview

Screenshots
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Screenshot
Purchase Answer

Mr.

felo
felo 



1 Attachments
Screenshots
Purchase Answer