ソースを参照

Removed stale content on scripting with groovy.

mitm 5 年 前
コミット
c2b8b87b47

+ 0 - 3
src/docs/asciidoc/jme3.adoc

@@ -324,9 +324,6 @@ Now that you understand the concepts, it's time to make the most of the jMonkeyE
 *  <<sdk/application_deployment#,Application Deployment (using jMonkeyEngine SDK)>>
 *  <<jme3/webstart#,WebStart Deployment (without jMonkeyEngine SDK)>>
 
-=== Scripting
-
-*  <<jme3/scripting#, Groovy scripting>>
 
 === Virtual Reality &amp; Simulation
 

+ 0 - 81
src/docs/asciidoc/jme3/scripting/groovy/ai.adoc

@@ -1,81 +0,0 @@
-= ai
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../../
-:imagesdir: ../../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-
-== Finite State Machine
-
-What is the most simple but affective techique to make AI. It's FSM
-
-[source,java]
-----
-code
-----
-
-
-== Decision Tree
-
-Builder
-
-[source,java]
-----
-code
-----
-
-
-== Pattern Matching
-
-Regexp
-
-[source,java]
-----
-code
-----
-
-
-== Simple Chatbot
-
-Builder + Closure
-
-
-[source,java]
-----
-code
-----
-
-
-== Simple Goalbase Agent
-
-
-
-[source,java]
-----
-code
-----
-
-
-== Simple Path finding
-
-Use Groovy extension
-
-
-
-[source,java]
-----
-code
-----
-
-
-== Simple Steering behavior
-
-
-
-[source,java]
-----
-code
-----

+ 0 - 53
src/docs/asciidoc/jme3/scripting/groovy_basicscripts.adoc

@@ -1,53 +0,0 @@
-= groovy_basicscripts
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../
-:imagesdir: ../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-Rotate the wheel
-
-[source,java]
-----
-code
-----
-
-+++<u>Explain:</u>+++
-
-Travel a tree
-
-[source,java]
-----
-code
-----
-
-+++<u>Explain:</u>+++
-
-Queue a task
-
-[source,java]
-----
-code
-----
-
-+++<u>Explain:</u>+++
-
-GroovyAppState
-
-[source,java]
-----
-code
-----
-
-+++<u>Explain:</u>+++
-
-ClosureCondition
-
-[source,java]
-----
-code
-----
-
-+++<u>Explain:</u>+++

+ 0 - 129
src/docs/asciidoc/jme3/scripting/groovy_event.adoc

@@ -1,129 +0,0 @@
-= groovy_event
-:author:
-:revnumber:
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../
-:imagesdir: ../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-
-== Event - Trigger - Manager
-
-Event , Trigger , Manager are the 3 most important terms in game programming and scripting that worth to mention in the first place!
-
-
-=== Event
-
-Event is the core element (concept) and the unit of the Messaging System. When components in the game world communicate with each other through pipelines, Messages from one object need to be sent to other objects should also aware of it (to nofity) when some thing happen that. It's called an event; and inside of the event contain piece of imformations that describe the Message.
-
-If Scripting, Event play important role too. It's almost shown up in EventHook to the cycle as: onInit, onUpdate, onClick.. It also provide ad-hoc communicate which in turn enable additional complex and flexible usage to existed systems. We will go deep into its usages later.
-
-
-==== EventBus
-
-Event paradigm is implemented differently in every software that require it, to fit with the specific requirements. Recently we (Java world) have something quite generic that suite for wide range of cases and use intuitive methods to program. It's called EventBus. And fortunately , EventBus fit very well with Groovy scripting solution (kudos!)
-
-…and few Event concepts Explained!
-
-link:http://code.google.com/p/guava-libraries/wiki/EventBusExplained[http://code.google.com/p/guava-libraries/wiki/EventBusExplained]
-
-link:http://codingjunkie.net/guava-eventbus/[http://codingjunkie.net/guava-eventbus/]
-
-
-==== Groovy Eventbus HelloWorld
-
-[source,java]
-----
-
-import com.google.common.eventbus.EventBus
-import com.google.common.eventbus.Subscribe
-
-EventBus eventBus = new EventBus();
-
-class EventHandler{
-    @Subscribe
-    public void hello(CustomEvent event){
-        println "Hello world"
-    }
-}
-
-class CustomEvent{
-
-}
-handler = new EventHandler();
-eventBus.register(handler);
-
-eventBus.post(new CustomEvent());
-
-----
-
-In this example,
-
-Here, EventBus will play the communicate media in our Groovy scripting solution.
-
-
-==== Hooks
-
-
-=== Trigger
-
-If you build up your game world's activites from Action, Trigger is the brick to build Gameplay. It's the combination of : Event + Condition → Action
-
-The concept of trigger can be describle like this: When an Event happen, if it's passed a Condition check, the Action is taken. A more detailed description envolve: the Enviroment - a specific Context of those 3 (E - C - A), Durations , Threaded or not, Executor … But here we concern the most simple form, the Context is the single specific that procedure the Event and its Global awareness.
-
-In Groovy,
-
-*  Event is Class based, mentioned in the chapter above.
-*  Condition can be modeled with a Closure
-*  Action also very suitable with a Closure representation.
-
-
-==== Example1:
-
-[source,java]
-----
-
-Example1:
-
-----
-
-
-===== Example2:
-
-[source,java]
-----
-
-Example2:
-
-----
-
-
-=== Manager
-
-Manager is the concept of who have responsibities and power over others (as its children or employee in the real world), essentially it is a list of its children, and have basic opertions like add,remove to manage that list… You can also think about it as the Control of the MVC paradigm where it is the mediator between Model and View. In JME3, you see Manager every where such as AssetManager, StateManager as the wraper of underlying functions. So, event mixed up quite a lot concepts at once, Manager in Scripting is extremely useful and fullfill the missing piece of the picture we are painting for a while here.
-
-To clean the mist of confusion about mixed of concepts a little bit, there are some practical wisdoms about Manager implementation:
-
-*  Manager acts globally, handy: usually a Singleton, or really easy to reference in script
-**  Manager wrap underlying details in intuitive way
-**  Manager share common informations
-**  Manager executions are frequently : like in an default update cycle
-**  Manager have power over its children : its handle it children; in almost scenarios child has left its Manager's list come hollow (as null)
-
-All the concepts and wisdoms is describes much more detail in Atom framework Design <<jme3/advanced/atom_framework/design#, Game architecture &amp; Design>>
-
-
-=== GQuery
-
-GQuery stand for “JQuery like in Groovy. JQuery is a famous framework in the JavaScript and Web world. GQuery try to provide some of its features, immtimate its syntax and sugars, leverage by Groovy:
-
-*  Query, select a Node Tree (like +++<abbr title="HyperText Markup Language">HTML</abbr>+++, Nifty elements,…) with a minimal Path syntax , same as XPath
-*  Hooks to Node's (components, elements..) events with Eventbus
-
-GQuery is a part of my additions for NiftyGUI, others are:
-
-*  a Groovy builder
-*  a +++<abbr title="Cascading Style Sheets">CSS</abbr>+++ (Cascaded Style Sheet) implementation (for NiftyGUI), even a LESS
-*  a simplier Localization framework
-*  a lot of scripting and functional sugar for NiftyGUI

+ 0 - 122
src/docs/asciidoc/jme3/scripting/groovy_learn.adoc

@@ -1,122 +0,0 @@
-= groovy_learn
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../
-:imagesdir: ../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-
-== LEARN GROOVY
-
-
-=== Syntax
-
-Groovy's syntax can be made far more compact than Java. For example, a declaration in Standard Java 5+ such as:
-
-[source,java]
-----
-
- for (String it : new String[] {"Rod", "Carlos", "Chris"})
-     if (it.length() <= 4)
-         System.out.println(it);
-
-----
-
-can be expressed in Groovy as:
-
-[source,java]
-----
-
- ["Rod", "Carlos", "Chris"].findAll{it.size() <= 4}.each{println it}
-
-----
-
-What you see in the parentheses \{ \} is a magical *Closure * . What make Groovy so powerful compare to Java!
-We will learn about it later.
-
-
-==== Official syntax description
-
-link:http://groovy-lang.org/For+those+new+to+both+Java+and+Groovy[http://groovy-lang.org/For+those+new+to+both+Java+and+Groovy]
-
-link:http://groovy-lang.org/User+Guide[http://groovy-lang.org/User+Guide]
-
-link:http://groovy-lang.org/Logical+Branching[http://groovy-lang.org/Logical+Branching]
-
-link:http://groovy-lang.org/Looping[http://groovy-lang.org/Looping]
-
-For your overview, I will introduce the most important syntax of the language:
-
-
-==== Logical Branching
-
-
-==== Looping
-
-
-==== Operation
-
-
-=== Highlight language features
-
-Beside with elegant syntax, Groovy has features you always wish that Java have, below paragraph will call out few features that actually help a lot in Game programming:
-
-
-==== Operation overload
-
-
-==== Collections
-
-
-==== Reflection
-
-
-=== Closure
-
-Read more about it here:
-
-link:http://groovy-lang.org/Closures[http://groovy-lang.org/Closures]
-link:http://groovy-lang.org/Closures+-+Informal+Guide[http://groovy-lang.org/Closures+-+Informal+Guide]
-link:http://groovy-lang.org/Closures+-+Formal+Definition[http://groovy-lang.org/Closures+-+Formal+Definition]
-
-What is a *Closure*?
-
-A Groovy Closure is like a “code block or a method pointer. It is a piece of code that is defined and then executed at a later point. It has some special properties like implicit variables, support for currying and support for free variables (which we'll see later on). We'll ignore the nitty gritty details for now (see the formal definition if you want those) and look at some simple examples.
-Simple Example
-
-[source,java]
-----
-
-def clos = { println "hello!" }
-
-println "Executing the Closure:"
-clos()                          //prints "hello!"
-
-----
-
-Note that in the above example, “hello! is printed when the Closure is called, not when it is defined.
-
-
-=== and Gotchas
-
-link:http://groovy-lang.org/Differences+from+Java[http://groovy-lang.org/Differences+from+Java]
-
-
-=== Meta-programming
-
-Here come the Good! For those who remember the power of JavaScript’s prototype keyword, you can do them same with Groovy. For those who don’t even know what JavaScript is, Meta-programming is the way to expand the class with methods and attributes on the fly. 
-
-
-=== Groovy Builder – SwingBuilder
-
-Groovy use a lot power the of Builder pattern.
-
-In the snippets below I will show you write a few builders to speed up your JME code. The full list of Builder come in Part3 and 4.
-
-
-=== Language comperation
-
-
-==== JavaScript comperation

+ 0 - 17
src/docs/asciidoc/jme3/scripting/snippets.adoc

@@ -1,17 +0,0 @@
-= snippets
-:author: 
-:revnumber: 
-:revdate: 2016/03/17 20:48
-:relfileprefix: ../../
-:imagesdir: ../..
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
-
-
-
-== Replace almost the configuration
-
-
-== Extract infos from XML and text, web…
-
-
-== Convert RenderMonkey, FXComposer shaders