Difference between revisions of "Java"
m (→Background) |
|||
(28 intermediate revisions by 13 users not shown) | |||
Line 1: | Line 1: | ||
== Background == | == Background == | ||
Java is a reflective, object-oriented programming language initially developed by James Gosling and colleagues at Sun Microsystems in 1991, as part of the Green Project. It was initially called Oak, and was intended to replace [[Cpp|C++]], although its feature set resembles more that of [[Objective-C]]. | Java is a reflective, object-oriented programming language initially developed by James Gosling and colleagues at Sun Microsystems in 1991, as part of the Green Project. It was initially called Oak, and was intended to replace [[Cpp|C++]], although its feature set resembles more that of [[Objective-C]]. Sun Microsystems is currently owned by the Oracle Corporation, which maintains and regularly updates the Java platform. | ||
Java should not be confused with [[Javascript]], a | Java should not be confused with [[Javascript]], a scripting language with which it shares only the name and a similar [[C]]-like syntax. The Java Runtime Environment (JRE) does contain a JavaScript interpreter, however, based on Mozilla Rhino. | ||
Specifications of the Java language, the JVM (Java Virtual Machine) and the Java API are community-maintained through the Sun-managed Java Community Process. | Specifications of the Java language, the JVM (Java Virtual Machine) and the Java API are community-maintained through the Sun-managed Java Community Process. | ||
Line 8: | Line 8: | ||
After first being made public in 1994, it achieved prominence following the announcement at 1995's SunWorld that Netscape would be including support for it in their next version of the Navigator browser. | After first being made public in 1994, it achieved prominence following the announcement at 1995's SunWorld that Netscape would be including support for it in their next version of the Navigator browser. | ||
== Language | == Language Characteristics == | ||
*Object orientation | *Object orientation | ||
*Platform independence | *Platform independence | ||
*Automatic garbage collection | *Automatic garbage collection | ||
== Roguelike | See [[The Choice of Java]], which contains a more detailed evaluation of the language. | ||
== Roguelike Development == | |||
'''Pros''' | |||
Java has excellent features for roguelike development: | Java has excellent features for roguelike development: | ||
* Object | * Object Oriented | ||
* Platform | * Platform Independent | ||
* Ability to run on a web page as an | * Garbage Collected (i.e. no need to manage memory by hand) | ||
* Ability to run on a web page as an applet. | |||
* Generally easier to learn and use than other high-level languages like C and C++. | * Generally easier to learn and use than other high-level languages like C and C++. | ||
* Serialization to files makes easier to implement and | * Serialization to files makes it easier to implement and maintain game save and load. | ||
* For developers of tiled roguelikes the AWT and Swing libraries provide an excellent alternative to the 3rd party (or native platform) graphics libraries used in C and C++. | * For developers of tiled roguelikes, the AWT and Swing libraries provide an excellent alternative to the 3rd party (or native platform) graphics libraries used in C and C++ since the developer can ensure that these libraries will be present in every Java implementation. | ||
'''Cons''' | |||
However, it still has some disadvantages: | However, it still has some disadvantages: | ||
* No native console support. Developers of [[ASCII]] roguelikes must decide whether to | * No native console support. Developers of [[ASCII]] roguelikes must decide whether to | ||
** Use | ** Use the JNI for traditional curses implmentation ([[Java Curses Implementation]]) | ||
** Develop a new library (e.g. wrapping the [[Curses]] C library and native methods) | *** Existing libraries([https://sourceforge.net/projects/javacurses/ JCurses], [http://www.pitman.co.za/projects/charva/index.html Charva] or [[libjcsi]]) | ||
** Emulate console output in | *** Develop a new library (e.g. wrapping the [[Curses]] C library and native methods) | ||
* Longer program startup time. Java has no issues with speed once running [http://www.idiom.com/~zilla/Computer/javaCbenchmark.html], especially for RL games. | ** Emulate console output in platform independent AWT or Swing components (see [[Blacken]], [[SquidLib]], and [[Zircon]]). | ||
* | * Longer initial program startup time. Java has no issues with speed once running [http://www.idiom.com/~zilla/Computer/javaCbenchmark.html], especially for RL games. | ||
* Dependency on a Java Runtime Environment (JRE) | |||
** Ahead Of Time (AOT) compiling to a specific OS is possible, e.g. using the [http://gcc.gnu.org/java/ GNU Compiler for Java] (GCJ). A Windows implementation is available with MinGW [http://www.thisiscool.com/gcc_mingw.htm]. | |||
== Java Roguelikes == | == Java Roguelikes == | ||
The features of Java have led | The features of Java have led many roguelikes to adopt this language: | ||
<!-- EDITORS: If you know of the status of any of these, feel free to add them --> | |||
{|class="wikitable sortable" | |||
!Status||Name | |||
|- | |||
|{{7DRL}} || [[Attack The Geth]] | |||
|- | |||
| {{alpha}} ||[[Beggar]] | |||
|- | |||
| {{7DRL}} ||[[CastlevaniaRL]] | |||
|- | |||
| {{stable}} ||[[Caverns of Underkeep]] | |||
|- | |||
| ||[[Crossfire]] | |||
|- | |||
| ||[[CryptRL]] | |||
|- | |||
| ||[[Dimension Dungeon]] | |||
|- | |||
| ||[[Dweller]] (using Java Micro Edition, J2ME) | |||
|- | |||
| ||[[Earl Spork]] (using [[Libjcsi]]) | |||
|- | |||
| ||[[EmoSquid]] | |||
|- | |||
| ||[[Excitable Digger]] (using [[Libjcsi]]) | |||
|- | |||
| ||[[Expedition]] | |||
|- | |||
| ||[[Fortress of the Goblin King]] | |||
|- | |||
| ||[[Fruits of the Forest]] | |||
|- | |||
| ||[[Guardian Angel]] | |||
|- | |||
| ||[[HexRogue]] | |||
|- | |||
| ||[[Hokuto no Rogue]] | |||
|- | |||
| ||[[JADE]] | |||
|- | |||
| {{stable}} ||[[Javelin]] | |||
|- | |||
| ||[[Kalyp]] | |||
|- | |||
| ||[[Kamyran's Eye]] (for mobile phones) | |||
|- | |||
| ||[[Legerdemain]] | |||
|- | |||
| ||[[MegamanRL]] | |||
|- | |||
| ||[[MetroidRL]] | |||
|- | |||
| ||[[MIDP RL]] | |||
|- | |||
| ||[[Mt. Drash: the Roguelike]] | |||
|- | |||
| ||[[Neon]] | |||
|- | |||
| ||[[Netwhack]] | |||
|- | |||
| {{stable}} ||[[Pixel Dungeon]] (for Android) | |||
|- | |||
| ||[[Plutonium roguelike]] | |||
|- | |||
| ||[[Quarker]] | |||
|- | |||
| {{stable}} ||[[QuickHack]] | |||
|- | |||
| ||[[Roguelike Runner]] | |||
|- | |||
| ||[[Sigmore Mines]] | |||
|- | |||
| ||[[Sigmore Mines 2]] | |||
|- | |||
| ||[[Tower]] | |||
|- | |||
| ||[[Tower of Druaga RL]] | |||
|- | |||
| ||[[Tyrant]] | |||
|- | |||
| ||[[Valley of Ge-Hinnom]] | |||
|- | |||
| ||[[Wayfarer]] (Written in [http://www.processing.org Processing]) | |||
|- | |||
| ||[[ZeldaRL]] | |||
|- | |||
| {{defunct}} <!--404--> ||[http://will.thimbleby.net/roguelike/ a small freeware roguelike applet created by Will Thimbleby] | |||
|} | |||
== Related links == | == Related links == | ||
* [[The Choice of Java]] | |||
* [http://en.wikipedia.org/wiki/Java_programming_language "Java programming language" (Wikipedia article)] | * [http://en.wikipedia.org/wiki/Java_programming_language "Java programming language" (Wikipedia article)] | ||
* [http://gpwiki.org/index.php/Java:Development_Environments List of Java Development | * [http://gpwiki.org/index.php/Java:Development_Environments List of Java Development Environments] on the [http://gpwiki.org/ Game Programming Wiki] | ||
[[Category:Programming languages]] | [[Category:Programming languages]] |
Latest revision as of 18:12, 12 April 2018
Background
Java is a reflective, object-oriented programming language initially developed by James Gosling and colleagues at Sun Microsystems in 1991, as part of the Green Project. It was initially called Oak, and was intended to replace C++, although its feature set resembles more that of Objective-C. Sun Microsystems is currently owned by the Oracle Corporation, which maintains and regularly updates the Java platform.
Java should not be confused with Javascript, a scripting language with which it shares only the name and a similar C-like syntax. The Java Runtime Environment (JRE) does contain a JavaScript interpreter, however, based on Mozilla Rhino.
Specifications of the Java language, the JVM (Java Virtual Machine) and the Java API are community-maintained through the Sun-managed Java Community Process.
After first being made public in 1994, it achieved prominence following the announcement at 1995's SunWorld that Netscape would be including support for it in their next version of the Navigator browser.
Language Characteristics
- Object orientation
- Platform independence
- Automatic garbage collection
See The Choice of Java, which contains a more detailed evaluation of the language.
Roguelike Development
Pros Java has excellent features for roguelike development:
- Object Oriented
- Platform Independent
- Garbage Collected (i.e. no need to manage memory by hand)
- Ability to run on a web page as an applet.
- Generally easier to learn and use than other high-level languages like C and C++.
- Serialization to files makes it easier to implement and maintain game save and load.
- For developers of tiled roguelikes, the AWT and Swing libraries provide an excellent alternative to the 3rd party (or native platform) graphics libraries used in C and C++ since the developer can ensure that these libraries will be present in every Java implementation.
Cons However, it still has some disadvantages:
- No native console support. Developers of ASCII roguelikes must decide whether to
- Use the JNI for traditional curses implmentation (Java Curses Implementation)
- Emulate console output in platform independent AWT or Swing components (see Blacken, SquidLib, and Zircon).
- Longer initial program startup time. Java has no issues with speed once running [1], especially for RL games.
- Dependency on a Java Runtime Environment (JRE)
- Ahead Of Time (AOT) compiling to a specific OS is possible, e.g. using the GNU Compiler for Java (GCJ). A Windows implementation is available with MinGW [2].
Java Roguelikes
The features of Java have led many roguelikes to adopt this language:
Status | Name |
---|---|
7DRL | Attack The Geth |
αlpha | Beggar |
7DRL | CastlevaniaRL |
stable | Caverns of Underkeep |
Crossfire | |
CryptRL | |
Dimension Dungeon | |
Dweller (using Java Micro Edition, J2ME) | |
Earl Spork (using Libjcsi) | |
EmoSquid | |
Excitable Digger (using Libjcsi) | |
Expedition | |
Fortress of the Goblin King | |
Fruits of the Forest | |
Guardian Angel | |
HexRogue | |
Hokuto no Rogue | |
JADE | |
stable | Javelin |
Kalyp | |
Kamyran's Eye (for mobile phones) | |
Legerdemain | |
MegamanRL | |
MetroidRL | |
MIDP RL | |
Mt. Drash: the Roguelike | |
Neon | |
Netwhack | |
stable | Pixel Dungeon (for Android) |
Plutonium roguelike | |
Quarker | |
stable | QuickHack |
Roguelike Runner | |
Sigmore Mines | |
Sigmore Mines 2 | |
Tower | |
Tower of Druaga RL | |
Tyrant | |
Valley of Ge-Hinnom | |
Wayfarer (Written in Processing) | |
ZeldaRL | |
defunct | a small freeware roguelike applet created by Will Thimbleby |