Implementation of Java Based Racing Game, Pirate Race, Using Runnable Interface

Main Article Content

K. Logiraj


Nowadays Java has become the most popular programming language that has been designed to develop desktop applications that run on Java virtual machine (JVM) regardless of computer architecture. Particularly, Java is useful for developing Game Applications. Implementing these applications is an effective educational way to encourage Java Learners. This paper aims to develop a desktop racing game to motivate freshmen who self-identity as creative or who wants to implement their own 2D racing games rather than a prescribed activity. It brings fun and simplicity of the game ‘Pirate Race’ with new features. This game was developed with the Runnable Interface by extending the JFrame and the movement of the objects in the frame was controlled by keyboard events. ‘Pirate Race’, is a simple game application that targets Java Learners to understand how usable classes and interfaces can be handled in a relatively short time. The application presents a graphical user interface with 2D graphical images having different file types (GIF, PNG, JPG) and with a background sound. The application allows the user to move the ship by pressing the (up, down, left, right) keys of the keyboard. The user’s goal is to compete with the other two pirate ships and finish the race with the first rank. When racing with opponents, the user must take correct moves to prevent the ship from crashing with ice mountain that resides in the sea. The game contains simple controls that can be easily caught by children. Therefore, it is suitable for players of the ages three and up. This will be a challenging and interesting game for children who likes to play computer games.

Java virtual machine, racing game, Jframe, game application, graphical user interface

Article Details

How to Cite
Logiraj, K. (2019). Implementation of Java Based Racing Game, Pirate Race, Using Runnable Interface. Asian Journal of Research in Computer Science, 4(3), 1-8.
Original Research Article


Doke ER, Hardgrave BC, Johnson RA, Doke ER, Hardgrave BC, Johnson RA. An introduction to object-oriented programming. COBOL programmers Swing with Java. 2011;21-40.

Clingman D, Kendall S, Mesdaghi S. Practical Java Game Programming; Charles River Media; 1 edition; 2004.

BA, PJ, Bhosale KA. Research paper on java interactional development environment programming tool. IARJSET. 2017;4(4):121–124.

Bjork S, Lundgren S, Holopainen J. Game design patterns, in: Lecture Note of the Game Design track of Game Developers Conference 2003, March 4–8, San Jose, CA, USA; 2003.

Fowler A, Fristoe T, MacLaurin M. Kodu game lab: A programming environment. The Computer Games Journal: Whitsun 2012, TuDo-cs Ltd. 2012;17-22.

McWhertor Michael. hydro thunder returns with all-new xbox live arcade sequel. Kotaku; 2010.
(Retrieved August 24, 2010)

Jain S. Developing Games (March 26, 2010). in Java for Beginners. Dev. Games Java Beginners. 2016;4(ii):693–696.

Dong Y, Ying. Design and evaluation of Java game programming environment: Major report, Concordia University; Last Modified; 2018.

Mads Hansen, Jacob Dinesen Gronhund. Java 2D Games, Roskilde University; 2012.

David Fox, Roman Verhovsek, Micro Java Game Development, Addison-Wesley Professional; 2002.