Posts

Showing posts with the label game
Image
Space Intruders Game In Java Game Source code and the file is given below :  NOTE: Better to open the file in Netbeans  IDE. Download the file from HERE Comment below for any queries or suggestion  Thanks

Brick Breaker Game in JAVA

Image
Brick Breaker Game in JAVA How to make a BrickBreaker game? 1. Create a new project and name it BrickBreaker and paste the source code which is given below. import javax.swing.JFrame; public class BrickBreaker { public static void main(String[] args) { JFrame obj = new JFrame(); Gameplay gameplay = new Gameplay(); obj.setBounds(10,10,700,600); obj.setTitle("BrickBreaker"); obj.setResizable(false); obj.setVisible(true); obj.setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE ); obj.add(gameplay); } } 2. Creat new class two new class and name it "Gameplay" & "MapGentrator" as shown below After creating these class paste source code which is given below respectively. For Gameplay class. import javax.swing.JPanel; import javax.swing.Timer; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.Graphics; import java.awt.Color...