@spike
#2361 posted by Baker on 2017/07/28 07:59:22
Does FTE+999 do prediction? If so, I must have missed noticing that in the changelog.
I was under the impression that FTE+999 didn't do prediction.
@Baker
#2362 posted by Spike on 2017/07/28 09:41:49
yes, but QSS doesn't, even over DPP7.
Adding the physics changes required for reliable prediction means changing physics, and I didn't want to deal with the politics of that, so QSS retains the physics that mappers are actually comfortable with. My idea was to eventually implement CSQC, at which point the QC would be able to do all the prediction itself, which would save me from the politics (everyone blame whoever wrote the qc!).
But yeah, FTE+999 is roughly equivalent to DPP7, but QSS doesn't support prediction either way.
Regarding Maphacks, Map Sources, Compilation And Entity Numbers
I debated whether this should go in the "teaching old progs.dat new tricks" thread or this one, but I guess you could also see this as a request of sorts... So here it is.
If I add a maphack that references another entity, for example the "CastLightning" hack, that references an "enemy" field. I notice that the hack can break if I've added a "not in x skill" flag on an earlier placed enemy.
In this situation the edict / enemy number gets displaced.
Are these handled in qbsp? or in the compile tools chain?
Is it possible to have qbsp process any enemies with these flags last? OR is it possible to give entites a key that qbsp searches for and places them first, before any mobs?
Cheers,
Snaut.
forgot that I asked a similar question to what was answered in #2350
#2365 posted by Baker on 2017/07/29 17:56:08
ahh 3 skill versions... seems hacky, but acceptable.... or maybe I'll just delete and replace the mobs.
.MAP-file Parser
#2367 posted by quakeulf on 2017/08/03 09:22:03
Has anyone here made a parser for the .MAP-format for games like the Quake and the Quake 2? I've looked into making one myself to allow for wanton random generation of maps (or parts of maps/prefabs). It would be like an upgraded Oblige but with more focus on generating interesting architecture with decent texturing.
The .MAP-file format is pretty elegant TBQHWYFAMs and I don't think it would be a too taxing task to do.
There's Someone @ QuakeOne.com
#2368 posted by Mugwump on 2017/08/03 10:07:11
working on something like that. Forgot who and the name of his mod. You might wanna check the works-in-progress section there.
Who? Where?
#2369 posted by quakeulf on 2017/08/03 11:11:37
I'm sorry but I can't seem to find it...
Don’t Remember
#2370 posted by Mugwump on 2017/08/03 11:37:24
Been a while since I saw that. If I stumble upon it I'll let you know.
Trying To Compile Latest FTEQW
#2371 posted by anonymous user on 2017/08/04 00:50:45
fteqw-code/engine/client/r_surf.c:3299:16: error: ‘com_resourcemutex’ undeclared (first use in this function)
Sys_LockMutex(com_resourcemutex);
#2371
#2372 posted by Spike on 2017/08/04 01:11:56
cd fteqw-code/engine && rm config.h && make m-rel && release/fteqw -basedir whatever
If that doesn't do it then you're going to need to give more info, like what OS you're trying to compile it for/on. Stuff like that matters when it involves threading.
#2373 posted by anonymous user on 2017/08/04 01:17:13
Still problems. Ubuntu 16.04 64-bit.
#2374 posted by Spike on 2017/08/04 02:21:22
revision 5134 compiles fine for me on 64bit ubuntu 16.04.
try make clean
revert stuff listed by 'svn status' (or just delete everything listed).
and try 'svn up' to make sure you've actually got the current version (and replace anything you may have deleted above).
other than that, I've no idea - it should just be a case of checking out, switching to the engine dir, and running 'make m-rel'.
QC And Resetting.
Is there any way to preserve an entity through a "reset" command?
I have an entity called "settings_pig". I'm using him to shuttle settings across saves. It works fine for this, but I need some settings to persist after a reset. Is there any way to do this?
I've been using the temp1 cvar, but I can only use that for a little bit of information. Any thoughts?
Ignore Previous Question...
I found a (hacky) solution... I can encode more data than I thought into temp1
#2377 posted by Baker on 2017/08/08 04:26:09
Settings shouldn't persist across a reset.
Type "coop 1; map e1m1" in the console if you want things to remain unchanged after death.
You can even save the games (as long as you don't change maxplayers from 1 to a higher number).
Random Question
#2378 posted by Qmaster on 2017/08/25 20:31:58
random()'s purported result is 0-1.
In ID1 the ai_melee function does:
ldmg = (random() + random() + random()) * 3;
Soooo...this means that you could receive 0 damage from a knight slash??? Granted low probability due to having 3 of the random()'s and ai_melee being used on multiple anim frames.
Random Question
#2379 posted by Qmaster on 2017/08/25 20:32:02
random()'s purported result is 0-1.
In ID1 the ai_melee function does:
ldmg = (random() + random() + random()) * 3;
Soooo...this means that you could receive 0 damage from a knight slash??? Granted low probability due to having 3 of the random()'s and ai_melee being used on multiple anim frames.
How Random
#2380 posted by Spike on 2017/08/25 23:04:39
its worse than that.
the vanilla qcc had a bug that caused any operator with function calls each side to discard one side and use the other for BOTH terms.
so (random()+random()+random()) really just ends up as (random()*3).
(for anyone weak at statistical maths, adding 3 different randoms gives a value biased towards 0.5*3 instead of an even distribution, assuming no qcc bugs)
which is of course more likely to return extreme values like 0 or 1.
whether random() can actually return 0 3 times in a row depends upon the implementation. Some of the simpler ones just use a lookup table and might not have 3 such entries in a row. others might work more on a bit rotation basis and similarly be unable to return the same thing 3 times in a row. true randomness is basically impossible on current hardware, especially if you've no access beyond the userland.
side note: returning 1 is more problematic, at least if you use arrays. array[random()*array.length] = error! you can bias it, but then the last element is less likely which is undesirable too.
so dp+fte never return 1 from random(). they do return 0 though.
other side note: you can die even with health > 0!.. death occurs at health<1 (instead of health<=0). stat truncation results in interesting quirks otherwise.
Well, Probably Not
#2381 posted by Preach on 2017/08/25 23:13:20
Remember that random is really a pseudo-random number generator - a fixed stream of numbers which looks random from one to the next and starts in an unpredictable place. It will once in a blue moon throw out an actual zero, this is the cause of the frozen monster glitch. However, I suspect that the PRNG being used here won't actually have a stream of numbers long enough for three zeroes in a row to ever occur.
Technical details: one of the important details in a PRNG is the "period", how long a string of numbers it produces before it loops back round. While a good quality PRNG like Mersenne Twister has a period with 19936 digits (in binary), that was developed in 1997, a year after Quake came out. Doubt anybody's gone to the effort of upgrading Quake's PRNG in the meantime.
Although I can't be bothered to check what Quake does uses (or gets from the default C libraries) I'd guess it's got a period of 2³². If this was used to generate 23 bit numbers (size of the mantissa in floating point) I would estimate the chance of a particular number appearing twice in a row anywhere within the sequence at 2³² / (2²³ * 2²³ ) = 2⁻¹⁴. So while we'd expect some numbers to occur in pairs, there's no guarantee 0 would be one.
And that's just pairs, when we go up to triples we're looking at something 2²³ times less likely, which is actually exceedingly unlikely to even happen once in the 2³². In other words, chances are the RNG in Quake will never output any single number three times in a row.
I Like How...
#2382 posted by Preach on 2017/08/25 23:15:10
..I take 4 paragraphs to say what spike can cover in just 1
Randumb
#2383 posted by Spike on 2017/08/26 01:38:17
and usually its me that writes the essays...
one thing I feel I have to point out is that quake uses the libc's rand() function, masked by 65535.
entropy is not spread evenly, and most spread the randomness on its high bits.
so that's bad.
I ended up writing my own rand() function to avoid shitty random numbers provided by emscripten's rand... quake's particle system uses a few of the low bits, and emscripten's was just far far too predictable, instead of a random mix of directions half of the particles in each puff went the exact same direction!
its also worth noting that a real random number generator should be happy to return the exact same value repeatedly some times, but generally humans actually want their random number generators to be LESS random. So rand()&0xffff being 0 three times in a row is actually quite unlikely with such a screwed up human-friendly generator.
either way, if its any value < 1 then the player might not notice, so yeah, 0 vs any damage value <1, not that much difference really.
(is that better, Preach?)
Fun Fact...
In order to implement seeds in my (progs only) monster randomizer I ended up using random number tables. Doom style.
Ceil
#2385 posted by Qmaster on 2017/08/26 16:05:45
The damage function uses ceil to round up the damage so most of the time any values less than 1 get rounded to one. Since it is nigh impossoble to get 0, 0, 0 (using latest FTEQCC so I expect to have all 3 random()s), and 0, 0, >0 is more likely, I would expect the damage range for an ai_melee call to be 1-9 instead of 0-9.
|