Java is an object-oriented language, developed by sun Microsystems. Java programs are used as the most extensively and fast growing programming language for web development. This language programme consists of three basic components, Java programming language, Java platform and Java virtual machine. Java relates to both C and ++. It uses the syntax of C and the object oriented concepts form C++ and this makes Java appealing. When the Java source code is given as the input, the output from the java compiler is the byte code. This complied Java source code is then executed by a Java interpreter.
There are various Java projects, offered by Java, so you can use the java web development project according to your needs and requirements and can save a great amount of time and money with these Java projects. Java programs are well designed to develop effective web based applications and moreover offer many other advantages as well such as portability, security, efficiency and dynamicity.
Programming the Game
It is object oriented programming based game because it is built using JAVA programming language. A new way of programming is aspect Oriented Programming in which the programmer has to identify the important aspects of the given problem and then code them with the help of any object oriented which is explicitly done while programming the game due the Greenfoor framework. Greenfoot framework has two main classes:
(1) World class and (2) Actor class
(1) World Class
A world class in responsible to handle and display the activities being done on the canvas of the game or screen visible to user for playing game.
Programmer has make a sub-class which will be inheriting from this class i.e. World class.
Call the constructor of the World class
super(WIDTH, HEIGHT, RESOLUTION);
Screen width, height and resolution are set here.
(2) Actor Class
This class provides the basic functionality of the actor which will play a role in the world e.g. car, obstacles, explosion and scoreboard etc.
All actor classes will inherit from this Actor class
Classes Structure
The game has 8 JAVA classes. Two are main classes discussed above which are provided by the framework and rest of 6 JAVA classes are written by me.
ArrowKeyGameWorld class
It is inherited from World class and responsible for canvas having the obstacles at random locations above half of the screen and a Green Car. Green car is controlled by the user.
Car Class
This class is responsible to make a car visible and controllable by the user. This class has only one method act() which makes the movement of the car.
ScoreBoard Class
This is inherited from the Actor class and displays the score board when the car collides with the obstacle.
Obstacle class
This class makes the obstacles i.e. red boxes. It is also responsible for the collection detection and explosion.
Counter class
It counts the score and displays on the left top corner of the screen.
Explosion class
It is used for the explosion animation. If an obstacle collides with the car an explosion animation is displayed by gradually increasing and decreasing the size of a PNG image. If another obstacle comes in the range of the explosion then that obstacle is also converted to an explosion.
Conclusion
It was a great learning experience for me while developing the game. The game is portable to any operating system (OS) having JAVA run-time installed.
Online Ad Agency is highly scalable Java based online advertising technology components. The technology platform has two key components: Ad server and Ad Network. They enable online publishers and advertisers to connect in real time.
It puts interactive ads on relevant websites and in front of web surfers The network helps web publishers sell ads on their sites and advertisers find the right sites for their ads, offering targeted ad placement on a site-specific, channel-wide, or run-of network basis.