Okay Yep.
#1077 posted by Qmaster on 2013/09/14 06:36:35
it's a darkplaces bug. Buzzsaws work fine in WINQUAKE.EXE. Is there a gameplay console var fix for this??
Okay...
#1078 posted by Qmaster on 2013/09/14 17:21:23
what's happening with the buzzsaws is that they behave like monsters. They change their movetarget when their bounding box touches a path_corner, not when their origin reaches the path_corner's origin. Now then...to figure out how to ignore path_corner.touch functions....
Buzzsaws Solved!
#1079 posted by Qmaster on 2013/09/14 18:24:27
No code modifications required.
Just positioned my buzzsaws outside of the tracks such that they have time to move and get inline with the path_corners. (had to bsp_to_map the r2m7 map and see what they did to make it work, the buzzsaws were about 64 units away in both x and y directions from their starting path_corner.) There are still a few glitches if the path_corner's are positioned a distance away from eachother that Quake doesn't like, or if the speed of the buzzsaw isn't just right. (10 usually works and is default)
Sounds Good!
#1080 posted by ijed on 2013/09/16 03:28:27
Keeping Score
#1081 posted by mechtech on 2013/09/30 02:10:22
Any mod out there that can count damage done in a level and give a total at intermission?
I think it would be fun. Make a replay of the original game interesting. Timing a quad damage would be very important I suspect.
Stealth Damage
#1082 posted by sock on 2013/09/30 02:13:11
I added damage done to my ITS mod, there is a stealth stats screen you can check at anytime during play of a map.
Sock
#1083 posted by mechtech on 2013/09/30 02:26:29
That's the idea. A mod that can take e1m1 and give a score at the end without modifying anything else. Vanilla Quake with a score card at the end. I'm sure it could get complex give points for health, armor and ammo and suck points off for total time.
#1084 posted by R00k on 2013/10/01 21:30:43
I've added damage given, and damage taken to my multiplayer mods. It's not difficult at all.
I then get a survival skill score by this
score = damage_given / (damage_taken+damage_given)
:D
#1085 posted by Spirit on 2013/10/01 23:28:25
I kinda hope that some day more engines will support sqlite and we could use that to track and record all kinds of things locally. FTEQW supports it.
#1086 posted by Spike on 2013/10/03 18:03:05
sql is only really useful for single player, and even then you can often get away with frik_file instead.
when it comes to deathmatch you probably want some central server recording matches in aggregate, which would likely be programmed in something more php-ey instead of qc. naturally this avoids sql in the game server, but does require some sort of communication to said server...
Extract Vertexes From .MAP/.BSP
#1087 posted by ALLCAPS on 2013/10/03 21:30:38
Is there an easy way to heist the vertex/mesh data from a Quake map? I'm trying to whip up some C# for using Q1 brushwork inside of Unity3D, and I'm hitting a wall.
Since I don't care about the lightmaps or vis data, I figured I'd try to divine the vertex data from the .map, but converting from the brush based geometry (calculating planar convergence) is beyond my skill. It'll probably be easier to let a compiler do the lifting on that and just read the data I want out of the resulting .BSP Are there any libraries available for working with Q1 .BSP?
#1088 posted by metlslime on 2013/10/03 21:33:54
i think the bsp is a better choice as it is more mesh-like, and is already cleaned of things like tjunctions, overlapping polygons, etc.
#1089 posted by Spirit on 2013/10/03 21:47:23
#1090 posted by Preach on 2013/10/03 22:27:07
when it comes to deathmatch you probably want some central server recording matches in aggregate, which would likely be programmed in something more php-ey instead of qc. naturally this avoids sql in the game server, but does require some sort of communication to said server...
The most obvious solution is to program the central server to mimic a client connection to the game server! Sure you waste a client slot on your stats bot, but who plays 16 player deathmatch anymore anyway...Of course you'd communicate directly from the QC using SVC messages to ensure your code runs on every engine. Just write, lets say byte-by-byte UTF8 encoded JSON, wrapped up as a sprint statement to the bot.
Preach goes off to write a web server in QC and is never heard from again
#1091 posted by necros on 2013/10/04 02:05:31
my inner nerd has been awakened. this sounds like such a cool idea :D
#1092 posted by Spike on 2013/10/04 02:17:16
@preach
I know you jest, but there are bots that connect to QuakeWorld servers to scrape scores already...
That said, QuakeWorld does at least support explicit spectators so you don't need qc code to make them non-solid to avoid interfering with the game with free frags.
@ALLCAPS
walk the surface list. each surface has a list of edge indicies (either positive or negative). each edge has two references to each vertex. if the edge index was positive, take the first vert refered to by the edge, if negative then take the second (negate the edge index so its positive, but no bias as 0 is always invalid, and -0 can thus never happen). Walk the edges to get the list of verts for each surface.
To determine texture coords, you'll need to do some maths based upon the texinfo[surf->texinfoid] stuff:
vert.s = (dotproduct(texinfo->vecs[0].normal, vert.xyz) + surf->texvec[0].dist) / texturewidth;
vert.t = (dotproduct(texinfo->vecs[1].normal, vert.xyz) + surf->texvec[1].dist) / textureheight;
where dotproduct is of course ((a.x*b.x)+(a.y*b.y)+(a.z*b.z))
the texture index used is refered to via the texinfo object, which is of course refered to by the surface object.
the texture/miptex lump inside the bsp has this form:
int32 numtextures;
int32 offsetintolump[numtextures];
the start of each actual miptex is a 16 byte name, followed by the width and height as int32s, and if you're using unity or whatever then you should probably just use replacement textures and skip parsing beyond those fields, but if you do, there's an additional 4 offsets to the 8bit paletted image data after the height, expressed as offsets from the start of the texture and not the lump, one for each of the 4 mip levels that software rendered quake supported. You can likely just use the first and ignore the others.
Q3 BSP Header Parsing
#1093 posted by ALLCAPS on 2013/10/04 07:42:21
I decided to swap from using Q1 BSP to Q3 BSP, because there is a lot more documentation on Q3 BSP specs. I'm reading in the bytes for the header and everything looks good except for the first entry in the directory.
The length isn't a multiple of 4. At first I thought it was my code, but I checked the .bsp with a hex editor and it really isn't a multiple of four in the .bsp, and I checked multiple maps. Is this normal?
Is it because it's the entities node, and they're stored as strings/char[]? The spec says each directory's size should be a multiple of 4, and it doesn't say anything about the entities directory being exempt from that.
Noticed
#1094 posted by ALLCAPS on 2013/10/04 08:08:20
That if I "round up" the size of the entities lump to four bytes it then matches with the beginning of another lump, so perhaps it on specifies how many single character bytes there are, instead of how many four-byte dwords it takes up?
#1095 posted by spike on 2013/10/04 12:03:40
4-byte alignment, not 4-byte length.
Figured
#1096 posted by ALLCAPS on 2013/10/04 15:14:34
I finishes up extracting and parsing entities before I passed out, and everything seems to be working! Good to have clarification, though; thank you. This is my first time ever trying to decode/parse a binary blob like this, so I'm learning as I go.
SharpBSP Is Born
#1097 posted by ALLCAPS on 2013/10/05 05:00:52
Here it is. Not finished, but getting there.
https://github.com/mikezila/SharpBSP
Once I have it working well and maybe crank out a winforms application that shows some info about a loaded .bsp I'll make a thread/news post about it.
I use C# instead of C++ partly because Unity3D uses it, and it'll make pulling this data into a Unity game/scene very easy, and partly because I'm a scrub that can't handle C++.
Not that anybody cares, but it's free to take/use/copy/modify.
Bezier Calculation
#1098 posted by ALLCAPS on 2013/10/08 03:56:20
I've made some pretty great strides in parsing and rendering Quake 3 maps. I've hit a snag, though, and that snag is bezier patches.
Here's a video showing what I have so far, and my issue with the patches:
http://youtu.be/8RfwLP0BrSI
Textures, texture mapping/coords are working 100%. Only textures provided by shaders are not working. Animated textures and billboards aren't implemented yet, either.
But issue is that the code to calculate bezier patches is code I lifed from an article on render Quake 3 maps, and did my best to port from what I assume is C++, to C#.
I used these two documents to parse the .bsp and to try rendering the bezier curves
http://www.mralligator.com/q3/ - Map format details
http://graphics.cs.brown.edu/games/quake/quake3.html - Details on converting the vertex systems/scale and bezier curve code
I'm really stuck, as I don't understand enough about bez curves to write my own implementation. Anyone here worked on rendering them that could lend a hand/advice?
#1099 posted by Spike on 2013/10/08 07:21:37
you don't need patches (they're evil), just use q3map2's -patchmeta argument when compiling maps for your game.
q3map2 will then generate trisoup instead.
Aces
#1100 posted by ALLCAPS on 2013/10/08 07:55:27
That's great to know, and I'll use that for sure if I develop a Q3 .bsp intending to load it into uQuake instead of actual Quake, but I'm tackling the issue of rendering the patches for the sake of being able to render existing Quake 3 maps that use them.
ALLCAPS
#1101 posted by metlslime on 2013/10/08 08:45:18
why not look at the quake 3 source code to see how it tesselates bezier patches?
|