With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Old WQ3 forum - archived. Links may not work.

Postby Breli » Tue Sep 19, 2006 9:25 pm

That just reminded me of something: bots resp. their visibility calculation seems to ignore entities like doors, breakables and so on. So they'll try to shoot through a 500 meter thick concrete breakable wall if i am not mistaken. I never played vanilla quake and don't know whether it had the same bug or not. If not, it must be a "flaw" in the WQ code ... its quite hard to fix I guess.
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby torhu » Tue Sep 19, 2006 11:04 pm

I guess the bot behavior stems from the fact that the doors in vanilla q3 open automatically when you get close, and also when you shoot at them.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby sig11 » Tue Oct 03, 2006 8:30 pm

This thread is a partial thread from the smoking guns forum moved here. It has been noted a few times before (search the forum) and has its own bug entry :

http://www.westernquake3.net/bug_databa ... tails&id=7

but does not have an own thread.

Anyways, I've just completed a fix 8) ...
In-game name: =SG= Django (yes, it's cliché :-) )
User avatar
sig11
SG Team
 
Posts: 616
Joined: Sun Mar 30, 2003 1:00 pm
Location: Germany



Postby ReD NeCKersoN » Wed Oct 04, 2006 1:00 am

sig11 wrote:Anyways, I've just completed a fix 8) ...

The WQ3 coders rule. :D
Image
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Breli » Wed Oct 04, 2006 1:03 am

sig11 wrote:Anyways, I've just completed a fix 8) ...


I wish there would be a way to give you a BIG virtual gug :mrgreen:

Breli
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby sig11 » Wed Oct 04, 2006 4:40 pm

Thanks guys ! :-)

Just some teaser: now the bots behave much more reosonable on wq_train.

Ah, and I forgot two questions I wanted to ask you mappers:
- Are there any doors made out of any other surface than wood or stone ? (this is what I assumed so far)
- How thick is the glass in windows ? I assumed a thickness of 1.0 (in these coordinates which stretch a few hundred to maybe a thousand in each direction).
In-game name: =SG= Django (yes, it's cliché :-) )
User avatar
sig11
SG Team
 
Posts: 616
Joined: Sun Mar 30, 2003 1:00 pm
Location: Germany



Postby L3th4l » Wed Oct 04, 2006 5:45 pm

There are metal doors too.

The thickness of the glass is dependent on the mapper.. I make my glass about 1 to 4 units thick, while red makes his 4 or more...
User avatar
L3th4l
Smokin' Amigo!
 
Posts: 1948
Joined: Sat Jun 18, 2005 8:06 am
Location: Binghamton, NY. USA



Postby Breli » Wed Oct 04, 2006 8:52 pm

sig11 wrote:Thanks guys ! :-)
- Are there any doors made out of any other surface than wood or stone ? (this is what I assumed so far)


Is there any particular reason why you want to restrict the usage of texture classes for doors with your fix? If not, I vote for full flexibility and would like to use any class for doors ... think of curtains that may open (cloth_) or a window (glass_) ...

sig11 wrote:- How thick is the glass in windows ? I assumed a thickness of 1.0 (in these coordinates which stretch a few hundred to maybe a thousand in each direction).


Like L3th4l said: it depends ...
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby torhu » Thu Oct 05, 2006 12:03 am

There is a way of knowing if an entity is a door, don't know if it will help you. You can also try searching for "-1000" in the game and cgame code, it's only used a few places.

Code: Select all
if (g_entities[trace.ent].s.eType == ET_MOVER && g_entities[trace.ent].s.angles2[0] == -1000)
    // it's a door


And sometimes I wonder if bots can see you through the fence on wq_fort, but maybe they just hear you?
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby ReD NeCKersoN » Thu Oct 05, 2006 12:56 am

I try to make the thickness of my windows look natural to whatever the thickness of the wall is. Thick wall = thick glass. Thin wall = thin glass. But I don't think I'd worry about glass too much since even bots should be able to see through objects that players are able to, imho.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby sig11 » Thu Oct 05, 2006 11:04 am

OK, some more explnations about my questions:
The trace function that's the key to the visibility calculation does not seem to distinguish between doors and windows. I tried CONTENTS_MOVER hoping to catch doors but it did not seem to work. I will have to double check if I can use torhu's logic.

So, I needed one further way to distinguish, and that's the surface (again, maybe I can use torhu's logic). I probably should assume that only glass is transparent and all the rest is opaque.

However, the trace stops at the first encounter, and so I need to step from door to window to door to window etc. in case there are several along the line of sight (which does happen quite a bit). And so the code needs to know how far the trace needs to advance, hence the thickness (maybe with some effort the code can find out the thickness by itself). So far I tested a lot in wq_tillian and wq_lake and a bit in wq_highnoon2 and wq_train, I will test some of Red's maps more extensively to catch some thick windows.
In-game name: =SG= Django (yes, it's cliché :-) )
User avatar
sig11
SG Team
 
Posts: 616
Joined: Sun Mar 30, 2003 1:00 pm
Location: Germany



Postby Breli » Thu Oct 05, 2006 9:10 pm

Ok. I get where you are coming from. As I said: not limiting our options concerning textures classes on doors would be great. I don't know much about how visibility calculations are actually handled by the code during run-time. If I get you right, the engine runs a trace in every direction and tests whether it can "find/see/touch" a player. It'll break off if the surface is too thick.

Can't we add additional key-value pairs in order to make it easier to identify doors/translucent surfaces? Can you check for these easily during engine run-time?

Running all these additional traces will put quite a bit of strain on the servers, I guess. If we can make things easier during map building time, we might consider that option.
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby sig11 » Fri Oct 06, 2006 12:04 am

If I get you right, the engine runs a trace in every direction and tests whether it can "find/see/touch" a player. It'll break off if the surface is too thick.

Almost. It only traces to each entity (player or other bot) and checks if it can see it. So it's not that much anyways - after all, the game does not need to find all the entities ;-) ... only each bot.

Can't we add additional key-value pairs in order to make it easier to identify doors/translucent surfaces? Can you check for these easily during engine run-time?

Theoretically, yes. I've briefly tested if I can use existing ones. But the game has to be able to deal with [/i]all[i] current maps. And it's much less work to do it in the game code than to change all maps ;-)

Running all these additional traces will put quite a bit of strain on the servers, I guess. If we can make things easier during map building time, we might consider that option.

When I started, I was concerned about that, too. But the game does not trace that much to begin with. And as I said, only to all players. And even I with my slow system did not notice any FPS drop. So, don't worry.

In general: I've tersted and changed (and fixed :roll: ) a few things. It turns out the thickness is irrelevant ;-) ... so forget that part. But I'll make the surface detection more general. An update should be done, soon.

Oh, and @torhu: the bots cannot see through the fence in wq_fort. I just double checked that. At least the visibility function does not trigger. They may hear you, though. There is such a "hearing" function, but I did not check that one.
In-game name: =SG= Django (yes, it's cliché :-) )
User avatar
sig11
SG Team
 
Posts: 616
Joined: Sun Mar 30, 2003 1:00 pm
Location: Germany



Postby DeUgli » Fri Oct 06, 2006 7:04 pm

How about bots seeing and shooting through brick walls? I observed that in No Name City, when a bot's rifle barrel came through a second-storey brick wall and the bot shot me. Unfortunately, I wasn't fast enough to get a screenshot.
User avatar
DeUgli
Smokin' Amigo!
 
Posts: 280
Joined: Sat Nov 05, 2005 12:29 am
Location: Seattle WA, USA



Postby Breli » Fri Oct 06, 2006 10:11 pm

That'll be the bank resp. the place in NoNameCity where the safe is, I guess. The whole wall is a breakable and, thus, bots can see through it since entities are currently ignored. AFAIK, sig11's fix will not be able to solve that :? ... we will have to create a property/key value pair for entities that explicitly tells the engine how to treat that respective surface ...
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Next

Return to Bug Report

Show Sidebar
Show Sidebar

User Control Panel

cron