Source code file content
samples / Samples / Java / Hello3DWorld / readme.html
Size: 7293 bytes, 1 line
<html>
<head>
<title>The Hello3DWorld Sample Project</title>
</head>
<body>
<h1>The Hello3DWorld Sample Project</h1>
<p>
This NetBeans-ready sample project demonstrates two things:</p>
<ul><li> Getting started with 3-D Java games with the jMonkeyEngine 2.0.1 framework.
</li><li> Using a custom Ant target for packaging all libraries
(including native dynamic libraries) into one JAR.
</li></ul>
<p>No set-up is required to build and run the samples in the NetBeans IDE.</p>
<h2>1.) Overview</h2>
<p>
Open the files window and have a look into the <tt>extra</tt> directory.
It contains libraries that this project depends on.
The libraries are linked in the project as follows:
</p>
<ol><li>Have a look at <tt>File > Project Properties > Libraries > Compile</tt>:<br />
Thirteen jme framework JARs are on the project's <strong>classpath</strong>.<br />
Eight additional third-party JARs are on the project's <strong>classpath</strong>.
</li><li>Have a look at <tt>File > Project Properties > Run > VM Options</tt>:<br />
Seventeen native dynamic libraries are on the <strong>java library path</strong>.
</li></ol>
<p>All library paths are relative, so you do not need to configure anything.</p>
<h2>2.) 3-D Java game development</h2>
<p>
The <a href="http://jmonkeyengine.com">jMonkeyEngine</a> (jme) is a cool
open-source framework for developing 3-D visualizations and 3-D games in Java.
Use this pre-configured sample project to get started with jme easily.
</p>
<ol><li>In the NetBeans IDE toolbar, click the Run button to build and run the project.
</li><li>You will see a window showing a simple teapot summersaulting in 3-D space.
</li><li>Press the AWSD keys to move around. Move the mouse to look around.
</li><li>Press escape to quit the sample app.
</li></ol>
<p>
If this works, you can start creating your own 3-D game world:
Add a horizon (skybox), water, a ground (terrain), custom 3-D models, walking characters, and much more.
Go through the <a href="http://jmonkeyengine.com/wiki/doku.php">tutorials on jmonkeyengine.com</a>
to learn how to implement these and more features (such as collision detection and effects).
The jMonkeyEngine wiki contains several
<a href="http://jmonkeyengine.com/wiki/doku.php?id=all_netbeans_tutorials">NetBeans tutorials</a>
that help you set up IDE features such as code completion for jME 2.0.1.
</p>
<h2>3.) Bundling platform-dependent native libraries</h2>
<p>
The NetBeans IDE creates a JAR file in the <tt>dist</tt> directory for distributing your application.
This JAR file however does not include any native libraries necessary for displaying 3-D graphics.
Your users would have to install these libraries for your application to work, which is an annoying extra step.
</p><p>
To make distributing the application as user-friendly as possible,
I extended the Ant script (<tt>build.xml</tt>) to create platform-dependent distributions.
After building, you can make the IDE create three zipped JAR packages
that are ready to run on MS Windows, Mac OS, and Linux, respectively.
This is achieved by using the One-JAR script from
<a href="http://one-jar.sourceforge.net">http://one-jar.sourceforge.net</a>.
</p>
<p>After your application is ready for distribution,</p>
<ul><li>Clean and Build the project (toolbar button).
</li><li>Go to the Files window and make certain the directory <tt>dist/lib</tt> was created.
</li><li>Go to the Files window and right-click the project's <tt>build.xml</tt> file.
</li><li>Choose <tt>Run Target > dist-zip</tt> to run the custom bundling target.
</li></ul>
<p>Now you find the three platform-dependent JAR executables in your project's <tt>releases</tt> directory.</p>
<p><em>Contributed to the NetBeans sample collection by Ruth Kusterer.</em></p>
<p><br /></p>
<hr>
<p><br /></p>
<h2>Licenses</h2>
<div style="border:1px dotted; width:620px; padding:10px">
<pre>
Copyright (c) 2003-2009 jMonkeyEngine
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of 'jMonkeyEngine' nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre>
<p><br /></p>
<hr width="500">
<p><br /></p>
<pre>
One-JAR™ (http://www.simontuffs.com/one-jar). Copyright (c) 2004-2007,
P. Simon Tuffs (simon@simontuffs.com). All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of P. Simon Tuffs, nor the names of any contributors,
nor the name One-JAR may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Including this file inside the built One-JAR file conforms with these terms.
</pre>
</div>
</body>
</html>





