0% found this document useful (0 votes)
190 views11 pages

PPT-Module - I - Chapter 1 - Introduction To Game Programming

This document discusses the advantages of using Java for game programming. It addresses common criticisms of Java such as performance issues but notes that with techniques like hardware acceleration, Java can perform comparably to C++. It provides examples of popular Java games and lists several websites where free Java games can be found. Overall the document promotes Java as a viable option for game development.

Uploaded by

Neeraj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
190 views11 pages

PPT-Module - I - Chapter 1 - Introduction To Game Programming

This document discusses the advantages of using Java for game programming. It addresses common criticisms of Java such as performance issues but notes that with techniques like hardware acceleration, Java can perform comparably to C++. It provides examples of popular Java games and lists several websites where free Java games can be found. Overall the document promotes Java as a viable option for game development.

Uploaded by

Neeraj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 11

Program: IV B. Tech.

CSE
Course : Introduction to Game Programming
Module : I
Chapter : 1

Dr. P E S N Krishna Prasad


Associate Professor
Department of CSE
GITAM Institute of Technology (GIT)
Visakhapatnam – 530045
Email: kponneka@gitam.edu
Contents
1. Why Java for Games Programming?
2. Java Is Too Slow for Games Programming
3. Java Has Memory Leaks
4. Java is Too High-level
5. Java isn't Supported on Games Consoles so Why Bother?
6. No One Uses Java to Write Real Games
7. Freeware/Shareware Games

Department of CSE, GIT - ECS442 - Game Programming


Why Java for GamesProgramming?
Advantages of Java:
➢ Object Orientation (OOPs), High Level Programming
➢ Cross-Platform Support
➢ Code Reuse
➢ Ease of Development,
➢ Tool Availability
➢ Reliability and Stability
➢ Good Documentation
➢ Support from Sun Microsystems
➢ Low Development Costs,
➢ Ability to use the Legacy Code (e.g. C, C++)
➢ Increased Programmer Productivity.
Note: Java is roughly the same speed as C++.
Memory leaks can be avoided with good programming and techniques.
Java offers more direct access to graphics hardware and external devices.
Department of CSE, GIT - ECS442 - Game Programming
Java Is Too Slow for Games Programming
Java is slow compared to C and C++, the dominant languages for games programming
Swing is Slow:
✓Most games don’t require complex GUIs
✓Full-screen game play with mouse and keyboard controls is the norm.
✓GUI elements - such as menu bars, button, and text fields aren’t needed
✓Mouse and keyboard processing is dealt with by the AWT.

Note:
❖The latest versions of Java offer an efficient full-screen mode by suspending the normal
windowing environment.
❖Typically, a large part of the graphics rendering of a game is handled by hardware or software
outside of Java.
❖For example, Java 3D passes its rendering tasks down to OpenGL or DirectX, which may emulate
hardware capabilities such as bump mapping.
❖Often the performance bottleneck in network games is the network and not the Java language.
Department of CSE, GIT - ECS442 - Game Programming
Java Has Memory Leaks
❑C/C++ programmers refer to memory leaks in Java:
➢Its very difficult to understand how Java works
➢Java doesn’t offer pointer arithmetic
➢Typical C-style memory leaks, such as out-of-bounds array accesses, are caught by the
Java compiler
❑Another Memory Complaint is Garbage Collector:
✓Java garbage collector is executing at poorly timed intervals,
✓Causes the application to halt for seconds as the collector sweeps and cleans.
❑JVM comes with different garbage collectors:
✓collect in various ways and can be selected and fine-tuned from the command-line.
✓Information on the performance of the chosen collector can be gathered and
analyzed.

Department of CSE, GIT - ECS442 - Game Programming


Java is Too High-level
❑The complaint is the age-old one of abstraction versus speed and control.
✓Java’s use of classes, objects, and inheritance add too much overhead without
enough coding benefit.
✓Java’s machine independence means that low-level, fast operations,
e.g., direct Video RAM I/O are impossible.
❑ The major benefit of reusing and extending Java’s large class library, includes:
❖ high-speed I/O,
❖advanced 2D and 3D graphics
❖ many networking techniques
❖ from lowly sockets to distributed agents
❖Object-oriented design, which makes complex, large and real-time systems
❖ more manageable during development, implementation and maintenance

Department of CSE, GIT - ECS442 - Game Programming


Java is Too High-level
J2SE 1.4 introduced a full-screen exclusive mode (FSEM):
➢which suspends the normal windowing environment
➢allows an application to access the underlying graphics hardware more directly.
➢permits techniques: page flipping, and provides control over the screen’s
resolution and image depth.
Note:
❖The principal of FSEM is to speed up graphics-intensive applications, such as
games.
❖Java games requiring these types of devices can utilize the Java Native
Interface (JNI) to link to C or C++ and, therefore, to the hardware.
❖The gaming community used to think that C and C++ were too high-level for
fast, efficient games programming when compared to assembly language

Department of CSE, GIT - ECS442 - Game Programming


Java Application Installation Is a Nightmare
✓The naysayers claim that the user needs to be a Java expert to install and execute a
Java application.
✓The most game players want to point and click on a few dialog boxes to get a game up
and running.
❑Some of the key points:
❖ Java (JRE) has to be on the machine before the application will run.
❖ Code bloat since even small programs require a 15 MB JRE. Downloading can be slow.
❖ Frequently changing JVMs make it hard to write code that will work for every possible
version of Java.
❖ Nonstandard components are often required—e.g., Java 3D, causing even more installation
problems.
❖It’s impossible to compile the application for a specific platform.
❖The .jar extension is commonly hijacked by other software (by compression programs) at
execution time.
❖The JRE is slower to start up compared to a native compiled application.
Department of CSE, GIT - ECS442 - Game Programming
Java isn't Supported on Games Consoles.
❑Video Gaming is a Multi billion-dollor industry that placing huge revenue in the current
market.
❑ The majority coming from three consoles: Sony Playstation (PS2), Microsoft’s Xbox, and
Nintendo’s GameCube. Sony is the Dominant console maker.
❑ Java isn’t available in the gaming consoles like Sony and Windows in early 2004
The Phantom console from Infinium Labs was announced at JavaOne in 2004, It’s essentially
a PC running an embedded Windows XP installation, with an nVidia graphics card, a hard
drive, and a broadband connection

➢Java gaming, the Phantom will come with a complete JRE. It was demoed during
Electronic Entertainment Exposition (E3) in 2004, show running Law and Order: Dead on
the Money (which uses Java 3D).
➢Die-hard programmers may point out that it’s possible to get Java running on a PS2 with
the support of open source tool Kaffe, non-Sun JVM, on top of PlayStation Linux.
➢ RenderWare and Gamebyro have the track record of best selling games and can port
games across the consoles such as PS2, Xbox, GameCube and PCs.
Department of CSE, GIT - ECS442 - Game Programming
No One Uses Java to Write Real Games
✓Puzzle Pirates by Three Rings (http://www.puzzlepirates.com/)
✓Chrome by Techland (http://www.chromethegame.com/en/show.php)
✓Law and Order II by Legacy Interactive. (http://www.lawandordergame.com/index2.htm)
✓Kingdom of Wars by Abandoned Castle Studios (http://www.abandonedcastle.com/)
✓Alien Flux by Puppy Games (http://www.puppygames.net/info.php?game=Alien_Flux)
✓War! Age of Imperialism by Eagle Games(http://www.eaglegames.net/products/WAR_AOI/wai.shtml)
✓Runescape by Jagex (http://www.runescape.com)
✓Star Wars Galaxies by LucasArts (http://www.lucasarts.com/products/galaxies/)
✓IL-2 Sturmovik by Ubi-Soft (http://www.il2sturmovik.com/)
✓Pernica by Starfire Research (http://www.starfireresearch.com/pernica/pernica.html)
✓Cosm by Navtools, Inc. (http://www.cosm-game.com/)
✓C&C Attack Copter by Electronic Arts (http://www.eagames.com/free/home.jsp)
✓Roboforge by Liquid Edge Games (http://www.roboforge.com)
✓Galactic Village by Galactic Village Games (http://www.galactic-village.com
✓Wurm Online by Mojang Specifications (http://www.wurmonline.com/)
✓Jellyvision (http://www.jellyvision.com/)
✓Vampire the Masquerade: Redemption (2000) by Nihilistic software (http://www.nihilistic.com/)
✓Tom Clancy’s Politika (1997) by Red Storm Entertainment (http://www.redstorm.com/)
Note: The main source for java games link: http://www.java.com/en/games/
Department of CSE, GIT - ECS442 - Game Programming
Freeware/Shareware Games
➢The recent version of java speed has improved and APIs crucial to gaming—such as
graphics and audio—are of a high quality. Numerous websites uses Java Games:
➢Java Games Factory (JGF) (http://grexengine.com/sections/externalgames/)
➢ArcadePod.com (http://www.arcadepod.com/java/)
➢Java 4 Fun (http://www.java4fun.com/java.html)
➢jars.com (http://www.jars.com)
➢Java Shareware (http://www.javashareware.com/)
➢Java Games Central (http://www.mnsi.net/~rkerr/)
❑Some freeware/shareware games are:
➢Super Elvis; also known as Hallucinogenesis
➢http://www.puppygames.net/downloads/hallucinogenesis/hallucinogenesis.jnlp)
➢FlyingGuns (http://www.flyingguns.com/)
➢Cosmic Trip (http://www.mycgiserver.com/~movegaga/cosmictrip.html)
➢Squareheads (http://home.halden.net/tombr/squareheads/squareheads.html)
➢Escape (http://javaisdoomed.sourceforge.net/)
➢CazaPool3D (http://membres.lycos.fr/franckcalzada/Billard3D/Pool.html)
➢SourceForge (http://sourceforge.net/search/)
➢FreshMeat.com (http://freshmeat.net/)
➢Code Beach (http://www.codebeach.com)
➢Programmers Heaven (http://www.programmersheaven.com/zone13/)
➢The “Your Games Here” Java Games Forum (http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=Announcements)

Department of CSE, GIT - ECS442 - Game Programming

You might also like