Search found 133 matches

by andrewj
Mon Sep 03, 2012 2:13 am
Forum: Engine Programming
Topic: Planes and Point-Plane Collision
Replies: 13
Views: 6750

Re: Planes and Point-Plane Collision

The code in my immediate above post (ds, dt, extents, etc ...) is the code in RecursiveLightPoint in the Quake engine where it checks a polygon collision after the plane match is confirmed
It does NOT do a proper polygon collision check though, it only checks that the point is inside the lightmap ...
by andrewj
Sun Sep 02, 2012 3:10 am
Forum: Engine Programming
Topic: Planes and Point-Plane Collision
Replies: 13
Views: 6750

Re: Planes and Point-Plane Collision

That piece of code figures out the texture coordinate of a point on a polygon.

What's that got to do with collisions?

I wanna say something helpful, but I don't know what you're trying to do.
by andrewj
Thu Aug 30, 2012 2:00 am
Forum: Engine Programming
Topic: Boring Look@Keyboard/Mouse Button Input
Replies: 13
Views: 3655

Re: Boring Look@Keyboard/Mouse Button Input

Baker wrote:Another boring thread ...
I dunno why you said that.

If you wanna say stuff, then say stuff, and let other people decide if it's interesting or not.
by andrewj
Mon Aug 27, 2012 4:07 am
Forum: General Programming
Topic: Doom 3 engine release and game code
Replies: 794
Views: 462306

Re: Doom 3 engine release and game code

reckless wrote: Replaced a number of strlen(somestring) == 0 to somestring[0] == 0 for speed.
Did you really get any speed improvement from that?

Just admit you did it for programming aesthetics :wink:
by andrewj
Sat Aug 11, 2012 5:40 am
Forum: OpenGL Programming
Topic: OpenGL 1.x easy question
Replies: 9
Views: 17125

Re: OpenGL 1.x easy question

You can't make a padded texture tile properly -- it's either use the NPOT extension, or chop up your polygon into pieces which are the same size as the texture (which is pretty painful to code).
by andrewj
Sun Jul 15, 2012 8:15 am
Forum: Engine Programming
Topic: Sending map data from server to client?
Replies: 16
Views: 5432

Re: Sending map data from server to client?

Yeah, at first I merely saw darkplaces and fitzquake had upped MAX_DATAGRAM (renamed in darkplaces) up to 32768 or 65535, but later I found the code in SV_SendClientDatagram which limits the size to 1400 for non-local clients.
by andrewj
Sat Jul 14, 2012 9:26 am
Forum: Engine Programming
Topic: Sending map data from server to client?
Replies: 16
Views: 5432

Re: Sending map data from server to client?

Many thanks Spike, that was really helpful.

P.S. I'm gonna try stuffing tile update messages in the reliable datagram, and increasing MAX_DATAGRAM (which is still 1024 in this antiquated codebase).
by andrewj
Fri Jul 13, 2012 9:48 am
Forum: Engine Programming
Topic: Sending map data from server to client?
Replies: 16
Views: 5432

Sending map data from server to client?

I'm making a 2D game based on the Quake engine, and I need to send 2D map data (tile numbers) from the server to the client, since the maps will be randomly generated on the server.

What's a good way to do this?

At the moment I have it sending tile data in a similar way it sends visible entities ...
by andrewj
Sat Jun 23, 2012 3:57 am
Forum: Programming Tutorials
Topic: PF_VarString crash bug (and fix)
Replies: 10
Views: 19669

Re: PF_VarString crash bug (and fix)

The "fix" in this tutorial has been shown to be bogus, and hence this thread should be renamed and moved out of the tutorials section.
by andrewj
Sun May 27, 2012 9:59 am
Forum: QuakeC Programming
Topic: Quakec Clock
Replies: 11
Views: 5874

Re: Quakec Clock

Is it impossible to start a timer when the map starts and keep checking it to inject events at specific time (like a scripted game - the player walk in an area map and, after 2 min, a monsters horde spawns at his back or whatever)

You can think of every entity in the map as having a built-in ...
by andrewj
Sun May 27, 2012 5:51 am
Forum: Mapping
Topic: Optimizing a large q3bsp with fog
Replies: 7
Views: 4874

Re: Optimizing a large q3bsp with fog

Try adding "_farplanedist" "512" (or whatever value) to the worldspawn entity.

(This just based on looking at the q3map2 source code, I dunno if it actually works)

P.S. "fogclip" and "distancecull" are equivalent to "_farplanedist", but I guess "_farplanedist" is best since it starts with an ...
by andrewj
Tue May 15, 2012 10:32 am
Forum: OpenGL Programming
Topic: Right Distance For Sphere Entirely in Frustum
Replies: 11
Views: 20485

Re: Right Distance For Sphere Entirely in Frustum

(2) is fairly straighforward, the frustum is just 4-6 planes (depends if you count near and far), and you get the distance from a point to a plane by a simple equation which I forget now (something like (p - a) * n where p is a point on the plane, a is the coordinate, * is dotproduct, and n is unit ...
by andrewj
Thu Apr 26, 2012 11:27 am
Forum: Engine Programming
Topic: External Texture Load Speed
Replies: 22
Views: 4769

Re: External Texture Load Speed

@chip: game loading time.
Baker wrote:because it has to look through every entry for every pak file
Fixing that with a hash table or std::map would be trivial, no?
by andrewj
Fri Mar 23, 2012 12:53 am
Forum: QuakeC Programming
Topic: detecting the players current weapons and removing them?
Replies: 4
Views: 2800

Re: detecting the players current weapons and removing them?

Check:
if (self.items & wep)
{
// do something
}

Remove:
self.items = self.items - (self.items & wep)

where 'wep' is IT_SHOTGUN etc...