-The com.jme3.app.state.AppState class is a customizable jME3 interface that allows you to control the global game logic ??? the overall game mechanics. (To control the behaviour of a Spatial, see Custom Controls instead. Controls and AppStates can be used together.)
+The com.jme3.app.state.AppState class is a customizable jME3 interface that allows you to control the global game logic, the overall game mechanics. (To control the behaviour of a Spatial, see Custom Controls instead. Controls and AppStates can be used together.)
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/audio.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/audio.html
index cff5fee85..2cab347f4 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/audio.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/audio.html
@@ -50,7 +50,7 @@ AudioNode boom = new AudioNode(assetManager, "Sound/boom.wav", fal
AudioNode Method
Usage
-
getStatus()
Returns either Status.Playing, Status.Stopped, or Status.Paused.
+
getStatus()
Returns either AudioSource.Status.Playing, AudioSource.Status.Stopped, or AudioSource.Status.Paused.
Reverb is a 3D echo effect that only makes sense with positional AudioNodes. Use Audio Environments to make scenes sound as if they were "outdoors", or "indoors" in a large or small room, etc. The reverb effect is defined by the com.jme3.audio.Environment that the audioRenderer is in. See "Setting Audio Environment Properties" below.
-
+
Positional 3D sounds require an AudioListener object in the scene (representing the player's ears).
@@ -135,7 +134,7 @@ setLocalTranslation(???)
Activates 3D audio: The sound appears to come f
-
+
Activates 3D audio: This sound can only be heard from
setOuterAngle()
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!
-
+
Directional 3D sounds require an AudioListener object in the scene (representing the player's ears).
@@ -159,7 +158,7 @@ setOuterAngle()
Set the angle in degrees for the directional audio. The
-
+
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/capture_audio_video_to_a_file.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/capture_audio_video_to_a_file.html
index 321422f5b..3b6e7638c 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/capture_audio_video_to_a_file.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/capture_audio_video_to_a_file.html
@@ -571,7 +571,7 @@ public class Advanced extends SimpleApplication {
public void simpleUpdate(float tpf) {
motionTimer.update();
- if (music.getStatus() != AudioNode.Status.Playing){
+ if (music.getStatus() != AudioSource.Status.Playing){
music.play();
}
Vector3f loc = cam.getLocation();
@@ -600,7 +600,7 @@ The
ConnectionListeners inform the Server about HostedConnection arrivals and removals, e.g. if a client joins or quits.
+
ErrorListeners inform the Client about network exceptions that have happened, e.g. if the server crashes, the client throws a ConnectorException, this can be picked up so that the application can do something about it.
@@ -158,7 +160,7 @@ The server refers to a connected client as com.jme3.network.HostedConnection obj
myServer.getConnection(0)
Server gets the first (0), second (1), etc, connected HostedConnection object (one client).
-
+
Your game can define its own game data based on whatever criteria you want, typically these include player ID and state. If the server needs to look up player/client-specific information, you can store this information directly on the HostedConnection object. The following examples read and write a custom Java object MyState in the HostedConnection object conn:
@@ -175,14 +177,14 @@ Your game can define its own game data based on whatever criteria you want, typi
MyState state = conn.getAttribute("MyState")
Server can read an attribute of the HostedConnection.
@@ -308,21 +310,22 @@ The ID of the Client and HostedConnection are the same at both ends of a connect
... myClient.getId() ...
-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, SpiderMoney will reject it for you, you have no choice in the mater. This is so the client and server can avoid miscommunication.
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).
The com.jme3.network.ClientStateListener notifies the Client when the Client has fully connected to the server (including any internal handshaking), and when the Client is kicked (disconnected) from the server.
+
+
+
+
The ClientStateListener when it receives a network exception applies the default close action. This just stops the client and you'll have to build around it so your application knows what to do. If you need more control when a network exception happens and the client closes, you may want to investigate in a ErrorListener.
+
@@ -395,7 +403,7 @@ The com.jme3.network.ClientStateListener notifies the Client when the Client has
public void clientDisconnected(Client c, DisconnectInfo info){}
Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user.
-
+
First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient's simpleInitApp() method:
@@ -403,7 +411,7 @@ First implement the ClientStateListener interface in the Client class. Then regi
@@ -423,7 +431,7 @@ The com.jme3.network.ConnectionListener notifies the Server whenever new HostedC
public void connectionRemoved(Server s, HostedConnection c){}
Implement here what happens after a HostedConnection has left. E.g. a player has quit the game and the server removes his character.
-
+
First implement the ConnectionListener interface in the Server class. Then register it to myServer in MyGameServer's simpleInitApp() method.
@@ -432,7 +440,55 @@ First implement the ConnectionListener interface in the Server class. Then regis
+
+The com.jme3.network.ErrorListener is a listener for when network exception happens. This listener is built so that you can override the default actions when a network exception happens.
+
+
+
+
If you intend on using the default network mechanics, don't use this!
+If you do override this, make sure you add a mechanic that can close the client otherwise your client will get stuck open and cause errors.
+
+
+
+
+
+
ErrorListener interface method
Purpose
+
+
+
public void handleError(Client c, Throwable t){}
Implemenent here what happens after a exception affects the network .
+
+
+
+
+
+
This interface was built for the client and server, but the code has never been put on the server to handle this listener.
+
+
+
+
+First implement the ErrorListener interface in the client class. Then you need to register it to myClient in MyGameClients's simpleInitApp() method.
+
+
myClient.addErrorListener(this);
+
+
+In the class that implements the ErrorListener, a method would of been added call handleError(Client s, Throwable t). Inside this method to get you started, you going to want to listen for an error. To do this you're going to want a bit of code like this.
+
+
if(t instanceof exception) {
+ //Add your own code here
+}
+
+
+Replace exception part in the if statement for the type of exception that you would like it to handle.
+
+
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui.html
index 4a9fdd813..52a536314 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui.html
@@ -154,10 +154,16 @@ Learn more from the NiftyGUI page:
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_java_interaction.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_java_interaction.html
index 65166b537..d2ad0dba8 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_java_interaction.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_java_interaction.html
@@ -26,7 +26,7 @@ In the previous parts of the tutorial, you created a two-screen user interface.
-To let a Nifty screen communicate with the Java application, you register a ScreenController to every NiftyGUI screen. You create a ScreenController by creating a Java class that implements the de.lessvoid.nifty.screen.ScreenController interface and its abtract methods.
+To let a Nifty screen communicate with the Java application, you register a ScreenController to every NiftyGUI screen. You create a ScreenController by creating a Java class that implements the de.lessvoid.nifty.screen.ScreenController interface and its abstract methods.
@@ -100,7 +100,7 @@ Now the Java class MyStartScreen and this
+
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_scenarios.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_scenarios.html
index ca47d84bf..d6ec99bd6 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_scenarios.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_scenarios.html
@@ -104,8 +104,22 @@ public StartScreenState(SimpleApplication app){
}
+
+
+
It is not sufficient to just inherit from AbstractAppState. You need to instantiate your controller class, register it with app's stateManager and then pass it to nifty. See code sample below.
+
+
+
public class TestNiftyGui extends SimpleApplication {
+ public void simpleInitApp() {
+ StartScreenState startScreenState = new StartScreenState(this);
+ stateManager.attach(startScreenState);
+ // [...] boilerplate init nifty omitted
+ nifty.fromXml("Interface/myGui.xml", "start", startScreenState); //one of the XML screen elements needs to reference StartScreenState controller class
+ }
+}
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_xml_layout.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_xml_layout.html
index 5450391f5..81fa57af9 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_xml_layout.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/nifty_gui_xml_layout.html
@@ -100,7 +100,7 @@ The following minimal XML
<?xml version="1.0" encoding="UTF-8"?><nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd">
+ xsi:schemaLocation="http://nifty-gui.sourceforge.net/nifty-1.3.xsd"><screen id="start">
<!-- ... -->
</screen>
@@ -118,7 +118,7 @@ Every Nifty GUI must have a
-
+
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/physics.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/physics.html
index 4da7e2e78..d2af4ff00 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/physics.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/physics.html
@@ -360,12 +360,12 @@ Click the links for details on the special PhysicsControls. This article is abou
-
-The PhysicsControl constructors expect a Collision Shape and a mass (a float in kilogram). The most commonly used PhysicsControl is the RigidBodyControl:
+The most commonly used physics control is RigidBodyControl. The RigidBodyControl constructor takes up to two parameters: a collision shape and a mass (a float in kilograms). The mass parameter also determines whether the object is dynamic (movable) or static (fixed). For a static object such as a floor or wall, specify zero mass.
@@ -373,7 +373,7 @@ The PhysicsControl constructors expect a Collision Shape and a mass (a float in
new RigidBodyControl( myDungeon_shape , 0.0f ); // static
-
When you create the PhysicsControl, the mass value makes an important distinction: Set the mass to a non-zero value to create a dynamic object that can fall or roll, etc. Set the mass value to zero to create a static object, such as floor, wall, etc. If you give your floor a mass, it will fall out of the scene!
+
If you give your floor a non-zero mass, it will fall out of the scene!
@@ -395,10 +395,11 @@ gameLevel.addControl(new RigidBodyControl(0.0f)); // explicit ze
Spheres and Boxes automatically fall back on the correct default CollisionShape if you do not specify a CollisionShape in the RigidBodyControl constructor. Complex static objects can fall back on MeshCollisionShapes, unless it is a Node, in which case it will become a CompoundCollisionShape containing a MeshCollisionShape
The amount of motion in 1 physics tick to trigger the continuous motion detection in moving objects that push one another. Rarely used, but necessary if your moving objects get stuck or roll through one another.
@@ -553,7 +554,7 @@ This setting has an impact on performance, so use it sparingly.
Brick:
Rubber ball: 1.0f
-
+
On a RigidBodyControl, you can apply the following physical forces:
@@ -574,9 +575,9 @@ On a RigidBodyControl, you can apply the following physical forces:
(See detailed explanation below.)
-
+
-
+
@@ -687,7 +688,7 @@ Use the following methods to move dynamic physical objects.
clearForces()
Cancels out all forces (force, torque) etc and stops the motion.
-
+
It is technically possible to position PhysicsControls using setLocalTranslation(), e.g. to place them in their start position in the scene. However you must be very careful not to cause an "impossible state" where one physical object overlaps with another! Within the game, you typically use the setters shown here exclusively.
@@ -727,7 +728,7 @@ removeCollideWithGroup(COLLISION_GROUP_01)
Collision Groups are integer
setCcdSweptSphereRadius(.5f)
Bullet does not use the full collision shape for continuous collision detection, instead it uses a "swept sphere" shape to approximate a motion, which can be imprecise and cause strange behaviors such as objects passing through one another or getting stuck. Only relevant for fast moving dynamic bodies.
-
+
You can setApplyPhysicsLocal(true) for an object to make it move relatively to its local physics space. You would do that if you need a physics space that moves with a node (e.g. a spaceship with artificial gravity surrounded by zero-g space). By default, it's set to false, and all movement is relative to the world.
@@ -735,7 +736,7 @@ removeCollideWithGroup(COLLISION_GROUP_01)
Sets At what depth the refraction color extincts. The three values are RGB (red, green, blue) in this order. Play with these parameters to "muddy" the water.
Vector3f(5f,20f,30f)
-
+
Water method example
Effects: Shore
Default
@@ -216,7 +216,7 @@ water.setRadius(260);
Limit the water filter to a semisphere with the gi
water.setUseHQShoreline(false);
Renders shoreline with better quality ?
true
-
+
Water method example
Effects: Foam
Default
@@ -234,7 +234,7 @@ water.setRadius(260);
Limit the water filter to a semisphere with the gi
manager.loadTexture("Textures/foam.png") )
This foam texture will be used with WrapMode.Repeat
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/terrain.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/terrain.html
index c092e2096..28a753092 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/terrain.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/terrain.html
@@ -7,14 +7,14 @@
The goal of TerraMonkey is to provide a base implementation that will be usable for 80% of people's goals, while providing tools and a good foundation for the other 20% to build off of. Check out the videos in the following announcements:
@@ -185,7 +185,7 @@ Here are the names of TerrainLighting.j3md's material properties:
-Video cards support a maximum of 16 Splat textures total. This means you can only use a subset of material properties at the same time!
+OpenGL supports a maximum of 16 samplers in any given shader. This means you can only use a subset of material properties at the same time if you use the terrain's default lighting shader (TerrainLighting.j3md)!
@@ -237,7 +237,7 @@ You can hand-paint Alpha, Diffuse, Glow, and Specular maps in a drawing program,
\ No newline at end of file
diff --git a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/walking_character.html b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/walking_character.html
index 80bebd27d..362551789 100644
--- a/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/walking_character.html
+++ b/sdk/jme3-documentation/src/com/jme3/gde/docs/jme3/advanced/walking_character.html
@@ -419,6 +419,15 @@ This method resets the walk animation.
}
public void onAnimChange(AnimControl control, AnimChannel channel, String animName) { }
+
+
+
+