Questions regarding Initial AI Integration

Howdy all,

I've been following jME's development for a while now, but recently I've noticed that a full game development environment is being developed which interests me greatly.



My question here is in regard to what kind of base level framework is in place for controlling NPC entities within a game. When looking at earlier incarnations of the monkey engine, it seemed to be mainly a rendering engine, whereas I'm looking for more of a full game environment. I'll give a little background on what I do, which might make what I'm looking for more clear.



I've got a development environment, written fully in Java, which provides a visual hierarchical task decomposition languge. It lends itself very well to behavior modeling, and AI development, in that it's easy to use (even for non-developer types) while also providing essentially unlimited capabilities through a large set of predefined functionality as well as language extension features. In addition, during runtime you can actually watch the task hierarchies execute, providing a visual trace of what is happening in the behavior while it executes, as well as insight into parameter values and how they're changing over time. This tends to greatly ease the debugging process for NPC behaviors, which can normally be quite painstaking.



So I've got a capable tool for making behaviors to deploy into bots/agents within a game environment, so the issue becomes finding a game which provides the integration capabilities required to drive entities within the game world.



In the past, I've hooked our behavior models into games like Neverwinter Nights (1 and 2), Valve's Source engine, various simulation environments, the old Robocode environment made by Alphaworks, as well as some privately developed non-commercial simulation environments.



Neverwinter nights provided one of the best environments for behavior modeling, despite having to jump through a ton of hoops to connect to their game, by virtue of the large library of NPC AI Functions that are made available. Obviously, I'd prefer integrating with a java based game, to avoid the issues with having to communicate between our native language (Java) and the language of the game environment (which is usually C or C++). This leads into my question here.



"Out of the box," what kind of NPC support exists within the jME and GDC? The basics that I'm looking for are things like an NPC that can exist in the world, and functions to make it move around the environment, maybe play animations, etc. This stuff is normally in the "game rules" rather than the rendering stuff. In the past, we've hooked our stuff up to the jME, and had our behavior models manipulate 3d objects in the scene, but this is much lower level than we'd really like to operate.



I looked around the site, but couldn't easily find an answer to these questions (although the answer may simply be, "We don't have that"). I'd greatly appreciate any direction in this regard from anyone here who may have more information about NPCs within the environment.



Thanks

Hi, sorry I missed your post here.



There is currently no support for AI/NPCs/Game Entitys whatsoever in jme3 as its essentially a scenegraph right now. So everything would have to be created from scratch. Still, we are interested in integrating this functionality sooner or later so your input on the topic is very welcome.



NPC's are something that will probably be implemented in quite specific game type "templates" and I am not sure right now if there will be a base class for all of them but probably yes. Also, we are thinking about integrating AI functions like task decomposition to the base engine in some pluggable kind of form.



What you say about your visual task decomposition tool sounds very nice, I think a contribution like that would be something that would boost the development in that direction immensely :wink: But as said, even some small recommendations or contributions are very welcome.



Cheers,

Normen

Well, a good place to start in terms of functionality which would be a good start for enabling NPC AI would be the functions provided in Bioware's Neverwinter Night toolset. They set up a large set of functions which enable intelligent behaviors to be defined.



Initially, you'd be talking about basics like being able to move an entity to a given location. Eventually, it'd be good to incorporate things like sensory input, such as what entities a given NPC can see in its field of view.

I have to disagree on the NWN set of functions for a character. That is very RPG/MMO specific. Imagine a game that only has "entitys" that move up and down… For this purpose the NWN set of functions would simply be too much and specific… Thats one of the main concerns for jme3 and integration of more game functions. It still has to be completely flexible.

So navigating an environment and getting feedback will surely have to be integrated in some base class but in a more general context than it is done in NWN…

Cheers,

Normen

normen said:
Thats one of the main concerns for jme3 and integration of more game functions. It still has to be completely flexible.
Either that, or when delving into a more game specific feature such as AI (features like physics and terrain editing might also be involved here), there'd be several very basic yet different AI implementations for a selection of pre-made game frameworks, like we've discussed briefly earlier. That way, instead of embarking on the very difficult task of making one solution that fits all (in terms of AI and terrain at least, this is impossible, and the best one can do is make something that will fit most, especially sufficient for prototyping) we'd offer the most common development formulas as an easy starting point.
erlend_sh said:

Either that, or when delving into a more game specific feature such as AI (features like physics and terrain editing might also be involved here), there'd be several very basic yet different AI implementations for a selection of pre-made game frameworks, like we've discussed briefly earlier. That way, instead of embarking on the very difficult task of making one solution that fits all (in terms of AI and terrain at least, this is impossible, and the best one can do is make something that will fit most, especially sufficient for prototyping) we'd offer the most common development formulas as an easy starting point.

Exactly.

From experience, NWN's AI function set really isn't RPG/MMO specific at all. Certainly sections of it are, but a large chunk of it constitutes a fairly broad set of functions which are applicable to virtually any environment in which you want to employ autonomous agents.



After developing bots for various simulation and game environments, I've found that some subset of that API must always be developed, and the more of it which exists, the more robust the agents are.



If a game only has entities which move up and down, well… then they don't really need any significant AI system. They're just switches.



Certainly, if a game doesn't need an AI subsystem, then it won't benefit from having one. But if you want to have autonomous agents, then you're going to need a certain set of functions which enable those agents to perceive the world and act within it.



Minimally, that set will tend to require sensors and actuators. You need to be able to perceive objects and entities around you, get information about those entities, and then move about the world and interact with other objects.



Of course, if the jME doesn't intend to ever actually produce any game rules, and really just exist as a rendering/physics engine, then it may be that this type of stuff really is too specific. I wouldn't say that it's necessarily RPG/MMO speciifc, as the FPS genre would tend to also use the same types of capabilities.



However, this is part of the issue that I've had with the jME in the past. While it's nice that it's so general, it'd be far more useful for me if it came with some more specific stuff out of the box. I'm not particularly interested in actually making all of the underlying framework for the game rules, and I'd rather I could just start up a world, drop a bunch of bots and objects into it, and start it up. If I wanted flexibility, I would think that one could accomplish that just by setting up default implementations of interfaces to provide out of the box flexibility, while being able to allow the user to develop other implementations if they wanted to replace some of that functionality with different stuff for their own project.



I realize though that my personal needs are quite specific, and it might just not be a good match. But I'll keep following its development, as I've always been interested in the project.



Thanks