Master thesis subject

584aae65fa9c3bb65e4816691f977680
0
marshall 101 Mar 29, 2007 at 14:29

Hello, im am a programmer currently studying A.I. and soon i will start with my master project.

My idea is to focus on squad based A.I. in a first person 3d shooter, but this leaves me with some questions:

  1. What is the best ( or: a good) game to use for this purpose. I would like to implement my A.I. in an existing game, since i dont want to spend to much time on anything but A.I.

  2. I have looked into the quake3 source, and made some very simple mods. It seems reasonably easy to implement simple features, but since I cant run it from VC++ directly, I am unable to trace, or otherwise debug easily. I fear that this could be a very big problem when implementing complicated A.I. features. Does anybody have experience with implementing A.I. in quake3, or any other (relatively new) 1st person 3d shooter?

I hope someone is willing to help me, since I really have no clue how to approach these initial (and important) choices.

11 Replies

Please log in or register to post a reply.

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Mar 29, 2007 at 14:56

but since I cant run it from VC++ directly

Why not? Are you talking about the game executable or the game-logic “scripts”? The former is definitely runnable, the latter is runnable if you compile it as a dll rather than as bytecode (using the special compiler).

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 29, 2007 at 14:57

@marshall

I have looked into the quake3 source, and made some very simple mods. It seems reasonably easy to implement simple features, but since I cant run it from VC++ directly, I am unable to trace, or otherwise debug easily.

I haven’t ever made a mod for Quake3, but if it uses DLLs for mods, you should be able to debug it by using VC++’s Attach To Process feature. It might be handy to have two monitors if you don’t already, so you can run the debugger on one and the game on the other (minimizing or task switching away from a game can be a bad idea).

Another possibility would be HL2 (the Source engine); it’s highly moddable and I think it already includes some pretty sophisticated AI.

584aae65fa9c3bb65e4816691f977680
0
marshall 101 Mar 29, 2007 at 15:07

@.oisyn

Why not? Are you talking about the game executable or the game-logic “scripts”? The former is definitely runnable, the latter is runnable if you compile it as a dll rather than as bytecode (using the special compiler).

I tried to do everything as much as possible like the tutorial stated. So I opened the VC++ project that comes with the “quake source download”, and opened it. When I try to run it, it asks for an exectable (which should be quake3.exe -> according to the tutorial), but when I then run it, it wont load since it cannot find the files it needs (files from the map baseQ3). This is not so weird since the source is not in the same map as the executable. When I copy the quake files to my source map, i am able to run the game from VC++, altough it seems like it is just running quake3.exe, and the just compiled source is just ignored, since changes in the code are not visible, and breakpoints that are set, do not get triggered.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 29, 2007 at 15:12

You probably need to pass some command-line arguments to quake3.exe to tell it to load your mod. You can do this in the project settings, under debug.

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Mar 29, 2007 at 15:58

@marshall

I tried to do everything as much as possible like the tutorial stated. So I opened the VC++ project that comes with the “quake source download”, and opened it. When I try to run it, it asks for an exectable (which should be quake3.exe -> according to the tutorial), but when I then run it, it wont load since it cannot find the files it needs (files from the map baseQ3). This is not so weird since the source is not in the same map as the executable. When I copy the quake files to my source map, i am able to run the game from VC++, altough it seems like it is just running quake3.exe, and the just compiled source is just ignored, since changes in the code are not visible, and breakpoints that are set, do not get triggered.

You should set the working folder in your project configuration to quake3’s root folder (e.g., C:\quake3). This is what matters, it does not matter where the actual executable is located. The breakpoints may not hit because matbe you’re running the original executable rather than the one you have compiled?

584aae65fa9c3bb65e4816691f977680
0
marshall 101 Mar 29, 2007 at 17:01

thanks for the help. It turned out that everything runs fine when i use the command line arguments, and set the right working folder.

changes occur directly now, and breakpoint also seem to work. One thing i wonder tough: when im running the project, and a breakpoint gets triggered, i cant get to my VC++ screen, since quake refuses to let me. The screen just freezes, and the sound starts repeating. I have had this problems with other fullscreen application to: is there any way to get past this ( I am under the impression that quake does not support window mode).

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 29, 2007 at 22:05

Like I mentioned, use two monitors (or, if you have a second computer around, you may be able to use remote debugging).

Unfortunately, many games don’t play well with task switching even when they’re running normally, and when they’re frozen by a debugger breakpoint it’s anyone’s guess what’ll happen. However, the situation might be improved under Windows Vista, due to its new window manager.

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Mar 29, 2007 at 22:09

Q3 does support windowed mode, that would be the best way to debug.

Using multiple monitors like Reedbeta said might be an option, but if I’m not mistaken the debugger requires the primary monitor, and there’s no in-game option to choose the hardware device in q3 (which therefore also defaults to the primary) - although there might be a q3 console flag that controls which device is used.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 30, 2007 at 00:28

@.oisyn

the debugger requires the primary monitor

Just curious, but why is that? What keeps you from dragging the VC++ window over to the second monitor?

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Mar 30, 2007 at 09:14

I have no idea, but I’ve read that somewhere in the MSDN. However, I can’t seem to find that anymore :P

4e70f904a74bd2aa8773733b25b77d41
0
SigKILL 101 Mar 30, 2007 at 12:55

VC++ also supports remote debugging if you have an extra computer. The link of the day is http://www.kbalertz.com/Feedback.aspx?kbNumber=841177