Player/Flag Blockers for Meshes?

Make suggestions for improving one of the best games on the net!
Post Reply
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Player/Flag Blockers for Meshes?

Post by LouMan »

Map making would go a lot faster for me if there was some sort of positive way to prevent flags / players from entering meshes due to jitter or other reasons. Almost every mesh I now make needs to have 2 additional invisible faces added to them:

1) A 'flag blocker' face (usually a drivethrough) covering the entire base of the mesh, about .1 units above the ground / surface it rests on. Since flags can't be placed on a drivethrough surface, this prevents them from being placed there.

2) A 'kicker' face to prevent players with jitter from entering a mesh and sniping from inside. This is usually a face with physics that 'bounces' a player out from inside, about .0005 units above the ground / surface it rests on. This surface also needs to be slightly smaller than the base of the desired mesh to prevent inadvertent 'bouncing' while a player rubs against the side of the mesh. This takes a lot of time to get right.

Does anyone know if there could be an improvement in the way BZFlag interprets objects to positively prevent flags and players from entering them?
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

I implemented the point-in-polyhedra a while ago for "inside mesh"
detection, but couldn't commit it to CVS at the time. I've since deleted
it, but it could be redone for 2.2 (or the physics could be completely
redone).
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r »

I figured this out recently. All you have to do is define the inside of the mesh. That makes it "solid" so you can't jitter or force your way inside without getting sealed.

use inside x y z to define a point. Make sure the mesh is closed in all directions.

If you want to see a demo, sped a few minutes at Planet MoFo's Passion of the Polygon. I made that map almost entirely with mesh.
Optimism is just a milder alternative to denial.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

L4m3r:
That's easier said then done for complicated meshes. Inside
points required full visibility of the faces as a set, and are very
expensive to use with large meshes.
User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r »

trepan wrote:L4m3r:
That's easier said then done for complicated meshes. Inside
points required full visibility of the faces as a set, and are very
expensive to use with large meshes.
Yeah, I had noticed the visibility bit.

I got the impression that Louman was party talking about this issue with regards to LaserMania, which is relatively simple, although the segmented berms would be a bit tricky.

In a lot of cases, though, you can fudge it. Most of the time this issue only applies to the ground level of the mesh, so it doesn't have to be perfect.

Just curious, though, is it costly to define a lot of points, or is it costly to have, say, a single point enclosed by a lot of faces?
Optimism is just a milder alternative to denial.
User avatar
LouMan
Chief Sgt. of Cartography
Chief Sgt. of Cartography
Posts: 338
Joined: Mon Jan 31, 2005 3:05 am
Location: Michigan, USA

Post by LouMan »

I experimented with the 'inside' coordinates with the 'BZFlag Rocks!' map I made some time ago and found that it drastically increased the intial time joining the game, but seemed to play ok (fps) after that. I don't know what this is caused by (never claimed to be a dev :wink: ); it was sufficiently bothersome for me to abandon the use of 'inside' coordinates after that. As trepan stated, finding the correct position to define an inside coordinate for a somewhat complicated mesh was difficult - really a time consuming trial-and-error type effort.
Post Reply