Archived

This topic is now archived and is closed to further replies.

Ferretman

November Game AI Poll

Recommended Posts

Hello Everybody: Well, it took forever (huge demo for People I Can't Mention) but I finally got a new poll for November up on the Game AI site. This month's poll asks developers what language are they using to build their AI--the "standard" C/C++, Java, or something else? I'd love to hear what you're using--I get this question a lot and the field is always evolving. Thanks for your time! Ferretman
ferretman@gameai.com www.gameai.com
From the High Mountains of Colorado
Edited by - Ferretman on November 9, 2001 11:28:36 PM

Share this post


Link to post
Share on other sites
Although I have always used C/C++ for all my professional work, I recently had to implement an idea that wasn''t certain to work having only just joined a new company.
I won''t go into details but the 3D engine at the time had no line drawing facility, the debugger was terrible (and I was new to it), the game compile and load times were considerable (especially touching certain header files I had no option but to touch) and I was new to the code base, which was 10 months down the line.
In the end I implemented the idea in a java testbed, using my own codebase from previous personal work, to check the idea was sound using tools I knew well. It was up and running within a few days and much of the code could be quickly copied (with obvious adjustments and rewriting where necessary) from Java to C++ for use in the actual game. Beyond that, as the idea that was being implemented was for optimisation of certain pathfinding ideas that weren''t designed to make obvious visible changes to the game, having the Java testbed with line drawing was useful when it came to showing the milestone to our external producer and explaining why I''d spent so much time on it.

The game engine now loads in a fraction of the time and I know the code and company tools a lot better (line drawing is still on its way), so I may not do this kind of testbed again, but its good to have the option.

Mike

Share this post


Link to post
Share on other sites
quote:
Original post by Ronin_54
I use C++. Simply because it can do everything I need, and I know how to work swiftly with it :-)


That's pretty much the same situation I've found myself in too. I know C/C++ and they work (and they've gotten much more dependable since STL) and haven't really needed to mess with anything else. I've always kinda wanted to dabble with Java but never really had the need or the time.




Ferretman

ferretman@gameai.com
www.gameai.com

From the High Mountains of Colorado



Edited by - Ferretman on November 10, 2001 11:43:40 AM

Share this post


Link to post
Share on other sites
quote:
Original post by MikeD
In the end I implemented the idea in a java testbed, using my own codebase from previous personal work, to check the idea was sound using tools I knew well. It was up and running within a few days and much of the code could be quickly copied (with obvious adjustments and rewriting where necessary) from Java to C++ for use in the actual game. Beyond that, as the idea that was being implemented was for optimisation of certain pathfinding ideas that weren't designed to make obvious visible changes to the game, having the Java testbed with line drawing was useful when it came to showing the milestone to our external producer and explaining why I'd spent so much time on it.

The game engine now loads in a fraction of the time and I know the code and company tools a lot better (line drawing is still on its way), so I may not do this kind of testbed again, but its good to have the option.

Mike


Yeah, I think a lot of developers don't give enough thought to testing out their ideas using some other language or approach--if the game isn't ready [[]they aren't, and that's just not right. I know of at least two developers (myself included) who often "prototype" the AI and get its interfaces down using pure ASCII text files and simple 2D displays. If they work right there and I can define the interfaces that the other programmers are supposed to call, I can still work out the kinks and be testing without major portions of the game being active.

It's cool you've got that option, Mike.




Ferretman

ferretman@gameai.com
www.gameai.com

From the High Mountains of Colorado



Edited by - Ferretman on November 10, 2001 11:44:12 AM

Share this post


Link to post
Share on other sites
Hrm, well, my realtime games are still in C++, although I don''t use templates, or operator overloading. Basicly, my C++ code looks like Java code. I don''t use any C++ features not found in Java (as prescribed).

Now, all my _tools_ are written in Java. The AWT GUI system is quite nice for editors of all sort, rapid development of GUI applications. I would also write converters/parsers and generators in Java, in other words, non-real time apps: Java, realtime apps: C++..

--bart



Share this post


Link to post
Share on other sites
quote:
Original post by Ferretman
I know C/C++ and they work (and they''ve gotten much more dependable since STL) and haven''t really needed to mess with anything else. I''ve always kinda wanted to dabble with Java but never really had the need or the time.

Is there any point trying Java for AI when you have C/C++? Not that I''m saying Java is a useless language - far from it - but I would think that it wouldn''t offer any AI-related benefits over any other similar procedural/OO language, such as C++. I''d think that playing with Prolog or Lisp could be more useful, but then I''m not much of an expert

Share this post


Link to post
Share on other sites
My 2 cents worth...

I do almost all of my AI prototyping using Matlab, mainly because I can easily interface any existing C and/or C++ code into my Matlab project and because it provides both complex mathematical tools along with GUI tools. Many AI ideas that would otherwise take many pages of code are easily implemented in a few lines in Matlab.

Of course I must add that none of my AI work as gone into a production game. This doesn''t mean that others would not benefit from investigating Matlab for AI development.

Cheers,

Timkin

Share this post


Link to post
Share on other sites
quote:
Original post by Kylotan
Is there any point trying Java for AI when you have C/C++? Not that I''m saying Java is a useless language - far from it - but I would think that it wouldn''t offer any AI-related benefits over any other similar procedural/OO language, such as C++. I''d think that playing with Prolog or Lisp could be more useful, but then I''m not much of an expert



Good point. I guess the biggest advantage is that you don''t have to compile it...just tweak and try again. I suppose you COULD also run it interpreted for development and then compile it for shipping (there are Java cmpilers out there I think)...that might let you tweak quickly while still gaining speed later.

Just a thought though. As I mentioned earlier I''ve always thought it would be neat to use Java without actually ever having done it myself...




Ferretman

ferretman@gameai.com
www.gameai.com

From the High Mountains of Colorado

Share this post


Link to post
Share on other sites
Sure MatLab is the way to go. It helps a lot when there is no need to test algorithms with huge amounts of data, and when these algorithms could be refined from the problem area.
I guess that ideally one uses some built-in scripting language, to implement higher-level algorithms, and these that are of the lower level - still have to be written in C++ or something like.

Share this post


Link to post
Share on other sites
Halloween, I''m not entirely sure if your for or against Matlab!?

For those that are interested...

The beauty of Matlab is that like Java, it''s an interpreted language. Basically it''s a form of C script, so if you want to make a small change as Ferretman suggests, you are not wasting time recompiling. Much of the power of C is hidden within built in Matlab library functions so, if you want/need to do something very low level, then yes you can write your own code to do that.
There is no deteriment to using Matlab with large amounts of data as Halloween seems to suggest. Certainly, being an interpreted language, Matlab runs slower than native C. However, the power of Matlab with data is its various forms of the array class. Take for example a simple matrix multiplication. In C or most other languages, you need to write out the multiplication element by element (and hope you dont get an index wrong). In Matlab, you just use the array names in one multiplication equation.

Matlabs real power is in data manipulation and visualisation. There are other scripting languages that have more visualisation than Matlab (IDL for instance) but Matlab is far easier to learn. you can even make games in Matlab (although they dont run very fast!).

I use Matlab predominantly because the sort of AI development I do involves large amounts of data and/or complex mathematical operations. It''s far easier to do it at a high level than to try and implement it in C/C++!

Cheers,

Timkin

Share this post


Link to post
Share on other sites
I use VB, mainly because it is my strongest language and whipping up a quick demo of an idea which is in my head doesn''t take more than a few minutes (you should see how many projects I have which are nothing but a black picture box and a button called "Go" or "Graph" )

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites