News | Forum | People | FAQ | Links | Search | Register | Log in
Fitzquake Mark V
I wasn't planning on doing this mini-project, it started as an effort to address some Fitzquake issues, fix them the right way up to Fitzquake standards (i.e. do it right, once and properly versus continual releases) and donate it back.

FitzQuake Mark V Download:

http://quake-1.com/docs/utils/fitzquake_mark_v.zip

Short version: Eliminated most issues in FitzQuake thread, most issues I can even remember hearing of ever and marked every single one clearly with a very minimal implementation.

It may be the case that only metlslime and Quakespasm and engine coders may find this engine upgrade of interest.

Features: 5 button mouse support, single pass video mode, external mdl textures, alpha textures (like RMQ), record demo at any time, rotation support, video capture (bind "capturevideo toggle"), console to clipboard, screenshot to clipboard, entities to clipboard, tool_texturepointer, tool_inspector (change weapons to see different info), clock fix, contrast support, fov does not affect gun, gun displays onscreen, Quakespasm wrong content protection, external ent support, session-to-session history and .. (see readme).
First | Previous | Next | Last
999 
scrappy = perfectly adequete.

possible host_errors is better than unconditional host_errors, imho.
partial is better than none.

unless baker wishes to propose a different solution for large maps or jerky rotations? :P 
@mankrip 
// protocol flags
#define PRFL_SHORTANGLE (1 << 1)
#define PRFL_FLOATANGLE (1 << 2)
#define PRFL_24BITCOORD (1 << 3)
#define PRFL_FLOATCOORD (1 << 4)
#define PRFL_EDICTSCALE (1 << 5)
#define PRFL_ALPHASANITY (1 << 6) // cleanup insanity with alpha
#define PRFL_INT32COORD (1 << 7)
#define PRFL_MOREFLAGS (1 << 31) // to do - support this...

if its protocol 999, then read a 32bit integer interpreted as the above flags. those flags define how it differs from 666.
If there's a bit set that you don't understand, error out or something.

there is no handshake/negotiation in rmqe, the server dictates and clients are expected to fall in line.

rmqe uses PRFL_INT32COORD| PRFL_SHORTANGLE| PRFL_EDICTSCALE
qs-oms3 uses PRFL_INT32COORD| PRFL_SHORTANGLE
fte uses PRFL_FLOATCOORD| PRFL_SHORTANGLE (which matches dpp5+ and fte clients, as well as avoids extra inprecision...).

ericw missed te 255 apparently (but so does fte, so whatever).
He also missed U_SCALE (which might come back to bite him with illegible server messages on rmqe servers).
QS should probably also warn if any protocol flags are set that his client doesn't support, again to avoid any bewildering illegible server messages.

personally I'd recommend against having the client distinguish between 666 and 999 other than to parse the flags. its simpler to treat them identically except with 666 having flags 0, but that's just my opinion because I hate lots of OR expressions all over the place. 
 
Obviously I want smooth rotation. Would ideas behind this protocol permit the following to evolve in it:

1) Prediction
2) Baseline compression/ack frames.
3) EF_FOLLOW, EF_NODRAW and other flags like DarkPlaces, view weapons
4) Possibly connectionless connections.
5) Team scores in multiplayer? 
@mh 
"alpha insanity" -- that appears several times in the RMQ engine source code. Could you explain what that means? Is that how .alpha in FitzQuake 0.85 if 0 for a new entity should actually be --- I think 255 is full alpha, but I haven't looked. 
 
It's slightly, and amusingly, ironic that one aspect of Quake that RMQ very successfully recreated was the somewhat fucked-up development.

personally I'd recommend against having the client distinguish between 666 and 999 other than to parse the flags. its simpler to treat them identically except with 666 having flags 0, but that's just my opinion because I hate lots of OR expressions all over the place.

I'd agree with this recommendation; I can't remember what way I did it originally, but like I said - the intention was for 999 to be identical to 666 but for the flags, so this approach would work and be cleanest.

Got more detailed info on this?

There's not really much more to say aside from what Spike and myself have said. Protocol 999 was designed in a rush to meet a very specific requirement (a large map going beyond regular bounds) and was left unfinished. Despite that the intention was for it to be easily adoptable and extensible, so bit of forethought was put into how to achieve that. Hence the fact that you'll see that there's a "moreflags" bit already reserved, which signals to send another int (and IIRC the intention was also that bit 31 of this other int would in turn signify even more flags, and so on, so it should in theory be infinitely extensible).

"alpha insanity" -- that appears several times in the RMQ engine source code. Could you explain what that means?

I think this is in reference to the FitzQuake standard of having an alpha of 0 signifying full opaque. I understand why this was done (so a memset-0 would set a good default) but I remember being annoyed by it at the time. Probably unnecessarily annoyed too, I must add: juggling multiple things, 75% of which aren't even working and all of which are needed now for content does tend to stress one out a little. 
@mh 
Kinn managed to get me excited about alpha textures on .mdl --- resulting in a couple of updates. I couldn't resist!

I guess I'll be meditating on the protocol 999 thing. My destination of choice is full, no compromises coop support in a way that would meet Spike's approval.

If protocol 999 is a pitstop on that road or not, I still can't tell although perhaps Spike can tell me.

re: the alpha insanity, I hear you ;-)

(I think I'll use the Pitfall logo for this post, I don't think I ever used that one before ... heh) 
 
in fitzquake, 0 means wateralpha for turb surfaces. other values ignore wateralpha entirely, thus it does make a distinction between 0 and 255.

the problem with extending protocol 999 is a case of who defines the flags.
my own extensions have a chained style, ultimately terminating in the protocol version that they're meant to be extending.
note that fte also has a handshake mechanism (but falls back to stuffcmds for nq).
see also: PEXT2_REPLACEMENTDELTAS|PEXT2_PREDINFO|PEXT2_VOICECHAT, if you're bored.
my personal fear is that everyone defines their own extensions and then I end up feeling like I have to implement 5 different variations of the same extension, each with a different svc or different order of flags etc. each subtly different that I can't share code despite them all fundamentally doing the same damn thing.
unfortunately there is no real authority when it comes to extensions. 
 
in fitzquake, 0 means wateralpha for turb surfaces. other values ignore wateralpha entirely, thus it does make a distinction between 0 and 255.

I was thinking more in terms of entity alpha and FitzQuake's ENTALPHA_* macros, with the memset-0 happening in ED_ClearEdict. 
 
My most ideal thing would be split-screen support with controller support. No idea how that would work but I would be overjoyed with that. 
Coop... 
baker, I don't really do approval, ever...
not sure why you're looking at me specifically about coop.

all I can really say is that coop without some easy way to punch holes through NATs is somewhat futile nowadays, from a usability perspective.
my xmpp thing used an XMPP server for ICE stuff, but needing people to create accounts etc is a significant issue, and even using existing acounts like gmail addresses is filled with far too many nightmares.
I keep meaning to use an irc server or something for it, but I can never find the motivation to try.
You could also run your own specialised server for it, but gah, infrastructure. 
@spike 
I mean your "school of thought" on the efficiency of a network protocol. No I don't mean your explicit approval, per se.

(And maybe with luck I may have a real block of time later this year. Otherwise it's 2017 -- and such is the way of things in this world ...) 
 
Thanks for the code review :) Mankrip: here is the diff to QS. I was meaning to test it more, like test connecting between my implementation and FTE/DirectQ/RMQEngine and demo compatibility, but didn't get around to it yet.

I will look at implementing PRFL_EDICTSCALE.

One thing I need to look more closely at is the "roughround" flag in RMQEngine, in MSG_WriteShortAngle:

// -1 and -2 are legal values with special meaning so handle them
// the same way as ID Quake did; other values can use rounding
if ((f == -1 || f == -2) && roughround)
{
// encode to byte, decode back to float to get the same behaviour as ID Quake
sang = (int) (f * 256.0 / 360.0) & 255;
f = (float) sang * (360.0 / 256);
}

I'm not sure what the purpose of that is.

Also, I am tempted to switch QS to use the 24-bit position to save space. I noticed that with 32-bit positions, QS overflows the signon buffer when loading telefragged.bsp (this map requires something like 48KB with protocol 666..)

My thought on the protocol flags: it's useful if a demo recorded with protocol 999 is playable in any engine that supports 999. This implies freezing the set of flags, because otherwise an old 999 client won't be able to play a demo (or connect to a server) running a new 999 version with new flags.

General thoughts: I'm still sort of meditating on this as well, and it's not merged into the main QS repo. Larger than +-4096 map support only really happens for users/mappers if 999 is enabled by default, you can't expect users to know whether a map requires >+-4096 support and set the sv_protocol cvar accordingly. I even forgot to set it myself while testing oms3_2.bsp and had to restart the level, lol. 
@fifth 
My to do list --- whenever the time comes and it does not feel soon ---

1) ipv6 + what I have been discussion above + automatic background high-speed LAN/non-LAN propogation of current mod running for coop via TCP.
2) Enhanced graphical integration with Quaddicted.
3) Mirrors + security cameras.
4) Linux software renderer build and polish up unreleased OpenGL version which regretably uses SDL because X Windows is a cluster-mess and seems like it was designed by a basement nerd who never used an operating system with a decent GUI --- and even then SDL doesn't cover all the bases, but hats off the SDL guys because it does cover 90% of the way and SDL 2.0 is exceptionally nice and forward thinking.
5) Inter-map travel with single file saves.
6) Absorb remaining ProQuake features. Absorb 1 or 2 remaining JoeQuake features. Mark V already plays .dz demos on any platform with no dependencies, the Mac build for instance. ProQuake will then become just a different build of Mark V.
7) sv_gameplay_fix_qrally_is_a_crappy_mod_dot_com 1
8) Probably add rotation back in.
9) I think I needed to touch up Nehahra in 2 places.
10) Possibly multiplayer save games.
11) Take another look at WinQuake and what I wanted to do but didn't. It wasn't too much, but I can think of a 2-3 things.
12) Would need to check list, I'm sure something else is on there. 
@ericw +1 
re: not knowing if a map requires large map coordinates. 
 
I'm not sure what the purpose of that is.

All discussed here: http://forums.insideqc.com/viewtopic.php?f=3&t=3184

Basically the game uses an angle of -1 or -2 to signify special behaviour rather than rotation. With the default rounding these are transmitted to the client as 0 and the entity draws correctly. Using Q_rint (Fitz & a few others) they transmit as non-zero and the entity is incorrectly rotated. So in certain cases it's necessary to revert to the original engine rounding: the linked thread gives one test map and I remember reliably reproing this bug in a number of engines. 
 
Quakec resets the yaw to 0 after detecting angle -1 or -2 in the spawn function for those entities that support the special values.

The bug occurs when -1/-2 is added to classes that don't support those special values, such as func_train. In that case, the spawn function doesn't reset yaw to 0.

In maps that have this error, it is invisible to players in stock engines by the way those engines do rounding. (at least -1 is invisible, -2 might still show up as a bug) 
@metl 
Cheers, I suspected my explanation was incomplete.

So it comes down to "do you want to support buggy content" then. 
 
i wonder if it's possible to fix the -1 and -2 yaw values without screwing up other entities that are simply spinning in place, like fans. Do func_rotate objects always have a positive yaw? And what about monsters and players that rotate? Do they ever have negative yaws? 
 
I believe this is something that Sock tried to fix in AD in the progs but it broke a bunch of func_doors... found that bug fairly quick. 
Negative Campaigning 
Sometimes for a func_rotate_train you might have a negative angle, if e.g. a waypoint has a destination angle of 270 degrees, and you want the train to perform two full rotations on the way there, you could set the starting angle to -450.

Of course, you could easily redesign so that all the angles in that set-up were positive, there's never a necessity to have negative angles. The problem is 1) insisting on positive angles is changing the rules after the game's started and 2) the bug we're fighting is introduced unwittingly by mappers, so giving them more to think about won't really help.

In an ideal world, I'd introduce a very targeted fix. I don't think you need to deal with -2, because that angle should be visible in normal engines and fixed in testing. What I'd want is for the engine to detect when an entity has received a yaw of -1 from the map file, and render that entity as if it has yaw 0 until its angle next changes. It would still have yaw -1 from the QC's point of view, there would just be a temporary disconnect between the visible angle and the QC.

I thought you could just get away with this by sending a fake angle update over the network at the start of the map, then you wouldn't need to a) monitor whether the angle had changed at all or b) keep a flag to remember if the -1 had come from the map load or not. When I thought about it more I realised that you need to send this message each time the object comes into vision, so that wouldn't work. Is there a way to hack this into the protocol? 
@metlslime 
Mark V has "sv_fix_func_train_angles" to strip negative angles off a train. Defaults on for APSP1.

(Yeah, yeah, Preach and the theoretical train.)

With true rotation, negative angles never happen, the angles are wrapped 0-359.99999 
As It Stands 
Just as a reminder that I am still checking here, still hoping for a fix for the Nehahra bug in the final boss map at least. Solving the Shrak issue would also be nice, because then all the official and inofficial addons would work with this port, which is still pretty much the best out there if you are aiming for vanilla Quake gameplay with a few nice enhancements. 
@NightFright 
According the source code, the Shrak invalid skin number issue should be fixed. Could you confirm whether or not this is still an issue? 
 
Testing with the build from May 8, 2015 (if that is the latest one), it seems I can no longer reproduce the issue, at least not when playing the first few Shrak levels and gibbing mobs like crazy with the rocket launcher. We can consider this one fixed, then.

What remains on my personal list is the Malice issue from #855, the game messing around with FOV until it crashes. 
Update On Malice Issue With Latest Mk V Build 
Update:
I just saw there is a build from Feb 8, 2016. Used that one and tried Malice d16 again. Unfortunately, the Host_error: Bad fov: 180.000000 problem still occurs when the boss pulls you towards him. Also tried by loading the map directly, skipping usage of savegames from earlier builds. 
First | Previous | Next | Last
This thread has been closed by a moderator.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.