Recently, I want to play the game AI. I saw something about the behavior tree, because I used the Java, so I mainly looked at JBT:
This is divided into two parts: editor JBTEditor and core library JBTCore. After editing in JBTEditor, export the XML file; the project code loads XML through the JBTCore library, and then drives the execution of the tree.
Well, the reason for using open source is lazy editor. Play JBTEditor first.
Do not walk do not know, a walk is all the pit. JBTEditor is based on Eclipse RCP development, did not do this, can only feel the stones across the river.
Download a latest version of Eclipse
According to the official instructions, import the project, open “bteditor.product”, and then “Launch an Eclipse application”, simply hang up.
In a fog, the Baidu is not the same. Initially doubt the issue of JDK version and eclipse version, because this project has not been updated since 2013.
Download jdk1.7, JDK1.6, eclipse2013 version, eclipse2014 version one by one. All kinds of combinations, all failed.
Right click “bteditor.product”, “Run as”, “Run configurations”,
When you hook up, you will check the plug-in dependency when you start, or click the “Validate Plug-ins” on the right. You will also report missing cases.
According to the tip, hook up “org.eclipse.emf.*” and “org.eclipse.ui.views.*” plug-ins, start again, success!
The editor will eventually be used by the planning students. They can not be allowed to work on IDE and export executable files.
Right button “bteditor.product”, “Export”,
Select “Eclipse product”, “next”,
Specify the output directory, and what else does not change, “Finish”
Execute editor\eclipse\JBTEditor.exe, uh, um, wrong again…
After studying for half a day, it was found that plugin had a problem of loading time, that is, StartLevel.
Here you can add the correct startLevel with “Add Recommended”, and the exported exe can be used.
Let’s sum up.
- Importing JBTEditor project with Eclipse for RCP
- Open the “bteditor.product” and “Configuration” tab to adjust the StartLevel of plugin.
- Cut back “Overview”, “Launch an Eclipse application”, and report a mistake.
- Enter the startup configuration item, hook up the required plug-ins and start again.
- Exporting executable files
First written to here, follow up.