Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse

Games Programming with Java and Java 3D (0)

1 Hindamata
Punktid

Lõik failist

Games Programming with Java and Java 3D
Andrew Davison
Dept . of Computer Engineering
Prince of Songkla University
HatYai, Songkhla 90112
E-mail: [email protected]
Draft : 14th January 2003, #2
Abstract
This article looks at the advantages and disadvantages of using Java and Java 3D for
games programming. It assumes the reader is familiar with Java, but presents short
overviews of gaming, the low-level APIs OpenGL and DirectX, and Java 3D. No
programming examples are included here, although links to online code are supplied.
1.  Background to Gaming
Giving a definition for ‘computer game ’ is problematic, due to the wide range of
game types. For example, the ArcadePod site ( http://www.arcadePod.co m) divides its
hundreds of Java games into more than ten categories: 3D games, multiplayer, action,
classic , indoor sports , board, outdoor sports, card, mind, casino , educational, and the
useful ‘miscellaneous’ catch -all. This  makes it difficult to pin down the typical
content of a game, and highlights the range of design and programming skills required
to create one.
Another problem with giving a definition is that game platforms vary enormously,
including PCs, dedicated game consoles (e.g. the Sony PlayStation 2), arcade
machines, web- based games, hand -held consoles (e.g. the Nintendo Gameboy),
interactive TV, set-top boxes (as supplied by some cable networks ), cellular phones ,
and PDAs.
1.1. Revenue
PCs and game consoles account for almost all the income  from games – about 1/3
from PCs (dominated by Windows ), and most of the rest from three games consoles
(Sony’s PlayStation 2, Microsoft ’s Xbox, and Nintendo’s GameCube) [Veronis
Suhler Media 2000].
In October 2002, consulting firm  Strategy Analytics
( http://www.strategyAnalytics.co m) predicted game console shipments to top 41.9
million units in 2002, an increase of 84% over the 2001 level. The PlayStation 2 is
expected to account for 63% of sales , followed by the GameCube with 21% and the
Xbox with 16%. These numbers highlight the domination of the PlayStation 2 which
has accounted for 72% of global cumulative shipments, compared to 16% for the
GameCube and 12% for the Xbox.
NPDFunworld ( http://www.npdfunworld.com/ ) reported that console game sales in
2002 rose by about 20% over the record  US$9.4 billion in 2001. Individual game
sales are also increasing:  Grand Theft Auto: Vice City from Take Two Interactive sold
1
Games Programming with Java and Java 3D
an estimated 3 million copies in its first month of  release . This game is likely to
become the best selling title of 2002, and of all time.
1.2. Console Hardware
Since consoles are so central to gaming, it is  interesting to consider their capabilities.
The PlayStation 2 processor runs with a  clock speed of 294 MHz, has 32Mb of RAM,
and a separate graphics chip that can  render about 66 million polygons per second.
The small amount of RAM is an important constraint upon games wishing to use
Java.
The introduction of the Xbox changed the game rules (so to  speak ), with its Pentium
III, 64Mb RAM, a 8Gb hard disk , and the ability to render 150-200 million polygons
per second.
Sony and Microsoft have recently released   network adapters for their consoles,
highlighting the growing importance of multiplayer games.
Future console designs (e.g. the PlayStation 3 and Xbox 2) will bring PCs and
consoles even closer, and further emphasize online gaming. The PlayStation 3 (slated
to appear at the end of 2004) may use a 3GHz processor, 512Mb RAM, a 120Gb hard
disk, and render 2 billion polygons per second. The Xbox 2 (due at the end of 2006)
may employ a Pentium 4, a clock speed of 1GHz, 1Gb RAM, a 160Gb hard disk, and
render 2-3 billion polygons per second.
1.3. High and Low  Profile Games
Marner distinguishes between high profile and low profile games [Marner 2002].
A high profile game is endowed with massive development costs ( perhaps US$5
million or more), a generous advertising budget, a large development staff , and a very
visible presence for game retailers and magazines. To recoup the enormous upfront
expenses , high profile games tend to utilise cutting- edge graphics (which require high
hardware performance ), and tie-ins with  other media such as movies or books .
A low profile game is aimed at a smaller market , and may be limited to a single
platform , or user community. It may have been developed by a single person (or small
group), and be advertised in specialized newsgroups and mailing lists , leading to a
substantial reduction in costs. Low profile games may have less ‘polish’, use less
state-of the-art graphics, and place more emphasis on game design and
characterization.
2.  Java for Games
In this section , we identify reasons for using Java for games programming, and look at
some of the popular arguments against it.
We focus on the Java language and its standard libraries (i.e. those found in J2SE
1.4); Java 3D will be considered in later sections.
2.1. Why use Java for Games?
2
Games Programming with Java and Java 3D
The advantages of programming with Java are well known: object orientation, cross -
platform  support , code reuse, ease of development, the availability of tools , reliability
and stability, good documentation, continuing support from Sun Microsystems, low
development costs, the ability to use legacy code (e.g. C, C++), and increased
programmer productivity.
The portability of Java is sometimes overstated – games in particular often require
some ‘tweaking’ to improve their performance on different OSes/machines, such as in
the scheduling of threads, data structure and/or algorithm design, or the choice of GUI
components . Also, if legacy code written in a different language is utilised then
portability is frequently compromised.
Productivity is an important advantage , although hard to quantify. An old study from
1998 suggested that software written in pure Java instead of C++ results in a 25%
overall time/ cost saving , corresponding to an overall productivity increase of 30%
(the increase for the code phase alone  is 65%) [Quinn and Christiansen 1998]. It is
likely that these figures are greater today since the capabilities of the J2SE have
improved (e.g. the libraries are larger, tool speed is better).
2.2. Ways of Using Java in Games
There are several approaches to writing games with Java:
•  Applets. Usually the applet is a client  for a multiplayer game, and communicates
back to its home host where the game server is located . A drawback of applets is
their security features , which need to be adjusted by the user before an applet can
save files or communicate with different hosts.
•  Pure Java applications. The meaning of ‘pure’ is somewhat vague since
seemingly pure libraries, such as Java 3D, utilise code outside of Java, hidden
from the programmer.
•   Dirty Java applications. Dirty Java programs use a mix of Java and other
languages ( typically C or C++) by employing JNI, network links, or the Java
Communications API [Kreimeier 1999]. This opens up Java to code which may be
better optimized for the underlying hardware/OS, but affects portability.
•  Java as a scripting engine . This is a variant of the dirty Java idea , where the
majority of the application is implemented in another language. For example, C++
may be used to write the graphics rendering engine, image loaders, and the user
interface for joysticks. Java is utilised for tasks that are hardware independent
and/or less performance-oriented, such as user input validation and the game
logic .
2.3. Misconceptions
There are several misconceptions about Java and gaming:
•  No one writes serious games in Java. This rests on the definition of ‘serious’,
which normally means commercial, high profile games. Of course, there are
thousands of low profile, freeware /shareware Java games out on the Web.
•  Java is too big/ slow for games programming, especially when compared to C or
Vasakule Paremale
Games Programming with Java and Java 3D #1 Games Programming with Java and Java 3D #2 Games Programming with Java and Java 3D #3 Games Programming with Java and Java 3D #4 Games Programming with Java and Java 3D #5 Games Programming with Java and Java 3D #6 Games Programming with Java and Java 3D #7 Games Programming with Java and Java 3D #8 Games Programming with Java and Java 3D #9 Games Programming with Java and Java 3D #10 Games Programming with Java and Java 3D #11 Games Programming with Java and Java 3D #12 Games Programming with Java and Java 3D #13 Games Programming with Java and Java 3D #14 Games Programming with Java and Java 3D #15 Games Programming with Java and Java 3D #16 Games Programming with Java and Java 3D #17 Games Programming with Java and Java 3D #18 Games Programming with Java and Java 3D #19 Games Programming with Java and Java 3D #20 Games Programming with Java and Java 3D #21 Games Programming with Java and Java 3D #22 Games Programming with Java and Java 3D #23
Punktid 50 punkti Autor soovib selle materjali allalaadimise eest saada 50 punkti.
Leheküljed ~ 23 lehte Lehekülgede arv dokumendis
Aeg2014-09-01 Kuupäev, millal dokument üles laeti
Allalaadimisi 22 laadimist Kokku alla laetud
Kommentaarid 0 arvamust Teiste kasutajate poolt lisatud kommentaarid
Autor DTriin Õppematerjali autor
Inglisekeelne materjal Java-s programmeerimiseks mängude arendamisel.

Kasutatud allikad

Sarnased õppematerjalid

thumbnail
140
pdf

Thesis Kivimaa August 2022

The research question for this research project is – “How is it possible to calculate IT security effectiveness?”. The aim of this research is to use this reference model to calculate and to optimize major university’s and a small CSP-s (Cloud Service Provider) security posture and their spending’s on security measures. Aim is to develop a reference model to support IT Security team and business side to make reasoned and optimal decisions about IT security and all that with a reasonable number of manhours. In this Graded Security Expert System (GSES) aka Graded Security Reference Model (GSRM) the quantitative metrics of the graded security approach are used to express the relations between security goals, security confidence and security costs. What makes this model unique, is the option to use previous customers security templates/models – cutting the implementation time from 500+ manhours to as low as 50 manhours. The first

Infotehnoloogia
thumbnail
29
docx

Sissejuhatus infotehnoloogiasse

1 nädal. Sissejuhatus: arvuti ja info, ajaloo algus ... 1940 Meanings: Bit - the smallest unit of storage ( 1 binary digit) Byte - collection of 8 bits / is a unit of storage, 8 binary digits long Kilobyte - A unit of storage capacity (1024 bytes ) Megabyte - 1,048,576 bytes Gigabyte - 1,073,741,824 bytes Terabyte - 1 trillion bytes Algorithm - is a step by step method of solving a problem Program - is the expression of an algorithm in a programming language. ALGORITM - kindel eeskirjade jada, mis määrab üheselt ülesande lahenduskäigu. PROGRAMM - programmeerimiskeeles kirja pandud algoritm Greek logicians ( Kreeka loogikud ): Parmenides (5 sajand e.m.a.) : kasutas pikki loogilisi põhjendusi. Zenon Eleast (5 sajand e.m.a.) - apooriad/paradoksid Sofistid - Sokrates (470-399 e.m.a) - Platon (428/427 - 348/347 e.m.a): Aristoteles : väidete struktuur kui iseseisev uurimisobjekt Aristoteles Süllogismide näited: 1

Sissejuhatus infotehnoloogiasse
thumbnail
44
doc

IT arhitektuur

component specifications, and key architectural mechanisms are detailed. The Logical Architecture provides a detailed "blueprint" from which component developers and component users can work in relative independence. Logical Architecture. Model System Behavior Execution Architecture An Execution Architecture is created for distributed or concurrent systems. The process view shows the mapping of components onto the processes of the physical system, with attention being focused on such concerns as throughput and scalability. The deployment view shows the mapping of (physical) components in the executing system onto the nodes of the physical system. Architecture views 2. Business Architecture A formalized model of what the business looks like, in terms of IT. Information Architecture Logical description of the translated Business Architecture in IT terms. The IA is on high level in terms of functionality and data management.

It arhitektuur
thumbnail
21
docx

SISSEJUHATUS ITSSE

1950 Engineering Research Associates of Minneapolis built the ERA 1101, the first commercially produced computer; the company's first customer was the U.S. Navy. 1951 The UNIVAC I delivered to the U.S. Census Bureau was the first commercial computer to attract widespread public attention. Although manufactured by Remington Rand, the machine often was mistakenly referred to as the "IBM UNIVAC." Remington Rand eventually sold 46 machines at more than $1 million each. The first AI program to run in the U.S. was also a checkers program, written in 1952 by Arthur Samuel of IBM for the IBM 701. 1952 Heinz Nixdorf founded Nixdorf Computer Corp. in Germany. It remained an independent corporation until merging with Siemens in 1990. 1953 IBM shipped its first electronic computer, the 701 Speedcoding: John Backus. 1954 Texas Instruments announces the start of commercial production on silicon transistors.

Sissejuhatus infotehnoloogiasse
thumbnail
138
docx

Sissejuhatus infotehnoloogiasse konspekt

 EBCDIC (Extended Binary Coded Decimal Interchange Code)  UNICODE (Extended ASCII) Each pixel contains a value representing some shade of gray. The more shades of gray possible, the more memory will be needed.  Instructions:  Must be stored within the computer before use.  Must be stored in binary form.  A set of binary instructions is called a program. Program:  A collection of instructions for the computer to perform one by one.  Machine Language:  The language of the computing machine.  All instructions must be in the form of binary numbers (binary code).  Stored-program Computer:  Also known as the von Neumann-type computer.  Has memory - a place to keep both:  instructions (ie program)  and the needed information (ie data)

Sissejuhatus infotehnoloogiasse
thumbnail
2
doc

Exami spikker

järeldus: mõni z on y. his system of keyboard, keypad, mouse, and windows at the Joint Computer Iga b on a Conference in San Francisco's Civic Center. He demonstrates use of a word Mitte ükski b pole a processor, a hypertext system, and remote collaborative work with Mõni b on a colleagues. Mõni b ei ole a 1969 - AT&T Bell Laboratories programmers Kenneth Thompson and Dennis süllogism on väitlus, kus mingitest etteantud väidetest (eeldustest) järeldub Ritchie developed the UNIX operating system on a spare DEC minicomputer.

Sissejuhatus infotehnoloogiasse
thumbnail
7
doc

Lõuna Aafrika rahvusköök

Cuisine of South Africa has had a variety of sources and stages: · Cookery practised by indigenous people of South Africa such as the Khoisan and Xhosa- and Sotho-speaking people · Settler cookery introduced during the colonial period by people of Indian and Afrikaner and British descent and their slaves and servants - this includes the cuisine of the Cape Malay people, which has many characteristics of Malaysia and Java, and recipes from neighbouring colonial cultures such as Portuguese Mozambique. Indigenous cookery traditional South African cuisine In the precolonial period, indigenous cuisine was characterized by the use of a very wide range of fruits, nuts, bulbs, leaves and other products gathered from wild plants and by the hunting of wild game. The domestication of cattle in the region about two thousand years ago by Khoisan groups enabled the use of milk products and the

Kokandus
thumbnail
40
doc

Veebiteenused (kordamisküsimused ja vastused kontrolltööks)

saad sa kergesti – laiendatava, – taaskasutatava ja asendatava lahenduse  SOA annab meile raamistiku, kus mitmed mittefunktsionaalsed nõuded on juba täidetud. – Näiteks turvalisus – Arendajad keskenduda äriprobleemidele. VEEBITEENUS o A Web service is a service offered by an electronic device to another electronic device, communicating with each other via the World wide web. In a web service, web technology such as the HTTP, originally designed for human-to-machine communication, is utilized for machine-to-machine communication, more specifically for transferring machine readable file formats such as XML and JSON. In practice, the web service typically provides an object- oriented web based interface to a database server, utilized for example by another web

Programmeerimine




Meedia

Kommentaarid (0)

Kommentaarid sellele materjalile puuduvad. Ole esimene ja kommenteeri



Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun