소스 검색

fix links

mitm001 5 년 전
부모
커밋
7c1be5e8b2

+ 8 - 13
docs/modules/contributions/pages/es/entitysystem/advanced.adoc

@@ -1,10 +1,6 @@
 = JMonkey Entity System Advanced
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
+:revnumber: 2.0
+:revdate: 2020/07/24
 
 
 In this article we explain how the JMonkey Entity System looks like and why.
@@ -32,7 +28,7 @@ Besides after this method call you have a direct access to all added,changed and
 
 === Components
 
-Because components have no other methods except the getter, changes are made by replacing the component of an entity with a new one. Therefore an entity can only have one component of the same class. If a component would have a setter no event would fired and parallel processing would not be possible anymore. 
+Because components have no other methods except the getter, changes are made by replacing the component of an entity with a new one. Therefore an entity can only have one component of the same class. If a component would have a setter no event would fired and parallel processing would not be possible anymore.
 It is important that you only store pure data in the components because otherwise you would no longer know where you can find the logic and the approach of a clear software design would get lost.
 
 
@@ -48,7 +44,7 @@ This is a big mistake because such objects contain logic and in our approach com
 [IMPORTANT]
 ====
 
-Never subclass Component classes. 
+Never subclass Component classes.
 ====
 
 
@@ -56,7 +52,7 @@ Never subclass Component classes.
 === What are Systems?
 
 Simply all objects that use entities/components can be called a system.
-For example <<jme3/advanced/application_states#,AppStates>> can deal with different components and can easily be added to the Application.
+For example xref:core:app/state/application_states.adoc[AppStates] can deal with different components and can easily be added to the Application.
 
 
 [IMPORTANT]
@@ -64,7 +60,7 @@ For example <<jme3/advanced/application_states#,AppStates>> can deal with differ
 Never modify the same component from different systems.
 ====
 
-If two systems are modifying the same components then there is a design flaw. 
+If two systems are modifying the same components then there is a design flaw.
 This is a sign that there is a missing component or system.
 
 
@@ -75,7 +71,7 @@ There are two different ways of storing the information:
 
 === Hashmaps
 
-For every component class a new Hashmap is created which contains the entityId as a key and the component as a value. Therefore if you need to get to know all entities which owns components of a 
+For every component class a new Hashmap is created which contains the entityId as a key and the component as a value. Therefore if you need to get to know all entities which owns components of a
 certain type the system will search in these Hashmaps for same entityIds.
 
 
@@ -110,7 +106,6 @@ Ids are not reused because afterward they would not be unique anymore which woul
 ====
 
 Often people are scared that they would ran out of ids:
-If you create a new entity every nano second you would need roughly 585 years before it wraps. 
+If you create a new entity every nano second you would need roughly 585 years before it wraps.
 
 ====
-

+ 3 - 7
docs/modules/contributions/pages/es/entitysystem/usage.adoc

@@ -1,10 +1,6 @@
 = JMonkey Entity System Usage
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
+:revnumber: 2.0
+:revdate: 2020/07/24
 
 
 
@@ -68,7 +64,7 @@ Entity Set entitySet = entitySystem.getEntitySet(MovementComponent.class, Positi
 
 ----
 
-For the single parts of your programm who deal with special components it is recommended to use <<jme3/advanced/application_states#,AppStates>>.
+For the single parts of your programm who deal with special components it is recommended to use xref:core:app/state/application_states.adoc[AppStates].
 
 
 == Loop through all entities

+ 14 - 18
docs/modules/core/pages/app/multithreading.adoc

@@ -1,11 +1,7 @@
 = Multithreading Optimization
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
+:revnumber: 2.0
+:revdate: 2020/07/24
 :keywords: loop, game, performance, state, states, documentation
-:relfileprefix: ../../
-:imagesdir: ../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 
 
 
@@ -33,11 +29,11 @@ This example does not fetch the returned value by calling `get()` on the Future
 If the processing thread needs to wait or needs the return value then `get()` or the other methods in the returned Future object such as `isDone()` can be used.
 ====
 
-First, make sure you know what <<jme3/advanced/application_states#,Application States>> and <<jme3/advanced/custom_controls#,Custom Controls>> are.
+First, make sure you know what xref:app/state/application_states.adoc[Application States] and <<jme3/advanced/custom_controls#,Custom Controls>> are.
 
 More complex games may feature complex mathematical operations or artificial intelligence calculations (such as path finding for several NPCs). If you make many time-intensive calls on the same thread (in the update loop), they will block one another, and thus slow down the game to a degree that makes it unplayable. If your game requires long running tasks, you should run them concurrently on separate threads, which speeds up the application considerably.
 
-Often multithreading means having separate detached logical loops going on in parallel, which communicate about their state. (For example, one thread for AI, one Sound, one Graphics). However we recommend to use a global update loop for game logic, and do multithreading within that loop when it is appropriate. This approach scales way better to multiple cores and does not break up your code logic. 
+Often multithreading means having separate detached logical loops going on in parallel, which communicate about their state. (For example, one thread for AI, one Sound, one Graphics). However we recommend to use a global update loop for game logic, and do multithreading within that loop when it is appropriate. This approach scales way better to multiple cores and does not break up your code logic.
 
 Effectively, each for-loop in the main update loop might be a chance for multithreading, if you can break it up into self-contained tasks.
 
@@ -47,7 +43,7 @@ Effectively, each for-loop in the main update loop might be a chance for multith
 The java.util.concurrent package provides a good foundation for multithreading and dividing work into tasks that can be executed concurrently (hence the name). The three basic components are the Executor (supervises threads), Callable Objects (the tasks), and Future Objects (the result). You can link:http://download.oracle.com/javase/tutorial/essential/concurrency/[read about the concurrent package more here], I will give just a short introduction.
 
 *  A Callable is one of the classes that gets executed on a thread in the Executor. The object represents one of several concurrent tasks (e.g, one NPC's path finding task). Each Callable is started from the updateloop by calling a method named `call()`.
-*  The Executor is one central object that manages all your Callables. Every time you schedule a Callable in the Executor, the Executor returns a Future object for it. 
+*  The Executor is one central object that manages all your Callables. Every time you schedule a Callable in the Executor, the Executor returns a Future object for it.
 *  A Future is an object that you use to check the status of an individual Callable task. The Future also gives you the return value in case one is returned.
 
 
@@ -55,14 +51,14 @@ The java.util.concurrent package provides a good foundation for multithreading a
 
 So how do we implement multithreading in jME3?
 
-Let's take the example of a Control that controls an NPC Spatial. The NPC Control has to compute a lengthy pathfinding operation for each NPC. If we would execute the operations directly in the simpleUpdate() loop, it would block the game  each time a NPC wants to move from A to B. Even if we move this behaviour into the update() method of a dedicated NPC Control, we would still get annoying freeze frames, because it still runs on the same update loop thread. 
+Let's take the example of a Control that controls an NPC Spatial. The NPC Control has to compute a lengthy pathfinding operation for each NPC. If we would execute the operations directly in the simpleUpdate() loop, it would block the game  each time a NPC wants to move from A to B. Even if we move this behaviour into the update() method of a dedicated NPC Control, we would still get annoying freeze frames, because it still runs on the same update loop thread.
 
 To avoid slowdown, we decide to keep the pathfinding operations in the NPC Control, _but execute it on another thread_.
 
 
 == Executor
 
-You create the executor object in a global AppState (or the initSimpleApp() method), in any case in a high-level place where multiple controls can access it. 
+You create the executor object in a global AppState (or the initSimpleApp() method), in any case in a high-level place where multiple controls can access it.
 
 [source,java]
 ----
@@ -72,12 +68,12 @@ ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(4);
 
 ----
 
-Pool size means the executor will keep four threads alive at any time. Having more threads in the pool means that more tasks can run concurrently. But a bigger pool only results in a speed gain if the PC can handle it! Allocating a pool  that is uselessly large just wastes memory, so you need to find a good compromise: About the same to double the size of the number of cores in the computer makes sense. 
+Pool size means the executor will keep four threads alive at any time. Having more threads in the pool means that more tasks can run concurrently. But a bigger pool only results in a speed gain if the PC can handle it! Allocating a pool  that is uselessly large just wastes memory, so you need to find a good compromise: About the same to double the size of the number of cores in the computer makes sense.
 
 [WARNING]
 ====
 Executor needs to be shut down when the application ends, in order to make the process die properly
-In your simple application you can override the destroy method and shutdown the executor: 
+In your simple application you can override the destroy method and shutdown the executor:
 ====
 
 [source,java]
@@ -140,8 +136,8 @@ public void update(float tpf) {
                 future = null;
             }
         }
-    } 
-    catch(Exception e){ 
+    }
+    catch(Exception e){
       Exceptions.printStackTrace(e);
     }
     if(wayList != null){
@@ -152,7 +148,7 @@ public void update(float tpf) {
 
 Note how this logic makes its decision based on the Future object.
 
-Remember not to mess with the class fields after starting the thread, because they are being accessed and modified on the new thread. In more obvious terms: You cannot change the “desired location of the NPC while the path finder is calculating a different path. You have to cancel the current Future first.
+Remember not to mess with the class fields after starting the thread, because they are being accessed and modified on the new thread. In more obvious terms: You cannot change the "`desired`" location of the NPC while the path finder is calculating a different path. You have to cancel the current Future first.
 
 
 == The Callable
@@ -186,7 +182,7 @@ private Callable<MyWayList> findWay = new Callable<MyWayList>(){
         }).get();
 
         // This world class allows safe access via synchronized methods
-        Data data = myWorld.getData(); 
+        Data data = myWorld.getData();
 
         //... Now process data and find the way ...
 
@@ -201,7 +197,7 @@ private Callable<MyWayList> findWay = new Callable<MyWayList>(){
 === Useful Links
 
 High level description which describes how to manage the game state and the rendering in different threads: +
-link:http://jahej.com/alt/2011_07_03_threading-and-your-game-loop.html[Threading and your game loop]. + 
+link:http://jahej.com/alt/2011_07_03_threading-and-your-game-loop.html[Threading and your game loop]. +
 A C++ example can be found at: +
 link:http://gamasutra.com/blogs/AndreaMagnorsky/20130527/193087/Multithreading_rendering_in_a_game_engine_with_CDouble_buffer_implementation.php[Multithreading-rendering in a game engine with CDouble buffer implementation].
 

+ 2 - 2
docs/modules/core/pages/cinematic/cinematics.adoc

@@ -1,11 +1,11 @@
 = JME3 Cinematics
 :revnumber: 2.0
-:revdate: 2016/07/24
+:revdate: 2020/07/24
 
 
 JME3 cinematics (com.jme.cinematic) allow you to remote control nodes and cameras in a 3D game: You can script and and play cinematic scenes. You can use cinematics to create link:http://en.wikipedia.org/wiki/Cutscene[cutscenes] and movies/trailers for your game. Another good use case is efficient "`destruction`" physics: Playing back prerecorded flying pieces of debris for demolitions is much faster than calculating them with live physics.
 
-Internally, Cinematics are implemented as <<jme3/advanced/application_states#,AppStates>>.
+Internally, Cinematics are implemented as xref:core:app/state/application_states.adoc[AppStates].
 
 Short overview of the cinematic process:
 

+ 1 - 1
docs/modules/core/pages/gui/nifty_gui_java_interaction.adoc

@@ -17,7 +17,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 abstract methods.
 
-*Pro Tip:* Since you are writing a jME3 application, you can additionally make the ScreenController class extend the <<jme3/advanced/application_states#,BaseAppState>> class! This gives the ScreenController access to the application object and to the update loop!
+*Pro Tip:* Since you are writing a jME3 application, you can additionally make the ScreenController class extend the xref:core:app/state/application_states.adoc#baseappstate[BaseAppState] class! This gives the ScreenController access to the application object and to the update loop!
 
 Create an AppState *MyStartScreen*.java file in your package. ( btn:[RMB] click on your package and select `menu:New[Other>JME3 Classes>New BaseAppState]`)
 

+ 2 - 2
docs/modules/core/pages/gui/nifty_gui_scenarios.adoc

@@ -19,7 +19,7 @@ In a JME game, you typically have three game states:
 
 (Aside: Additionally, the Stopped state often contains a LoadScreen, LogonScreen, OptionsScreen, CharacterCreationScreen, HighScoreScreen, CreditsScreen, etc. Some games let you access the OptionsScreen in the Paused state as well. The Running state can also contain an InventoryScreen, ItemShopScreen, StatsScreen, SkillScreen, etc.)
 
-In JME, game states are implemented as custom <<jme3/advanced/application_states#,AppState>> objects. Write each AppState so it brings its own input mappings, rootNode content, update loop behaviour, etc with it.
+In JME, game states are implemented as custom xref:app/state/application_states.adoc[AppStates] objects. Write each AppState so it brings its own input mappings, rootNode content, update loop behaviour, etc with it.
 
 .  Stopped: StartScreen AppState + GuiInputs AppState
 .  Paused: PausedScreen AppState + GuiInputs AppState
@@ -30,7 +30,7 @@ When the player switches between game states, you detach one set of AppStates, a
 
 == Get Access to Application and Update Loop
 
-Since you are writing a jME3 application, you can additionally make any ScreenController class extend the <<jme3/advanced/application_states#,BaseAppState>> class.
+Since you are writing a jME3 application, you can additionally make any ScreenController class extend the xref:core:app/state/application_states.adoc#baseappstate[BaseAppState] class.
 This gives the ScreenController access to the application object and to the update loop!
 
 [source,java]

+ 3 - 8
docs/modules/core/pages/scene/control/custom_controls.adoc

@@ -1,16 +1,11 @@
 = Custom Controls
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../
-:imagesdir: ../..
-:stylesheet: twemoji-awesome.css
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
+:revnumber: 2.0
+:revdate: 2020/07/24
 
 
 A `com.jme3.scene.control.Control` is a customizable jME3 interface that allows you to cleanly steer the behaviour of game entities (Spatials), such as artificially intelligent behaviour in NPCs, traps, automatic alarms and doors, animals and pets, self-steering vehicles or platforms – anything that moves and interacts. Several instances of custom Controls together implement the behaviours of a type of Spatial.
 
-To control global game behaviour see <<jme3/advanced/application_states#,Application States>> – you often use AppStates and Control together.
+To control global game behaviour see xref:app/state/application_states.adoc[AppStates] – you often use AppStates and Control together.
 
 *  link:http://www.youtube.com/watch?v=MNDiZ9YHIpM[Quick video introduction to Custom Controls]