@ -311,7 +311,7 @@ You can use custom accessors to get data from AppStates, to set data in AppState
<p>
<p>
To access class fields of the application the way you are used to, initialize them to local variables:
To access class fields of the SimpleApplication the way you are used to, initialize them to local variables, as shown in the following AppState template:
There are two ways to handle audio data: Short audio files are to be stored entirely in memory, while long audio files (music) is streamed from the hard drive as it is played.
Place audio files in the <code>assets/Sound/</code> directory of your project. jME3 supports Ogg Vorbis audio compression (.ogg) and uncompressed PCM Wave (.wav) formats. You can use for example <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://audacity.sourceforge.net/"><paramname="text"value="<html><u>Audacity</u></html>"><paramname="textColor"value="blue"></object> to convert from other formats.
</p>
</p>
<p>
</div>
Place audio files in the <code>assets/Sound/</code> directory of your project. jME3 supports Ogg Vorbis (.ogg) and Wave (.wav) formats. You can use for example <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://audacity.sourceforge.net/"><paramname="text"value="<html><u>Audacity</u></html>"><paramname="textColor"value="blue"></object> to convert from other formats.
<!-- EDIT1 SECTION "Audio in jME3" [1-293] -->
<h2><a>Audio Terminology</a></h2>
</p>
<div>
<ul>
<li><div><strong>Streaming:</strong> There are two ways to load audio data: Short audio files are to be stored entirely in memory (prebuffered), while long audio files, such as music, are streamed from the hard drive as it is played.</div>
</li>
<li><div><strong>Looping:</strong> You can play a sound either once and then stop, or repeatedly (continuously) in a loop. <br/>
You cannot loop streamed sounds.</div>
</li>
<li><div><strong>Instance:</strong> If you play the same audio twice, the playing is queued up and jME plays one after the other. If you play instances of sounds, several instances of the same sound can play at the same time.</div>
<h2><a>Creating Audio Nodes: Streamed or Buffered</a></h2>
<h2><a>Creating Audio Nodes: Streamed or Buffered</a></h2>
<div>
<div>
<p>
<p>
The main class to look at is <code>com.jme3.audio.AudioNode</code>.
The main jME audio class to look at is <code>com.jme3.audio.AudioNode</code>. When creating a new audio node you need to declare whether how you want to load this sound:
</p>
</p>
<ul>
<ul>
<li><div><strong>Buffered:</strong> By default, a new audio node is buffered. This means jME3 loads the whole file into memory before playing. You create a buffered sound by setting the boolean to false, or using no boolean at all: <pre>AudioNode boom = new AudioNode(assetManager, "Sound/boom.wav");</pre>
<li><div><strong>Buffered:</strong> By default, a new audio node is buffered. This means jME3 loads the whole file into memory before playing. Use this for short sounds. You create a buffered sound by setting the boolean to false, or using no boolean at all: <pre>AudioNode boom = new AudioNode(assetManager, "Sound/boom.wav");
AudioNode boom = new AudioNode(assetManager, "Sound/boom.wav", false);</pre>
</div>
</div>
</li>
</li>
<li><div><strong>Streamed:</strong> If it is a long file, you stream the audio, that means, you load and play in parallel until the sound is done. You create a streamed sound by setting the boolean to true:<pre>AudioNode music = new AudioNode(assetManager, "Sound/music.wav", true);</pre>
<li><div><strong>Streamed:</strong> If it is a long file such as music or a dialog, you stream the audio. Streaming means, you load and play in parallel until the sound is done. You create a streamed sound by setting the boolean to true:<pre>AudioNode music = new AudioNode(assetManager, "Sound/music.wav", true);</pre>
<td>setLooping(true)</td><td>Configures the sound so that, if it is played, it plays repeats from the beginning, until stop() or pause() are called. Good for ambient background noises. <br/>
<th>AudioNode Method</th><th>Usage</th>
Does not work for streamed sounds! </td>
</tr>
</tr>
<tr>
<tr>
<td>setPositional(false) <br/>
<td>setPositional(false) <br/>
setDirectional(false)</td><td>All 3D effects switched off. This sound is global and comes from everywhere. Good for environmental ambient sounds and background music.</td>
setDirectional(false)</td><td>All 3D effects switched off. This sound is global and comes from everywhere. Good for environmental ambient sounds and background music.</td>
</tr>
</tr>
<tr>
<tr>
<td>setTimeOffset(0.5f)</td><td>Play the sound starting at a 0.5 second offset from the beginning. Default is 0.</td>
<td>setLooping(true)</td><td>Configures the sound to be a loop: When it is played, it repeats from the beginning, until stop() or pause() are called. Good for music and ambient background noises. <br/>
</tr>
Looping does not work on streamed sounds! </td>
<tr>
<td>setMaxDistance(100f)</td><td>Maximum distance the sound can be heard, in world units. Default is 20.</td>
@ -104,7 +124,17 @@ setLocalTranslation(…)</td><td>Activates 3D audio: The sound appears to come f
<td>setReverbEnabled(true)</td><td>A 3D echo effect that only makes sense to use with positional AudioNodes. The reverb effect is influenced by the environment that the audio renderer is in. See "Setting Environment Properties" below. </td>
<td>setReverbEnabled(true)</td><td>A 3D echo effect that only makes sense to use with positional AudioNodes. The reverb effect is influenced by the environment that the audio renderer is in. See "Setting Environment Properties" below. </td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT8 TABLE [2455-2927] --><div><table>
<!-- EDIT11 TABLE [3246-3718] -->
<p>
Note: 3D sounds require an audio listener.
</p>
</div>
<!-- EDIT10 SECTION "Positional 3D Sounds" [3214-3763] -->
<h3><a>Directional 3D Sounds</a></h3>
<div>
<div><table>
<tr>
<tr>
<th>AudioNode Method</th><th>Usage</th>
<th>AudioNode Method</th><th>Usage</th>
</tr>
</tr>
@ -117,9 +147,14 @@ setDirection(…) </td><td>Activates 3D audio: This sound can only be heard from
setOuterAngle()</td><td>Set the angle in degrees for the directional audio. The angle is relative to the direction. Note: By default, both angles are 360° and the sound can be heard from all directions!</td>
setOuterAngle()</td><td>Set the angle in degrees for the directional audio. The angle is relative to the direction. Note: By default, both angles are 360° and the sound can be heard from all directions!</td>
<!-- EDIT12 SECTION "Directional 3D Sounds" [3764-4369] -->
<h2><a>Play, Pause, Stop</a></h2>
<h2><a>Play, Pause, Stop</a></h2>
<div>
<div>
@ -136,18 +171,18 @@ You play, pause, and stop a node called myAudioNode by using the respective of t
</p>
</p>
<p>
<p>
You can also start playing an instance of this AudioNode. Use the playInstance() method if you need to play the same AudioNode multiple times, possibly simulatenously. Note that changes to the parameters of the original AudioNode do not affect the instances that are already playing!
You can also start playing instances of an AudioNode. Use the <code>playInstance()</code> method if you need to play the same AudioNode multiple times, possibly simulatenously. Note that changes to the parameters of the original AudioNode do not affect the instances that are already playing!
The default listener object is the user's ear in the scene. If you use positional audio, you have to move the listener with the player: For example, for a first-person player, you move the listener with the camera. For a third-person player, you move the listener with the player avatar Geometry.
The default listener object is the user's ear in the scene. If you use 3d audio (positional and directional sounds), you have to move the listener with the player: For example, for a first-person player, you move the listener with the camera. For a third-person player, you move the listener with the player avatar Geometry.
</p>
</p>
<pre> @Override
<pre> @Override
public void simpleUpdate(float tpf){
public void simpleUpdate(float tpf){
@ -157,7 +192,7 @@ The default listener object is the user's ear in the scene. If you use posi
}</pre>
}</pre>
</div>
</div>
<!-- EDIT11 SECTION "The Listener" [4163-4707] -->
<!-- EDIT15 SECTION "The Listener" [5075-5647] -->
<h2><a>Setting Environment Properties</a></h2>
<h2><a>Setting Environment Properties</a></h2>
<div>
<div>
@ -186,7 +221,7 @@ Optionally, You can choose from the following environmental presets from <code>c
The <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.adobe.com/products/flashplayer/"><paramname="text"value="<html><u>Adobe Flash Plugin</u></html>"><paramname="textColor"value="blue"></object> is needed to display this content.
The <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.adobe.com/products/flashplayer/"><paramname="text"value="<html><u>Adobe Flash Plugin</u></html>"><paramname="textColor"value="blue"></object> is needed to display this content.
</object>
</object>
<!-- <![endif]-->
<!-- <![endif]-->
@ -603,13 +603,13 @@ The <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param
The <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.adobe.com/products/flashplayer/"><paramname="text"value="<html><u>Adobe Flash Plugin</u></html>"><paramname="textColor"value="blue"></object> is needed to display this content.
The <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.adobe.com/products/flashplayer/"><paramname="text"value="<html><u>Adobe Flash Plugin</u></html>"><paramname="textColor"value="blue"></object> is needed to display this content.
@ -83,7 +83,7 @@ A CollisionResult object contains information about the second party of the coll
<p>
<p>
Assume you have two collidables a and b and want to detect collisions between them. The collision parties can be Geometries, Nodes with Geometries attached (including the rootNode), Planes, Quads, Lines, or Rays.
Assume you have two collidables a and b and want to detect collisions between them. The collision parties can be Geometries, Nodes with Geometries attached (including the rootNode), Planes, Quads, Lines, or Rays. An important restriction is that you can only collide geometry vs bounding volumes or rays. (This means for example that a must be of Type Node or Geometry and b respectively of Type BoundingBox,BoundingShpere or Ray.)
</p>
</p>
<p>
<p>
@ -129,10 +129,11 @@ You can also loop over all results and trigger different reactions depending on
<p>
<p>
Knowing the distance of the collisions is useful for example when you intersect Lines and Rays with other objects.
Knowing the distance of the collisions is useful for example when you intersect Lines and Rays with other objects.
This will result in a 10 px dot being rendered for each of the four vertices. The dot has the vertex color you specified above. The Quad's faces are not rendered at all. This can be used for a special debugging or editing mode.
This will result in a 10 px dot being rendered for each of the four vertices. The dot has the vertex color you specified above. The Quad's faces are not rendered at all. This can be used for a special debugging or editing mode.
</p>
</p>
</div>
</div>
<!-- EDIT13 SECTION "Example: Point Mode" [8164-8818] -->
<!-- EDIT13 SECTION "Example: Point Mode" [8164-8819] -->
<h2><a>Tip: Front and Back Faces</a></h2>
<h2><a>Debugging Tip: Culling</a></h2>
<div>
<div>
<p>
<p>
By default, jME3 optimizes a scene by culling all backfaces. It determines which side the front or backface of a mesh is by the order of the vertices. The frontface is the one where the vertices are specified counter-clockwise.
This means your mesh, as created above, is invisible when seen from "behind". This may not be a problem and is often even intended. If you use the custom meshes to form a polyhedron, or flat wallpaper-like object, rendering the backfaces (the inside of the polyhedron) would indeed be a waste of resources.
By default, jME3 optimizes a mesh by culling (not drawing) its backfaces. It determines which side the front or backface of a mesh is by the order of the vertices: The frontface is the one where the vertices are specified counter-clockwise.
In case that your use case requires the backfaces to be visible, you have two options:
</p>
<p>
This means for you that your custom mesh is invisible when seen from "behind" or from the inside. This may not be a problem, often this is even intended because it's faster. The player will not look at the inside of most things anyway. For example, if your custom mesh is a closed polyhedron, or a flat wallpaper-like object, then rendering the backfaces (the inside of the pillar, the back of the painting, etc) would indeed be a waste of resources.
</p>
<p>
In case however that your usecase requires the backfaces to be visible, you have two options:
</p>
</p>
<ul>
<ul>
<li><div> If you have a very simple scene, you can just deactivate backface culling for this one mesh's material. <br/>
<li><div> If you have a very simple scene, you can just deactivate backface culling for this one mesh's material. <br/>
<li><div> The recommended solution is to specify each triangle twice, the second time with the opposite order of vertices. The second, reversed triangle makes up the backface. <br/>
<li><div> The recommended solution is to specify each triangle twice, the second time with the opposite order of vertices. The second, reversed triangle is a second frontface that replaces the culled backface. <br/>
See also: <ahref="/com/jme3/gde/core/docs/jme3/advanced/spatial.html">Spatial</a> – contains more info about how to debug custom meshes (that do not render as expected) by changing the default culling behaviour.
When you deal with complex game engine features like animations or physics it is handy to get feedback from the engine how it interpreted the current state. Is the physical object's collision shape really where you think it is? Is the skeleton of the animated character moveing like you think it should? This document shows you how to activate visual debug aides.
When you deal with complex game engine features like animations or physics it is handy to get feedback from the engine how it interpreted the current state. Is the physical object's collision shape really where you think it is? Is the skeleton of the animated character moving like you think it should? This document shows you how to activate visual debug aides.
</p>
</p>
<p>
<p>
What if you just want to quickly write code that loads models and brings them in their start position? You may not want to hunt for a sample model, convert it, add lights, and load materials. Instead you use "hasslefree" simple shapes a wireframe material: No model, no light source, no materials are needed to see them in the scene.
What if you just want to quickly write code that loads models and brings them in their start position? You may not want to hunt for a sample model, convert it, add lights, and load materials. Instead you use "hasslefree" simple shapes, and a "hasslefree" unshaded material or wireframe: No model, no light source, no materials are needed to see them in your test scene.
</p>
</p>
<p>
<p>
If you ever have problems with objects appearing in the wrong spot, with the wrong scale, or wrong orientation, simply attach debug shapes to your scene to have a point of reference in 3D space – just like a giant ruler. If your code positions the debug shapes correctly, but models remain invisible when you apply the same code to them, you know that the problem must be the model or the light or its material – and not the positioning code.
If you ever have problems with objects appearing in the wrong spot, with the wrong scale, or wrong orientation, simply attach debug shapes to your scene to have a point of reference in 3D space – just like a giant ruler. If your code positions the debug shapes correctly, but models remain invisible when you apply the same code to them, you know that the problem must be either the model (where is its origin coordinate?), or the light (too dark?too bright? missing?), or the model's material (missing?) – and not the positioning code.
</p>
</p>
<p>
<p>
@ -24,12 +24,12 @@ Here are some different debug shapes:
<!-- EDIT10 SECTION "Example: Toggle Wireframe on the scene" [6090-] -->
<!-- EDIT10 SECTION "Example: Toggle Wireframe on the scene" [6220-7593] -->
<h2><a>See also</a></h2>
<div>
<ul>
<li><div><ahref="/com/jme3/gde/core/docs/jme3/advanced/spatial.html">Spatial</a> – if you can't see certain spatials, you can modify the culling behaviour to identify problems (such as inside-out custom meshes)</div>
@ -248,17 +248,17 @@ these uniforms are passed to the shader without having to declare them in the j3
<p>
<p>
Those are different attributes that are always passed to your shader.<br/>
Those are different attributes that are always passed to your shader.<br/>
you can find a complete list of those attribute in the Type enum of the VertexBuffer <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/scene/VertexBuffer.java"><paramname="text"value="<html><u>here</u></html>"><paramname="textColor"value="blue"></object>.<br/>
You can find a complete list of those attribute in the Type enum of the VertexBuffer <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/scene/VertexBuffer.java"><paramname="text"value="<html><u>here</u></html>"><paramname="textColor"value="blue"></object>.<br/>
Note that in the shader the attributes names will be prefixed by a “in”.<br/>
Note that in the shader the attributes names will be prefixed by an “in”.<br/>
<br/>
<br/>
When the enumeration lists some usual types for each attribute (for example texCoord specifies two floats) then that is the format expected by all standard JME3 shaders that use that attribute. When writing your own shaders though you can use alternative formats such as placing three floats in texCoord simply by declaring the attribute as vec3 in the shader and passing 3 as the component count into the mesh setBuffer call.
@ -309,39 +309,20 @@ The ID of the Client and HostedConnection are the same at both ends of a connect
<p>
<p>
A server has a game version and game name property. Each client expects to communicate with a server with a certain game name and version. Test first whether the game name matches, and then whether game version matches, before sending any messages! If they do not match, you should refuse to connect, because unmatched clients and servers will likely miscommunicate.
A server has a game version and game name property. Each client expects to communicate with a server with a certain game name and version. Test first whether the game name matches, and then whether game version matches, before sending any messages! If they do not match, you should refuse to connect, because unmatched clients and servers will likely miscommunicate.
</p>
</p>
<div><table>
<tr>
<th>Accessor</th><th>Purpose</th>
</tr>
<tr>
<td> myServer.setName() </td><td> Specify the game name of the Server (a free-form String) </td>
</tr>
<tr>
<td> myServer.setVersion() </td><td> Specify the game version of the Server (an integer number) </td>
</tr>
<tr>
<td> myClient.getGameName() </td><td> Client queries the name of the server it is connected to. </td>
</tr>
<tr>
<td> myClient.getVersion() </td><td> Client queries the version of the server it is connected to. </td>
</tr>
</table></div>
<!-- EDIT15 TABLE [10098-10467] -->
<p>
<p>
<p><div>Typically, your networked game defines its own attributes (such as player ID) based on whatever criteria you want. If you want to look up player/client-specific information beyond the game version, you can set this information directly on the Client/HostedConnection object (see Getting Info About a Client).
<p><div>Typically, your networked game defines its own attributes (such as player ID) based on whatever criteria you want. If you want to look up player/client-specific information beyond the game version, you can set this information directly on the Client/HostedConnection object (see Getting Info About a Client).
</div></p>
</div></p>
</p>
</p>
</div>
</div>
<!-- EDIT14 SECTION "Identification and Rejection" [9507-10795] -->
<!-- EDIT14 SECTION "Identification and Rejection" [9507-10424] -->
<h2><a>Closing Clients and Server Cleanly</a></h2>
<h2><a>Closing Clients and Server Cleanly</a></h2>
<div>
<div>
</div>
</div>
<!-- EDIT16 SECTION "Closing Clients and Server Cleanly" [10796-10842] -->
<!-- EDIT15 SECTION "Closing Clients and Server Cleanly" [10425-10471] -->
<h3><a>Closing a Client</a></h3>
<h3><a>Closing a Client</a></h3>
<div>
<div>
@ -357,7 +338,7 @@ You must override the client's destroy() method to close the connection cle
}</pre>
}</pre>
</div>
</div>
<!-- EDIT17 SECTION "Closing a Client" [10843-11118] -->
<!-- EDIT16 SECTION "Closing a Client" [10472-10747] -->
<h3><a>Closing a Server</a></h3>
<h3><a>Closing a Server</a></h3>
<div>
<div>
@ -373,7 +354,7 @@ You must override the server's destroy() method to close the connection whe
}</pre>
}</pre>
</div>
</div>
<!-- EDIT18 SECTION "Closing a Server" [11119-11375] -->
<!-- EDIT17 SECTION "Closing a Server" [10748-11004] -->
<h3><a>Kicking a Client</a></h3>
<h3><a>Kicking a Client</a></h3>
<div>
<div>
@ -384,7 +365,7 @@ The server can kick a HostedConnection to make it disconnect. You should provide
<!-- EDIT19 SECTION "Kicking a Client" [11376-11766] -->
<!-- EDIT18 SECTION "Kicking a Client" [11005-11395] -->
<h2><a>Listening to Connection Notification</a></h2>
<h2><a>Listening to Connection Notification</a></h2>
<div>
<div>
@ -394,7 +375,7 @@ The server and clients are notified about connection changes.
</p>
</p>
</div>
</div>
<!-- EDIT20 SECTION "Listening to Connection Notification" [11767-11878] -->
<!-- EDIT19 SECTION "Listening to Connection Notification" [11396-11507] -->
<h3><a>ClientStateListener</a></h3>
<h3><a>ClientStateListener</a></h3>
<div>
<div>
@ -414,7 +395,7 @@ The com.jme3.network.ClientStateListener notifies the Client when the Client has
<td> public void clientDisconnected(Client c, DisconnectInfo info){} </td><td> Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user. </td>
<td> public void clientDisconnected(Client c, DisconnectInfo info){} </td><td> Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user. </td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT22 TABLE [12121-12490] -->
<!-- EDIT21 TABLE [11750-12119] -->
<p>
<p>
First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient's simpleInitApp() method:
First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient's simpleInitApp() method:
@ -422,7 +403,7 @@ First implement the ClientStateListener interface in the Client class. Then regi
@ -442,7 +423,7 @@ The com.jme3.network.ConnectionListener notifies the Server whenever new HostedC
<td> public void connectionRemoved(Server s, HostedConnection c){} </td><td> Implement here what happens after a HostedConnection has left. E.g. a player has quit the game and the server removes his character. </td>
<td> public void connectionRemoved(Server s, HostedConnection c){} </td><td> Implement here what happens after a HostedConnection has left. E.g. a player has quit the game and the server removes his character. </td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT24 TABLE [12958-13356] -->
<!-- EDIT23 TABLE [12587-12985] -->
<p>
<p>
First implement the ConnectionListener interface in the Server class. Then register it to myServer in MyGameServer's simpleInitApp() method.
First implement the ConnectionListener interface in the Server class. Then register it to myServer in MyGameServer's simpleInitApp() method.
@ -451,7 +432,7 @@ First implement the ConnectionListener interface in the Server class. Then regis
Now the Java class <code>MyStartScreen</code> and this <acronymtitle="Graphical User Interface">GUI</acronym> screen (<code>start</code>) are connected. For this example you can also connect the <code>hud</code> screen to MyStartScreen.
Now the Java class <code>MyStartScreen</code> and this <acronymtitle="Graphical User Interface">GUI</acronym> screen (<code>start</code>) are connected. For this example you can also connect the <code>hud</code> screen to MyStartScreen.
</p>
</p>
</div>
</div>
<!-- EDIT2 SECTION "Connect GUI to Java Controller" [792-3175] -->
<!-- EDIT2 SECTION "Connect GUI to Java Controller" [792-3174] -->
<h2><a>Make GUI and Java Interact</a></h2>
<h2><a>Make GUI and Java Interact</a></h2>
<div>
<div>
@ -114,7 +114,7 @@ Use any combination of the three following approaches to make Java classes inter
</p>
</p>
</div>
</div>
<!-- EDIT3 SECTION "Make GUI and Java Interact" [3176-3548] -->
<!-- EDIT3 SECTION "Make GUI and Java Interact" [3175-3547] -->
<h3><a>GUI Calls a Void Java Method</a></h3>
<h3><a>GUI Calls a Void Java Method</a></h3>
<div>
<div>
@ -214,7 +214,7 @@ The quitGame() example shows that you have access to the application <code>app</
@ -323,7 +323,7 @@ Inside myCustomStyles.xml you define styles like this:
Learn more about how to create styles by looking at the <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Build_from_Source"><paramname="text"value="<html><u>Nifty GUI source code</u></html>"><paramname="textColor"value="blue"></object> for “nifty-style-black”. Copy it as a template and change it to create your own style.
Learn more about how to create styles by looking at the <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://sourceforge.net/apps/mediawiki/nifty-gui/index.php?title=Build_from_Source"><paramname="text"value="<html><u>Nifty GUI source code</u></html>"><paramname="textColor"value="blue"></object> for “nifty-style-black”. Copy it as a template and change it to create your own style.
@ -10,6 +10,9 @@ Here you can find working combinations of Blender and the OgreXML exporter, with
<tr>
<tr>
<th> Blender Version </th><th> OgreXML Exporter Version </th><th> Notes </th>
<th> Blender Version </th><th> OgreXML Exporter Version </th><th> Notes </th>
</tr>
</tr>
<tr>
<td> 2.6.3 </td><td><objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/blender2ogre/downloads/list"><paramname="text"value="<html><u>0.5.8</u></html>"><paramname="textColor"value="blue"></object></td><td> Root bone, no transforms on object, no envelopes </td>
</tr>
<tr>
<tr>
<td> 2.6.2 </td><td><objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/blender2ogre/downloads/list"><paramname="text"value="<html><u>0.5.5</u></html>"><paramname="textColor"value="blue"></object></td><td> Root bone, no transforms on object, no envelopes </td>
<td> 2.6.2 </td><td><objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/blender2ogre/downloads/list"><paramname="text"value="<html><u>0.5.5</u></html>"><paramname="textColor"value="blue"></object></td><td> Root bone, no transforms on object, no envelopes </td>
</tr>
</tr>
@ -20,9 +23,9 @@ Here you can find working combinations of Blender and the OgreXML exporter, with
<td> 2.6.0 </td><td> ? </td><td></td>
<td> 2.6.0 </td><td> ? </td><td></td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT2 TABLE [173-391] -->
<!-- EDIT2 TABLE [173-518] -->
</div>
</div>
<!-- EDIT1 SECTION "Working Blender and OgreXML Versions" [1-392] -->
<!-- EDIT1 SECTION "Working Blender and OgreXML Versions" [1-519] -->
<h1><a>Tips</a></h1>
<h1><a>Tips</a></h1>
<div>
<div>
@ -54,7 +57,7 @@ Test Character - <object classid="java:org.netbeans.modules.javahelp.BrowserDisp
</p>
</p>
</div>
</div>
<!-- EDIT3 SECTION "Tips" [393-869] -->
<!-- EDIT3 SECTION "Tips" [520-996] -->
<h1><a>Troubleshooting</a></h1>
<h1><a>Troubleshooting</a></h1>
<div>
<div>
@ -68,5 +71,5 @@ Test Character - <object classid="java:org.netbeans.modules.javahelp.BrowserDisp
@ -225,7 +225,7 @@ The following effect textures are available by default from <code>test-data.jar<
Browse the full source code of all <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/#svn%2Ftrunk%2Fengine%2Fsrc%2Ftest%2Fjme3test%2Feffect"><paramname="text"value="<html><u>effect examples</u></html>"><paramname="textColor"value="blue"></object> here.
Browse the full source code of all <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/#svn%2Ftrunk%2Fengine%2Fsrc%2Ftest%2Fjme3test%2Feffect"><paramname="text"value="<html><u>effect examples</u></html>"><paramname="textColor"value="blue"></object> here.
You can read the graphic card's capabilities using the <code>com.jme3.renderer.Caps</code> class:
When different people test your new game, you may get feedback that the game doesn't run on their hardware, or that some details don't look as expected. You need to detect which fetaures the user's hardware supports, and offer a replacement for non-supported features on olde hardware (or deactivate them automatically).
</p>
<p>
You can read (and print) the capabilities of the user's graphic card using the <code>com.jme3.renderer.Caps</code> class:
Here is an example of the capabilities of an semi-old graphic card that only supports OpenGL 2.0. If you use OpenGL 2.1 features you need to decide whether to branch to a low-quality replacement of the unsupported features (if you still want to support this card); or whether the game will not start at all and displays an error message explaining the user what capabilities his hardware is missing to be able to play the game.
This would tell you that this user's graphic card only supports OpenGL 2.0 and cannot handle newer OpenGL features.
This next example is lacking <code>NonPowerOfTwoTextures</code>, this tells you that this user's graphic card cannot handle textures with sizes that are not square powers of two (such as "128x128").
<!-- EDIT7 SECTION "How to Access a Named Sub-Mesh" [7563-8366] -->
<!-- EDIT7 SECTION "How to Access a Named Sub-Mesh" [7563-8365] -->
<h2><a>What is Culling?</a></h2>
<div>
<p>
There are two types of colling: Face culling, and view frustrum culling.
</p>
<p>
<strong>Face culling</strong> refers to not drawing certain polygons of a mesh. The "inside" of the mesh (the so called backface) is never visible to the player, and as an optimization, game engines skip calculating backfaces by default. You may want to deactivate Face Culling while debugging custom meshes, so you can see them in case you turned them inside-out by accident.
</p>
<p>
You can switch the com.jme3.material.RenderState.FaceCullMode to
</p>
<ul>
<li><div><code>FaceCullMode.Back</code> (default) – only the frontsides of a mesh are drawn. This is the normal behaviour. </div>
</li>
<li><div><code>FaceCullMode.Front</code> – only the backsides of meshes are drawn. The mesh will probably turn invisible. Useful if you are debugging a hand-made mesh and try to identify accidental inside-out faces.</div>
</li>
<li><div><code>FaceCullMode.FrontAndBack</code> – The mesh becomes invisible. </div>
</li>
<li><div><code>FaceCullMode.Off</code> – Every side of the mesh is drawn. Looks normal, but slows down large scenes.</div>
<strong>View frustum culling</strong> refers to not drawing (and not even calculating) certain whole models in the scene. At any given moment, half of the scene is behind the player and out of sight anyway. View frustum culling is an optimization to not calculate scene elements that are not visible – elements that are "outside the view frustrum".
</p>
<p>
The decision what is visible and what not, is done automatically by the engine (<code>CullHint.Dynamic</code>). Optionally, you can manually control whether the engine culls individual spatials (and children) from the scene graph:
</p>
<ul>
<li><div><code>CullHint.Dynamic</code> – Default, faster because it doesn't waste time with objects that are out of view.</div>
</li>
<li><div><code>CullHint.Never</code> – Calculate and draw everything always (even if it does not end up on the user's screen because it's out of sight). Slower, but can be used while debugging custom meshes.</div>
</li>
<li><div><code>CullHint.Always</code> – The whole spatial is culled and is not visible. A fast way to hide a Spatial temporarily. Culling a Spatial is faster then detaching it, but it uses more memory.</div>
</li>
<li><div><code>CullHint.Inherit</code> – Inherit culling behaviour from parent node. </div>
@ -302,7 +302,7 @@ You see that you can combine snippets of sample code (such as HelloTerrain and H
<p>
<p>
You should spawn high up in the area and fall down to the map, giving you a few seconds to survey the area. Then walk around and see how you like the lay of the land.
You should spawn high up in the area and fall down to the map, giving you a few seconds to survey the area. Then walk around and see how you like the lay of the land.
There are two strategies how advanced developers can spread out their init and update code over several Java objects:
In a trivial <ahref="/com/jme3/gde/core/docs/jme3/intermediate/simpleapplication.html">SimpleApplication</a> (such as a <ahref="/com/jme3/gde/core/docs/jme3/beginner.html">Hello World tutorial</a>), all code is either in the <code>simpleInitApp()</code> (initialization) or <code>simpleUpdate()</code> (behaviour) method – or in a helper method/class that is called from one of these two. This trivial approach will make your main class very long, hard to read, and hard to maintain. You don't need to load the whole scene at once, and you don't need to run all conditionals tests all the time.
</p>
<p>
It's a best practice to modularize your game mechanics and spread out initialization and update loop code over several Java objects:
</p>
</p>
<ul>
<ul>
<li><div> Move code blocks from the simpleInitApp() method to <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">AppStates</a>.</div>
<li><div> Move modular code blocks from the <code>simpleInitApp()</code> method into <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">AppStates</a>. Attach AppStates to initialize custom subsets of "one dungeon", and detach it when the player exits this "dungeon". <br/>
Examples: Weather/sky audio and visuals, physics collision shapes, sub-rootnodes of individual dungeons including dungeon NPCs, etc.</div>
</li>
</li>
<li><div> Move code blocks from the simpleUpdate() method to <ahref="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a> to control entity behavior.</div>
<li><div> Move modular code blocks from the <code>simpleUpdate()</code> method into the update loops of <ahref="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a> to control individual entity behavior (NPCs), and into the update method of <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">AppStates</a> to control world events. <br/>
@ -340,7 +340,7 @@ Now you can load animated models, identify stored animations, and trigger animat
Now that your character can walk, wouldn't it be cool if it could also pick up things, or aim a weapon at things, or open doors? Time to reveal the secrets of <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_picking.html">mouse picking</a>!
Now that your character can walk, wouldn't it be cool if it could also pick up things, or aim a weapon at things, or open doors? Time to reveal the secrets of <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_picking.html">mouse picking</a>!
</p>
</p>
<hr/>
<hr/>
<p>
<p>
See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="https://docs.google.com/leaf?id=0B9hhZie2D-fEYmRkMTYwN2YtMzQ0My00NTM4LThhOTYtZTk1MTRlYTNjYTc3&hl=en"><paramname="text"value="<html><u>Creating Animated OgreXML Models in Blender</u></html>"><paramname="textColor"value="blue"></object>
See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="https://docs.google.com/leaf?id=0B9hhZie2D-fEYmRkMTYwN2YtMzQ0My00NTM4LThhOTYtZTk1MTRlYTNjYTc3&hl=en"><paramname="text"value="<html><u>Creating Animated OgreXML Models in Blender</u></html>"><paramname="textColor"value="blue"></object>
@ -466,7 +466,7 @@ Now you know how to populate the scenegraph with static shapes and models, and h
Let's add some action to the scene and continue with the <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html">Update Loop</a>!
Let's add some action to the scene and continue with the <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html">Update Loop</a>!
@ -369,7 +369,7 @@ You now know how to add the two most common types of sound to your game: Global
Want some fire and explosions to go with your sounds? Read on to learn more about <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html">effects</a>.
Want some fire and explosions to go with your sounds? Read on to learn more about <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html">effects</a>.
@ -183,7 +183,7 @@ public class HelloCollision extends SimpleApplication
}</pre>
}</pre>
<p>
<p>
Run the sample. You should see a town square with houses and a monument. Use the WASD keys and the mouse to navigate around with a first-person perspective. Run forward and jump by pressing W and Space. Note how you step over the sidewalk, and up the steps to the monument. You can walk in the alleys between the houses, but the walls are solid. Don't walk over the edge of the world! <imgsrc="/wiki/lib/images/smileys/icon_smile.gif"class="middle"alt=":-)"/>
Run the sample. You should see a town square with houses and a monument. Use the WASD keys and the mouse to navigate around with a first-person perspective. Run forward and jump by pressing W and Space. Note how you step over the sidewalk, and up the steps to the monument. You can walk in the alleys between the houses, but the walls are solid. Don't walk over the edge of the world! <imgsrc="/wiki/lib/images/smileys/icon_smile.gif"class="middle"alt=":-)"/>
</p>
</p>
</div>
</div>
@ -508,7 +508,7 @@ You learned to speed up the physics calculations by using the CollisionShapeFact
Terrains are another type of scene in which you will want to walk around. Let's proceed with learning <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html">how to generate terrains</a> now.
Terrains are another type of scene in which you will want to walk around. Let's proceed with learning <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html">how to generate terrains</a> now.
@ -369,7 +369,7 @@ You have learned that many different effects can be created by changing the para
Now you move on to another exciting chapter – the simulation of <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_physics"><paramname="text"value="<html><u>physical objects</u></html>"><paramname="textColor"value="blue"></object>. Let's shoot some cannon balls at a brick wall!
Now you move on to another exciting chapter – the simulation of <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_physics"><paramname="text"value="<html><u>physical objects</u></html>"><paramname="textColor"value="blue"></object>. Let's shoot some cannon balls at a brick wall!
@ -201,7 +201,7 @@ Now you are listening to the update loop, "the heart beat" of the game
<p>
<p>
The next thing the game needs is some <em>inter</em>action! Continue learning how to <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html">respond to user input</a>.
The next thing the game needs is some <em>inter</em>action! Continue learning how to <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html">respond to user input</a>.
@ -417,7 +417,7 @@ You have also learned that a material can be stored in a .j3m file. The file ref
Now that you know how to load models and how to assign good-looking materials to them, let's have a look at how to animate models in the next chapter, <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html">Hello Animation</a>.
Now that you know how to load models and how to assign good-looking materials to them, let's have a look at how to animate models in the next chapter, <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html">Hello Animation</a>.
@ -506,7 +506,7 @@ Use your imagination from here:
Now, wouldn't it be nice if those targets and the floor were solid objects and you could walk around between them? Let's continue to learn about <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_collision.html">Collision Detection</a>.
Now, wouldn't it be nice if those targets and the floor were solid objects and you could walk around between them? Let's continue to learn about <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_collision.html">Collision Detection</a>.
@ -326,7 +326,7 @@ The now following tutorials teach how you accomplish these tasks with the jMonke
Continue with the <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_node.html">Hello Node</a> tutorial, where you learn more details about how to initialize the game world, also known as the scene graph.
Continue with the <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_node.html">Hello Node</a> tutorial, where you learn more details about how to initialize the game world, also known as the scene graph.
@ -554,7 +554,7 @@ You have learned how to create terrains that are more efficient than loading one
Do you want to hear your players say "ouch!" when they bump into a wall or fall off a hill? Continue with learning <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_audio.html">how to add sound</a> to your game.
Do you want to hear your players say "ouch!" when they bump into a wall or fall off a hill? Continue with learning <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_audio.html">how to add sound</a> to your game.
@ -46,7 +46,7 @@ We recommend downloading the <object classid="java:org.netbeans.modules.javahelp
For a detailed description of the created jar files see <ahref="/com/jme3/gde/core/docs/jme3/jme3_source_structure#structure_of_jmonkeyengine3_jars.html">this list</a>.
For a detailed description of the created jar files see <ahref="/com/jme3/gde/core/docs/jme3/jme3_source_structure#structure_of_jmonkeyengine3_jars.html">this list</a>.
@ -337,7 +337,7 @@ The blend file, the ogre xml files and the textures can be found in the download
<div>
<div>
<p>
<p>
There are several ways to create static images to use for a sky in your game. This will describe the concepts used in blender and create an ugly sky <imgsrc="/wiki/lib/images/smileys/icon_smile.gif"class="middle"alt=":-)"/> Check the links below for other ways and prettier skies.
There are several ways to create static images to use for a sky in your game. This will describe the concepts used in blender and create an ugly sky <imgsrc="/wiki/lib/images/smileys/icon_smile.gif"class="middle"alt=":-)"/> Check the links below for other ways and prettier skies.
Yes! For your own games, you create a custom base class that extends <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/app/SimpleApplication.java"><paramname="text"value="<html><u>com.jme3.app.SimpleApplication</u></html>"><paramname="textColor"value="blue"></object> class, so it's no longer a "simple" application. Configure your <ahref="/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html">application settings</a>, and customize away.
Yes! Actually, you MUST customize it! For your own games, you always create a custom base class that extends <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/app/SimpleApplication.java"><paramname="text"value="<html><u>com.jme3.app.SimpleApplication</u></html>"><paramname="textColor"value="blue"></object> class. From now on it's no longer a "simple application" – it's now your game. Configure your <ahref="/com/jme3/gde/core/docs/jme3/intermediate/appsettings.html">application settings</a>, implement methods, and customize away!
<!-- EDIT5 SECTION "Can I customize the SimpleApplication class?" [516-1022] -->
<!-- EDIT5 SECTION "Can I customize the SimpleApplication class?" [516-1112] -->
<h3><a>How can I switch between screens or states?</a></h3>
<h3><a>How can I switch between screens or states?</a></h3>
<div>
<div>
@ -50,7 +50,7 @@ You should break app your application logic into components by spreading it out
</p>
</p>
</div>
</div>
<!-- EDIT6 SECTION "How can I switch between screens or states?" [1023-1567] -->
<!-- EDIT6 SECTION "How can I switch between screens or states?" [1113-1657] -->
<h3><a>How do I pause/unpause a game?</a></h3>
<h3><a>How do I pause/unpause a game?</a></h3>
<div>
<div>
@ -62,7 +62,7 @@ You split up your application into several AppStates and implement the setEnable
</p>
</p>
</div>
</div>
<!-- EDIT7 SECTION "How do I pause/unpause a game?" [1568-2173] -->
<!-- EDIT7 SECTION "How do I pause/unpause a game?" [1658-2263] -->
<h3><a>How do I disable logger output to the console?</a></h3>
<h3><a>How do I disable logger output to the console?</a></h3>
<div>
<div>
@ -86,7 +86,7 @@ For the release, switch the severity level of the default logger to print only S
</p>
</p>
</div>
</div>
<!-- EDIT8 SECTION "How do I disable logger output to the console?" [2174-2660] -->
<!-- EDIT8 SECTION "How do I disable logger output to the console?" [2264-2750] -->
<h3><a>Why does the executable crash with "Cannot locate resource"?</a></h3>
<h3><a>Why does the executable crash with "Cannot locate resource"?</a></h3>
<div>
<div>
@ -98,7 +98,7 @@ Make sure to only load() models converted to .j3o binary format, not the origina
</p>
</p>
</div>
</div>
<!-- EDIT9 SECTION "Why does the executable crash with Cannot locate resource?" [2661-2991] -->
<!-- EDIT9 SECTION "Why does the executable crash with Cannot locate resource?" [2751-3081] -->
<h3><a>What is java.lang.LinkageError: Version mismatch?</a></h3>
<h3><a>What is java.lang.LinkageError: Version mismatch?</a></h3>
<div>
<div>
@ -110,29 +110,21 @@ To fix this, search for .dll (Windows), .jnilib (Mac), and .so (Linux) files for
</p>
</p>
</div>
</div>
<!-- EDIT10 SECTION "What is java.lang.LinkageError: Version mismatch?" [2992-4375] -->
<!-- EDIT10 SECTION "What is java.lang.LinkageError: Version mismatch?" [3082-4465] -->
<h2><a>I want to load my scene</a></h2>
<h2><a>I want to load my scene</a></h2>
<div>
<div>
</div>
</div>
<!-- EDIT11 SECTION "I want to load my scene" [4376-4411] -->
<!-- EDIT11 SECTION "I want to load my scene" [4466-4501] -->
<h3><a>How do I make objects appear / disappear in the 3D scene?</a></h3>
<h3><a>How do I make objects appear / disappear in the 3D scene?</a></h3>
<div>
<div>
<p>
<p>
To make a spatial appear in the scene, you attach it to the rootNode, To remove a spatial, you detach it.
To make a spatial appear in the scene, you attach it to the rootNode (or to a node that is attached to the rootnode). To remove a spatial, you detach it from its parent node.
<!-- EDIT24 SECTION "How do I scale, mirror, or wrap a texture?" [11185-11726] -->
<!-- EDIT24 SECTION "How do I scale, mirror, or wrap a texture?" [11142-11683] -->
<h3><a>How do I change color or shininess of an material?</a></h3>
<h3><a>How do I change color or shininess of an material?</a></h3>
<div>
<div>
@ -323,7 +315,7 @@ Use the AssetManager to load Materials, and change material settings.
</p>
</p>
</div>
</div>
<!-- EDIT25 SECTION "How do I change color or shininess of an material?" [11727-12314] -->
<!-- EDIT25 SECTION "How do I change color or shininess of an material?" [11684-12271] -->
<h3><a>How do I make a surface wood, stone, metal, etc?</a></h3>
<h3><a>How do I make a surface wood, stone, metal, etc?</a></h3>
<div>
<div>
@ -336,7 +328,7 @@ Create Textures as image files. Use the AssetManager to load a Material and use
</p>
</p>
</div>
</div>
<!-- EDIT26 SECTION "How do I make a surface wood, stone, metal, etc?" [12315-13088] -->
<!-- EDIT26 SECTION "How do I make a surface wood, stone, metal, etc?" [12272-13045] -->
<h3><a>Why are materials too bright, too dark, or flickering?</a></h3>
<h3><a>Why are materials too bright, too dark, or flickering?</a></h3>
<div>
<div>
@ -345,7 +337,7 @@ If you use a lit material (based on Lighting.j3md) then you must attach a light
</p>
</p>
</div>
</div>
<!-- EDIT27 SECTION "Why are materials too bright, too dark, or flickering?" [13089-13902] -->
<!-- EDIT27 SECTION "Why are materials too bright, too dark, or flickering?" [13046-13859] -->
<h3><a>How do I make geometries cast a shadow?</a></h3>
<h3><a>How do I make geometries cast a shadow?</a></h3>
<div>
<div>
@ -358,7 +350,7 @@ Use com.jme3.shadow.BasicShadowRenderer together with com.jme3.light.Directional
</p>
</p>
</div>
</div>
<!-- EDIT28 SECTION "How do I make geometries cast a shadow?" [13903-14411] -->
<!-- EDIT28 SECTION "How do I make geometries cast a shadow?" [13860-14368] -->
<h3><a>How do I make materials transparent?</a></h3>
<h3><a>How do I make materials transparent?</a></h3>
<div>
<div>
@ -374,23 +366,36 @@ Assign a texture with an alpha channel to a Material and set the Material's
</p>
</p>
</div>
</div>
<!-- EDIT29 SECTION "How do I make materials transparent?" [14412-14848] -->
<!-- EDIT29 SECTION "How do I make materials transparent?" [14369-14805] -->
<h3><a>How do I force or disable backface culling?</a></h3>
<h3><a>How do I force or disable culling?</a></h3>
<div>
<div>
<p>
<p>
You can switch the com.jme3.material.RenderState.FaceCullMode to Back, Front, FrontAndBack, or Off. This influences whether the front or backside of an object is being drawn. By default, backsides are culled (not drawn) because they are usually not visible anyway.
While debugging custom meshes, you can switch the <code>com.jme3.material.RenderState.FaceCullMode</code> off to see the inside and outside of the mesh.
You can also deactivate the <code>com.jme3.scene.Spatial.CullHint</code> of a whole spatial to force jme to calculate it even if it is behind the camera and outside of view.
<!-- EDIT62 SECTION "How do I make a sky?" [26385-26764] -->
<!-- EDIT62 SECTION "How do I make a sky?" [26479-26858] -->
<h2><a>I want to access to back-end properties</a></h2>
<h2><a>I want to access to back-end properties</a></h2>
<div>
<div>
</div>
</div>
<!-- EDIT63 SECTION "I want to access to back-end properties" [26765-26816] -->
<!-- EDIT63 SECTION "I want to access to back-end properties" [26859-26910] -->
<h3><a>How do I read out graphic card capabilities?</a></h3>
<h3><a>How do I read out graphic card capabilities?</a></h3>
<div>
<div>
<p>
<p>
If your game is heavily using features that older cards do not support, you can add a check of the JME3 Renderer Caps.
If your game is heavily using features that older cards do not support, you can <ahref="/com/jme3/gde/core/docs/jme3/advanced/read_graphic_card_capabilites.html">Read Graphic Card Capabilites</a> in the beginning before starting the app, and then decide how to proceed.
The following shortened example shows the capabilities of an older graphic card. In this case you decide whether to branch to a low-quality rendering of the unsupported features (if you still want to support this card), or print an error message explaining the user what capabilities the card is missing to play the game.
</div>
</p>
<!-- EDIT64 SECTION "How do I read out graphic card capabilities?" [26911-27346] -->
<h3><a>How do I Run jMonkeyEngine 3 with OpenGL1?</a></h3>
<div>
<p>
<p>
Here is an example of the capabilities of an older graphic card:
Every class that extends jme3.app.SimpleApplication has properties that can be configured by customizing a <code>com.jme3.system.AppSettings</code> object. Configure the settings before you call <code>app.start()</code> on the application object. If you change display settings during runtime, call <code>app.restart()</code> to make them take effect.
Every class that extends jme3.app.SimpleApplication has properties that can be configured by customizing a <code>com.jme3.system.AppSettings</code> object.
</p>
<p>
<p><div>Configure application settings in <code>main()</code>, before you call <code>app.start()</code> on the application object. If you change display settings during runtime, for eyample in <code>simpleInitApp()</code>, you must call <code>app.restart()</code> to make them take effect.
</div></p>
</p>
</p>
<p>
<p>
@ -12,13 +17,13 @@ Every class that extends jme3.app.SimpleApplication has properties that can be c
This is how you specify settinsg for MyGame (or Main or whatever you called your SimpleApplication instance) before the game starts:
Specify settings for a game (here called <code>MyGame</code>, or whatever you called your SimpleApplication instance) in the <code>main()</code> method before the game starts:
@ -106,7 +111,7 @@ Set VSync to false to deactivate vertical syncing (faster, but possible page tea
<td>setEmulateMouseFlipAxis(true,true)</td><td>Flips the X or Y (or both) axes for the emulated mouse. Set the first parameter to true to flip the x axis, and the second to flip the y axis.</td><td>false,false</td>
<td>setEmulateMouseFlipAxis(true,true)</td><td>Flips the X or Y (or both) axes for the emulated mouse. Set the first parameter to true to flip the x axis, and the second to flip the y axis.</td><td>false,false</td>
@ -117,7 +122,7 @@ Set VSync to false to deactivate vertical syncing (faster, but possible page tea
<td>setStereo3D(true)</td><td>Enable 3D stereo. This feature requires hardware support from the GPU driver. See <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Quad_buffering"><paramname="text"value="<html><u>Quad Buffering</u></html>"><paramname="textColor"value="blue"></object>. Currently, your everday user's hardware does not support this, so you can ignore it for now.</td><td>false</td>
<td>setStereo3D(true)</td><td>Enable 3D stereo. This feature requires hardware support from the GPU driver. See <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Quad_buffering"><paramname="text"value="<html><u>Quad Buffering</u></html>"><paramname="textColor"value="blue"></object>. Currently, your everday user's hardware does not support this, so you can ignore it for now.</td><td>false</td>
@ -132,7 +137,7 @@ ImageIO.read(new File("")), …});</td><td>This specifies the little a
<td>setSettingsDialogImage("Interface/mysplashscreen.png")</td><td>A custom splashscreen image in the <code>assets/Interface</code> directory which is displayed when the settings dialog is shown.</td><td>"/com/jme3/app/Monkey.png"</td>
<td>setSettingsDialogImage("Interface/mysplashscreen.png")</td><td>A custom splashscreen image in the <code>assets/Interface</code> directory which is displayed when the settings dialog is shown.</td><td>"/com/jme3/app/Monkey.png"</td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT7 TABLE [5331-6038] -->
<!-- EDIT7 TABLE [5449-6156] -->
<p>
<p>
<p><div>You can use <code>app.setShowSettings(true);</code> and <code>setSettingsDialogImage("Interface/mysplashscreen.png")</code> to present the user with jme3's default display settings dialog when starting the game. Use <code>app.setShowSettings(false);</code> to hide the default settings screen. Set this boolean before calling <code>app.start()</code> on the SimpleApplication.
<p><div>You can use <code>app.setShowSettings(true);</code> and <code>setSettingsDialogImage("Interface/mysplashscreen.png")</code> to present the user with jme3's default display settings dialog when starting the game. Use <code>app.setShowSettings(false);</code> to hide the default settings screen. Set this boolean before calling <code>app.start()</code> on the SimpleApplication.
@ -140,7 +145,7 @@ ImageIO.read(new File("")), …});</td><td>This specifies the little a
</p>
</p>
</div>
</div>
<!-- EDIT3 SECTION "Properties" [1942-6398] -->
<!-- EDIT3 SECTION "Properties" [2060-6516] -->
<h2><a>Toggling and Activating Settings</a></h2>
<h2><a>Toggling and Activating Settings</a></h2>
<div>
<div>
<div><table>
<div><table>
@ -160,9 +165,9 @@ ImageIO.read(new File("")), …});</td><td>This specifies the little a
<td>app.restart()</td><td>Restart()ing a running game restarts the game context and applies the updated settings object. (This does not restart or reinitialize the whole game.)</td>
<td>app.restart()</td><td>Restart()ing a running game restarts the game context and applies the updated settings object. (This does not restart or reinitialize the whole game.)</td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT9 TABLE [6445-7326] -->
<!-- EDIT9 TABLE [6563-7444] -->
</div>
</div>
<!-- EDIT8 SECTION "Toggling and Activating Settings" [6399-7327] -->
<!-- EDIT8 SECTION "Toggling and Activating Settings" [6517-7445] -->
<h2><a>Saving and Loading Settings</a></h2>
<h2><a>Saving and Loading Settings</a></h2>
<div>
<div>
@ -202,5 +207,5 @@ Provide the unique name of your jME3 application as the String argument. For exa
</ul>
</ul>
</div>
</div>
<!-- EDIT10 SECTION "Saving and Loading Settings" [7328-] -->
<!-- EDIT10 SECTION "Saving and Loading Settings" [7446-] -->
To use iOS deployment you need a computer running MacOSX and a version of Xcode 4.0+ installed. To deploy to a device or the Apple App Store, you need an Apple developer account.
</p>
<p>
iOS deployment works via cross-compilation to native iOS ARM code, there is no virtual machine running on the device. The Avian JVM supports this feature while maintaining general compatibility to OpenJDK and JNI for native access. The minimum compatible iOS deployment target is 4.3.
</p>
<p>
<p><div>Note that at the moment this option is in pre-alpha state and the system runs on a null renderer. This means there is no visual output. You can however use the current system to explore the options and test cross-compiling your applications.
</div></p>
</p>
</div>
<!-- EDIT1 SECTION "iOS Deployment" [1-755] -->
<h3><a>Enabling iOS deployment</a></h3>
<div>
<p>
To enable iOS deployment, go to the project settings and under "Application→iOS" select the "Enable iOS deployment" checkbox, adapt the application ID and then press OK.
</p>
<p>
Note: When you do this for the first time or any time that the Avian library and OpenJDK is updated, they will be extracted to your <acronymtitle="Software Development Kit">SDK</acronym> settings folder, wait until it has been extracted before building an iOS-enabled project.
</p>
<p>
After enabling deployment, a new <code>ios</code> directory is created in the project root that contains a <code>project</code> and a <code>src</code> folder. The <code>ios/project</code> folder contains an Xcode project that you will use to build and run the final iOS application for both iPhone and iOS. The <code>ios/src</code> folder contains java and native source files for bridging iOS and native code, you can add .java and .m files with your own iOS code here.
The iOS binaries are automatically built when you have iOS deployment enabled and build your project.
</p>
<p>
When the iOS binaries are built, all needed classes, including a complete copy of the OpenJDK7 classes are run through a proguard process that strips out the unnecessary classes for the project and optimizes the code for the platform. This happens without changing the naming structure so that reflection etc. still works. If necessary, adapt the proguard options in the ios properties file.
</p>
<p>
After the iOS classpath has been created the avian compiler is used to create a native .o file from the classpath for both arm (device) and i386 (simulator). Furthermore the other needed avian .o files are extracted and a library list is compiled which is referenced in the Xcode project.
</p>
</div>
<!-- EDIT3 SECTION "Building the iOS binaries" [1615-2436] -->
<h3><a>Running and deploying the application</a></h3>
<div>
<p>
To run the application, open the Xcode project in Xcode and press the run button. You can make changes to the UI and native invocation classes in the Xcode project as well. From here you can also deploy the application to your devices or the App Store.
</p>
</div>
<!-- EDIT4 SECTION "Running and deploying the application" [2437-2738] -->
<h3><a>Creating native and java code for iOS</a></h3>
<div>
<p>
To bridge between native and java code, JNI is used like in a normal java application. The <code>ios/src</code> folder is for Java and C/Obj-C source files that are specific to your iOS application. In these java files you have access to the full project classpath as well as the iOS-specific jME3 classes.
</p>
<p>
The JmeAppHarness.java class is initialized and called from native code through the default project and you can extend it to perform other native operations. It has a simple native popup method. The JmeAppHarness.m file contains the native method needed for that popup.
</p>
<p>
Effectively native code can reside in both the Xcode project and in the <code>ios/src</code> folder. To keep the dependencies clean and make code reusable you should try to put generic native code that does not depend on the Xcode project in the <code>ios/src</code> folder.
</p>
<p>
Java code for iOS should be in the <code>ios/src</code> folder as well for clean separation, its also the only place where they will be compiled with a reference to the iOS specific jME classes. For information on how to connect your application code and device specific code, see the <ahref="/com/jme3/gde/core/docs/jme3/android#using_android_specific_functions.html">notes in the android deployment documentation</a>.
</p>
</div>
<!-- EDIT5 SECTION "Creating native and java code for iOS" [2739-] -->
@ -492,14 +492,14 @@ Non-player (computer-controlled) characters (NPCs) are only fun in a game if the
The domain of artificial intelligence deals, among other things, with:
The domain of artificial intelligence deals, among other things, with:
</p>
</p>
<ul>
<ul>
<li><div><strong>Knowledge</strong> – Knowledge is about the data to which the agent has access to base its decisions on. Realistic agents only "know" what they "see and hear", this implies that information can be hidden from them (to keep the game fair). You can let some agents share information and others need to find out by themselves. <br/>
<li><div><strong>Knowledge</strong> – Knowledge is <em>the data</em> to which the AI agent has access, and on which the AI bases its decisions. Realistic agents only "know" what they "see and hear". This implies that information can be hidden from the AI to keep the game fair. You can have an all-knowing AI, or you can let only some AI agents share information, or you let only AI agents who are close know the current state. <br/>
Example: After tripping the wire, all guards with two-way radios start moving towards the player's position within 60 sec, while minor guards don't suspect anything yet.</div>
Example: After the player trips the wire, only a few AI guards with two-way radios start moving towards the player's position, while many other guards don't suspect anything yet.</div>
</li>
</li>
<li><div><strong>Goal Planning</strong> – Planning is about how the agent <em>takes action</em>. Each game agent has the priority to achieve a specific goal, to reach a future state. You split the agent's goal into subgoals, then the agent chooses from available tactics and strategies, and prioritizes them. The agent keeps testing whether the current state is closer to the (sub)goal. If unsuccessful, the agent changes the tactics/strategy and tries again. <br/>
<li><div><strong>Goal Planning</strong> – Planning is about how an AI agent <em>takes action</em>. Each agent has the priority to achieve a specific goal, to reach a future state. When programming, you split the agent's goal into several subgoals. The agent consults its knowledge about the current state, chooses from available tactics and strategies, and prioritizes them. The agent repeatedly tests whether the current state is closer to its goal. If unsuccessful, the agent must discard the current tactics/strategy and try another one. <br/>
Example: An agent searches the best path to reach the player base in a changing environment; an agent chases the player with the goal of eliminating him; an agent hides from the player with the goal of murdering a VIP. </div>
Example: An agent searches the best path to reach the player base in a changing environment, avoiding traps. An agent chases the player with the goal of eliminating him. An agent hides from the player with the goal of murdering a VIP. </div>
</li>
</li>
<li><div><strong>Problem Solving</strong> – Problem solving is about how the agent <em>reacts to interruptions</em>, obstacles that stand between it and its goal. The agent uses a given set of facts and rules to deduct what state it is in – triggered by perceptions similar to pain, agony, boredom, or being trapped. In every state, only a specific subset of reactions makes sense. The actual reaction also depends on the agent's, goal since the agent's reaction must not block its own goal.<br/>
<li><div><strong>Problem Solving</strong> – Problem solving is about how the agent <em>reacts to interruptions</em>, obstacles that stand between it and its goal. The agent uses a given set of facts and rules to deduct what state it is in – triggered by perceptions similar to pain, agony, boredom, or being trapped. In each state, only a specific subset of reactions makes sense. The actual reaction also depends on the agent's, goal since the agent's reaction must not block its own goal!<br/>
Examples: If player approaches, then attack or retreat or raise alarm? If I am idle, do I lay traps or heal self or recharge runes? If danger to own life, then escape or kamikaze?</div>
Examples: If player approaches, does the agent attack or conceal himself or raise alarm? While agent is idle, does he lay traps or heal self or recharge magic runes? If danger to own life, does the agent try to escape or kamikaze?</div>
</li>
</li>
</ul>
</ul>
@ -527,7 +527,7 @@ There are lots of resources explaining interesting AI algorithms:
@ -120,20 +120,32 @@ A Spatial can be transformed, loaded and saved. There are two types of Spatials,
<p>
<p>
Before you start creating your game, you should have completed the <ahref="/com/jme3/gde/core/docs/jme3/beginner.html">Hello World tutorial series</a>. It shows how to load and create Spatials, how to lay out a scene by attaching and transforming Spatials, and how to add interaction and effects to a game.
Before you start creating your game, you should plan your scene graph: Which Nodes and Geometries will you need? Complete the <ahref="/com/jme3/gde/core/docs/jme3/beginner.html">Hello World tutorial series</a> to learn how to load and create Spatials, how to lay out a scene by attaching, detaching, and transforming Spatials, and how to add interaction and effects to a game.
</p>
</p>
<p>
<p>
The <ahref="/com/jme3/gde/core/docs/jme3.html">intermediate and advanced documentation</a> gives you more details on how to put all the parts together to create an awesome 3D game in Java!
The <ahref="/com/jme3/gde/core/docs/jme3.html">intermediate and advanced documentation</a> gives you more details on how to put all the parts together to create an awesome 3D game in Java!
</p>
</p>
</div>
<!-- EDIT6 SECTION "How to Use This Knowledge?" [2680-3212] -->
<h2><a>See also</a></h2>
<div>
<ul>
<li><div><ahref="/com/jme3/gde/core/docs/jme3/advanced/spatial.html">Spatial</a> – More details about working with Nodes and Geometries</div>
</li>
<li><div><ahref="/com/jme3/gde/core/docs/jme3/advanced/traverse_scenegraph.html">Traverse SceneGraph</a> – Find any Node or Geometry in the scenegraph.</div>
@ -48,7 +48,7 @@ Make your game unique and recognizable:
</li>
</li>
<li><div> Vendor: Enter your name (the development team)</div>
<li><div> Vendor: Enter your name (the development team)</div>
</li>
</li>
<li><div> Description: Write one line why your game is the coolest ever <imgsrc="/wiki/lib/images/smileys/icon_wink.gif"class="middle"alt=";-)"/></div>
<li><div> Description: Write one line why your game is the coolest ever <imgsrc="/wiki/lib/images/smileys/icon_wink.gif"class="middle"alt=";-)"/></div>
</li>
</li>
<li><div> Homepage: Enter your web <acronymtitle="Uniform Resource Locator">URL</acronym>, so your fans can find you</div>
<li><div> Homepage: Enter your web <acronymtitle="Uniform Resource Locator">URL</acronym>, so your fans can find you</div>
</li>
</li>
@ -157,7 +157,7 @@ Web Start allows your users to start your application by simply clicking a link
<ol>
<ol>
<li><div> In the Application>Web Start category, check the box to Enable Web Start.</div>
<li><div> In the Application>Web Start category, check the box to Enable Web Start.</div>
</li>
</li>
<li><div> Check the box to make the application self-signed. <imgsrc="/wiki/lib/images/smileys/icon_exclaim.gif"class="middle"alt=":!:"/></div>
<li><div> Check the box to make the application self-signed. <imgsrc="/wiki/lib/images/smileys/icon_exclaim.gif"class="middle"alt=":!:"/></div>
</li>
</li>
<li><div> Optionally, check the box to allow offline use.</div>
<li><div> Optionally, check the box to allow offline use.</div>
<h1><a>jMonkeyEngine SDK: AssetPacks and AssetPack Browser</a></h1>
<div>
<div>
<p>
<p>
AssetPacks are a way to package jME3 compatible assets like models, textures, sounds and whole scenes into a package that contains publisher info, license info, descriptions etc. for all of the assets. An AssetPack basically consists of an <code>assetpack.xml</code> file that describes the content and an <code>assets</code> folder that contains the content. The integrated browser in the jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> allows you to add the assets of installed AssetPacks to any project you are doing.
AssetPacks are a way to package jME3 compatible assets (like models, textures, sounds and whole scenes!) into a package that contains publisher info, license info, descriptions etc. for all of the assets. An AssetPack basically consists of an <code>assetpack.xml</code> file that describes the content and an <code>assets</code> folder that contains the content. The integrated browser in the jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> allows you to add the assets from installed AssetPacks to any jme3 project scene you are working on.
<!-- EDIT2 SECTION "The AssetPack Browser" [564-638] -->
<h3><a>Browsing Assets</a></h3>
<div>
<p>
<p>
The AssetPack browser in jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> makes browsing the installed AssetPacks easy. Browse categories, search for tags and find the right asset for your project. When you have found it, you can add it with one click to your current scene. The AssetPack manager will automagically copy all needed textures, sounds etc. to your projects assets folder.
The AssetPack browser in jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> makes browsing the installed AssetPacks easy. Browse categories, search for tags and find the right asset for your project. When you have found it, you can add it with one click to your current scene. The AssetPack manager will automagically copy all needed textures, sounds etc. to your projects assets folder.
</p>
</p>
<p>
<p>
You can also browse a selection of online assetpacks that are available on jMonkeyEngine.org for download and install them to your jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym>'s AssetPack browser.
<p><div>You can also browse a selection of online assetpacks that are available on jMonkeyEngine.org for download and install them to your jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym>'s AssetPack browser.
</div></p>
</p>
</p>
<p>
<p>
@ -28,11 +36,12 @@ The AssetPack browser uses a predefined directory to store the AssetPacks which
</p>
</p>
</div>
</div>
<!-- EDIT2 SECTION "The AssetPack Browser" [520-1342] -->
<!-- EDIT5 SECTION "Create Your Own AssetPack Project" [2048-2751] -->
<h3><a>Adding Assets</a></h3>
<h3><a>Add Your Own Assets</a></h3>
<div>
<div>
<p>
<p>
@ -137,7 +145,8 @@ If the material file is an Ogre material file (.material) it will be used for lo
</p>
</p>
<p>
<p>
In your AssetPack Project, if you right-click your asset and select "preview asset" you should be able to see your model. If you do, it should work for the user as well.
<p><div>In your AssetPack Project, right-click each asset and select "preview asset" to see your model. Verify hat it looks correctly, because then it should work for other users as well.
You can publish your AssetPacks either as a zip file or directly to jmonkeyengine.org, using your website user name and login. This means other jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> users can download your AssetPacks and install them to their local database right off the AssetPack online packages browser.
You can publish your AssetPacks either as a zip file or directly to jmonkeyengine.org, using your website user name and login. <strong>This means other jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> users can download your AssetPacks and install them to their local database right off the AssetPack online packages browser.</strong>
</p>
</p>
<p>
<p>
To make sure you can upload, you have to be registered on jmonkeyengine.org and have to enter your login info in the AssetPack preferences (jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym>→Settings).
<p><div>To make sure you can upload, you have to be registered on jmonkeyengine.org, and have to enter your login info in the AssetPack preferences: jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym>→Options→Asset Packs first.
</div></p>
</p>
</p>
<ol>
<ol>
<li><div> Right-Click your AssetPack project and select "Publish AssetPack.."</div>
<li><div> Right-Click your AssetPack project in the <acronymtitle="Software Development Kit">SDK</acronym>and select "Publish AssetPack…"</div>
</li>
</li>
<li><div> Check the description etc. settings and press "Next"</div>
<li><div> Check the description etc. settings, and press "Next".</div>
</li>
</li>
<li><div> Select the checkbox for online and/or local publishing and press "finish"</div>
<li><div> Select the checkbox for online and/or local publishing and press "finish".</div>
</li>
</li>
</ol>
</ol>
<div><span>
<div><span>
@ -190,5 +200,5 @@ To make sure you can upload, you have to be registered on jmonkeyengine.org and
You will notice a new file "MyLibrary.xml" is created in the plugins base package and linked to in the layer.xml file. This is basically it, you can configure a version number, license file (should be placed in Module root folder) and more via the Module Properties.
You will notice a new file "MyLibrary.xml" is created in the plugins base package and linked to in the layer.xml file. Additionally the jar file and sources /javadoc are copied into a "release" folder in the project root. This is basically it, you can configure a version number, license file (should be placed in Module root folder) and more via the Module Properties.
@ -9,10 +9,10 @@ Note that the creation of a Module Suite is only necessary if you want to upload
</div>
</div>
<!-- EDIT1 SECTION "Creating a jMonkeyEngine SDK plugin" [1-178] -->
<!-- EDIT1 SECTION "Creating a jMonkeyEngine SDK plugin" [1-178] -->
<h3><a>Using jMonkeyEngine SDK for development (preferred)</a></h3>
<h3><a>Using jMonkeyEngine SDK for development</a></h3>
<div>
<div>
<ul>
<ul>
<li><div> Install the "Netbeans Plugin Development","NetBeans <acronymtitle="Application Programming Interface">API</acronym> Documentation" and "<acronymtitle="Graphical User Interface">GUI</acronym> Builder" plugins via Tools→Plugins</div>
<li><div> Install the "Netbeans Plugin Development" and"NetBeans <acronymtitle="Application Programming Interface">API</acronym> Documentation" plugins via Tools→Plugins</div>
</li>
</li>
<li><div> Create a new "Module Suite" project (can be any name, this will be your local "collection" of plugins that you create)</div>
<li><div> Create a new "Module Suite" project (can be any name, this will be your local "collection" of plugins that you create)</div>
</li>
</li>
@ -32,49 +32,16 @@ Note that the creation of a Module Suite is only necessary if you want to upload
</li>
</li>
<li><div> Enter a "Module Display Name" for your plugin like "My Library"</div>
<li><div> Enter a "Module Display Name" for your plugin like "My Library"</div>
</li>
</li>
<li><div> Check the "Generate <acronymtitle="Extensible Markup Language">XML</acronym> Layer" checkbox</div>
</li>
<li><div> Press Finish</div>
</li>
<li><div> To use core <acronymtitle="Software Development Kit">SDK</acronym> or jME3 functions, add "jMonkeyPlatfom Core" and "jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> Core jME3" via "Module Properties→Library→Add Dependency"</div>
</li>
<li><div> Write your plugin </div>
</li>
</ul>
</div>
<!-- EDIT2 SECTION "Using jMonkeyEngine SDK for development (preferred)" [179-1383] -->
<h3><a>Using NetBeans for development</a></h3>
<div>
<ul>
<li><div> Download the jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> source from svn, then open and compile the project</div>
</li>
<li><div> Create a new "Module Suite" project (can be any name, this will be your local "collection" of plugins that you create)</div>
</li>
<li><div> In the Suites Properties, under "Libraries", press "Add Project" and select the jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> project folder.</div>
</li>
<li><div> Open the suite, right-click the "Modules" folder and select "Add new.."</div>
</li>
<li><div> For "Project Name" enter an all-lowercase name for your plugin without spaces like <code>my-library</code></div>
</li>
<li><div> Make sure the "Project Location" is inside the module suite folder and press "Next"</div>
</li>
<li><div> Enter the base java package for your plugin in "Code Name Base" like <code>com.mycompany.plugins.mylibrary</code></div>
</li>
<li><div> Enter a "Module Display Name" for your plugin like "My Library"</div>
</li>
<li><div> Check the "Generate <acronymtitle="Extensible Markup Language">XML</acronym> Layer" checkbox</div>
</li>
<li><div> Press Finish</div>
<li><div> Press Finish</div>
</li>
</li>
<li><div> To use core <acronymtitle="Software Development Kit">SDK</acronym> or jME3 functions, add "jMonkeyPlatfom Core" and "jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> Core jME3" via "Module Properties→Library→Add Dependency"</div>
<li><div> To use core <acronymtitle="Software Development Kit">SDK</acronym> or jME3 functions, add "<acronymtitle="Software Development Kit">SDK</acronym> Core" and "<acronymtitle="Software Development Kit">SDK</acronym> Core Libraries" via "Module Properties→Library→Add Dependency"</div>
</li>
</li>
<li><div> Write your plugin </div>
<li><div> Write your plugin </div>
</li>
</li>
</ul>
</ul>
</div>
</div>
<!-- EDIT3 SECTION "Using NetBeans for development" [1384-2425] -->
<!-- EDIT2 SECTION "Using jMonkeyEngine SDK for development" [179-1294] -->
@ -83,28 +50,67 @@ If you want your plugin to appear in the "jMonkeyEngine <acronym title="Sof
</p>
</p>
<p>
<p>
<br/>
Effectively its one large module suite with multiple modules which each represent one plugin, extension library.
</p>
</div>
<h4><a>Adding your plugin to the repository</a></h4>
<div>
<p>
To add your plugin to the repository, do the following:
To add your plugin to the repository, do the following:
</p>
</p>
<ul>
<ul>
<li><div> Make sure the plugin is part of a "Module Suite" and that its located in the folder of the suite (this saves you from problems with the svn and local version not being configured the same)</div>
<li><div> Make sure the plugin is part of a "Module Suite" and that its located in the folder of the suite (this saves you from problems with the svn and local version not being configured the same)</div>
</li>
</li>
<li><div> In "Module Properties→Sources" set the "Source Level" to 1.5 if possible (jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> is compatible to Java 1.5)</div>
<li><div> In "Module Properties→Sources"</div>
<ul>
<li><div> Set the "Source Level" to 1.5 if possible (jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> is compatible to Java 1.5)</div>
</li>
</ul>
</li>
</li>
<li><div> In "Module Properties→<acronymtitle="Application Programming Interface">API</acronym> Versioning" set a specification version for your plugin (like 0.8.1)</div>
<li><div> In "Module Properties→<acronymtitle="Application Programming Interface">API</acronym> Versioning"</div>
<ul>
<li><div> Set a specification version for your plugin (like 0.8.1)</div>
</li>
</li>
<li><div> Set the "implementation version" to "0" and select "append implementation versions automatically"</div>
<li><div> Set the "implementation version" to "0" and select "append implementation versions automatically"</div>
</li>
</li>
</ul>
</li>
<li><div> In "Module Properties→Display"</div>
<ul>
<li><div> Enter a purposeful description of your plugin and one of the following categories:</div>
<ul>
<li><div> For a library plugin: "jME3 - Library"</div>
</li>
<li><div> For a <acronymtitle="Software Development Kit">SDK</acronym> plugin: "jME3 - <acronymtitle="Software Development Kit">SDK</acronym> Plugin"</div>
</li>
<li><div> For a model loader plugin: "jME3 - Loader"</div>
</li>
</ul>
</li>
</ul>
</li>
<li><div> In "Module Properties→Build→Packaging"</div>
<ul>
<li><div> Add your name</div>
</li>
<li><div> Add a link to your forum post / home page relating to the plugin</div>
</li>
<li><div> Add a license, you can use <code>../license-jme.txt</code> to insert the default jME BSD license or use a text file you store in the project folder</div>
</li>
</ul>
</li>
<li><div> Ask the managers or developers for access to the gc project</div>
<li><div> Ask the managers or developers for access to the gc project</div>
</li>
</li>
<li><div> Commit <strong>only the module project</strong> to trunk:</div>
<li><div> Commit <strong>only the module project</strong> to trunk:</div>
<ul>
<ul>
<li><div> Right click the Plugin Project and select "Versioning → Import into Subversion Repository"</div>
<li><div> Right click the Module Project and select "Versioning → Import into Subversion Repository"</div>
</li>
</li>
<li><div> Enter <code><objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="https://jmonkeyplatform-contributions.googlecode.com/svn/trunk"><paramname="text"value="<html><u>https://jmonkeyplatform-contributions.googlecode.com/svn/trunk</u></html>"><paramname="textColor"value="blue"></object></code> in the <acronymtitle="Uniform Resource Locator">URL</acronym> field</div>
<li><div> Enter <code><objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="https://jmonkeyplatform-contributions.googlecode.com/svn/trunk"><paramname="text"value="<html><u>https://jmonkeyplatform-contributions.googlecode.com/svn/trunk</u></html>"><paramname="textColor"value="blue"></object></code> in the <acronymtitle="Uniform Resource Locator">URL</acronym> field</div>
</li>
</li>
<li><div> Enter your googlecode username and commit password (different than login pass!) and press "Next"</div>
<li><div> Enter your googlecode username and commit password (different than login pass, you can find your password <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="https://code.google.com/hosting/settings"><paramname="text"value="<html><u>here</u></html>"><paramname="textColor"value="blue"></object>!) and press "Next"</div>
</li>
</li>
<li><div> Check that the "Repository Folder" is <code>trunk/mypluginfolder</code> and enter an import message</div>
<li><div> Check that the "Repository Folder" is <code>trunk/mypluginfolder</code> and enter an import message</div>
</li>
</li>
@ -117,9 +123,29 @@ To add your plugin to the repository, do the following:
<p>
<p>
And thats it, from now on each time you commit changes to your module it will be built and added to the contributions center automatically and the version number will be extended by the svn revision number (e.g. 0.8.1.1234)
And thats it, from now on each time you commit changes to your module it will be built and added to the contributions center automatically and the version number will be extended by the svn revision number (e.g. 0.8.1.1234)
</p>
</div>
<h4><a>Building library jar files on the server</a></h4>
<div>
<p>
As only the module project is being built on the server, any projects that create the actual jar files for library plugins ("normal" projects from the <acronymtitle="Software Development Kit">SDK</acronym>/NetBeans) have to be built from the module build file. To do that simply add the following ant targets to the module build file:
<strong>Note that for the module version number to increase automatically on a commit to the library project, the library project has to be a subfolder of the main module project.</strong>
<!-- EDIT1 SECTION "Welcome to the jMonkeyEngine SDK" [1-47] -->
<h3><a>Getting Started</a></h3>
<div>
<p>
Press the "New Project" button to create a new Project. Press the "New File" button to create new java files, materials, scenes, fonts and other files.
By pressing "F1" you can open the manual which contains up to date tutorials, documentation and more to help you get started. You can search the manual contents via the search field up right.
This (jMonkeyEngine <acronymtitle="Software Development Kit">SDK</acronym> 3.0RC3) is the latest version of the application. You can check for incremental updates to the application via the Help menu: