Tag:游戏 行为树
Category:行为树游戏开发
Article From:https://www.cnblogs.com/gongziyiyi/p/9122790.html

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:

https://github.com/gaia-ucm/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.

  1. Importing JBTEditor project with Eclipse for RCP
  2. Open the “bteditor.product” and “Configuration” tab to adjust the StartLevel of plugin.
  3. Cut back “Overview”, “Launch an Eclipse application”, and report a mistake.
  4. Enter the startup configuration item, hook up the required plug-ins and start again.
  5. Exporting executable files

First written to here, follow up.

Link of this Article: Research behavior tree JBT

Leave a Reply

Your email address will not be published. Required fields are marked *