JKHub CommlinkCouncil Review

Collision and Clipping Issues on Decompiled Yavin Map in JKA

A modder encounters unexpected physics behavior where players get stuck on corners at high speeds after decompiling and moving ctf_yavin. The discussion covers id Tech 3 plane collision quirks, blocksize issues, and potential conflicts with JAPro's custom movement and wallbug fixes.

Channel: #mappingSource window: 2024-01-27 18:12 - 2024-01-28 08:138 posts4 views0 votes
Tags: JKAPhysicsJAProq3map2
Contributors: Deleted User #135808 (60), garuxx (16), tayst (16), ensiform (5), xycaleth (3)
Comms log
[2024-01-27 18:12] <Deleted User> i have an issue where i decompiled ctf_yavin with the map_bp option and then moved the map around, quite a bit away from center horizontally, and now corners clip very weirdly and in unexpected ways, blocking u where normally you could cut them when strafing. im also testing it in jka tho. lots of variables i guess. any ideas what might be causing this?
[2024-01-27 18:12] <Deleted User> it's still aligned to the grid, albeit to a finer grid
[2024-01-27 18:15] <Deleted User> [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1200866742881226792/test_17.png?ex=6a02c58e&is=6a01740e&hm=3a047d6438b31af31bff8b128a2d4d94b349dc715285c2e2b6568a7c59ab4a76&] / [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1200866743325827214/test_16.png?ex=6a02c58e&is=6a01740e&hm=3ff2cfd4077369d64423eb8a8fc3e57e978f160bee5ccbde371ee05996080881&]
[2024-01-27 18:15] <Deleted User> happens mostly at high speeds
[2024-01-27 18:15] <Deleted User> oh yeah japro mod
[2024-01-27 18:16] <Deleted User> race mode jka movement style
[2024-01-27 18:16] <Deleted User> insides of the brushes are caulk
[2024-01-27 18:16] <Deleted User> u should be able to just clip that corner but for some reason u cant (edited)
[2024-01-27 18:17] <Deleted User> lots of other places where it happens too
[2024-01-27 23:21] <xycaleth> how far away from centre did you move it?
[2024-01-27 23:23] <Deleted User> [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1200944181510676521/test_18.png?ex=6a0264ed&is=6a01136d&hm=19e23c7d135aed83e61ad64e39285e903d27614f8d9980f22db33c6f048a12a3&]
[2024-01-27 23:23] <Deleted User> however i actually tried with the normal base map too and it seems to happen there too
[2024-01-27 23:23] <Deleted User> must be a jka thing or bug
[2024-01-27 23:24] <ensiform> Is it on a block size chopped spot?
[2024-01-27 23:24] <Deleted User> uh
[2024-01-27 23:24] <Deleted User> whats that
[2024-01-27 23:24] <Deleted User> re _blocksize?
[2024-01-27 23:24] <ensiform> Yes
[2024-01-27 23:24] <Deleted User> idk but my bloocksize is 8096 and this happens all over the map
[2024-01-27 23:25] <ensiform> That can cause visual glitches like HOM cuts in a brush
[2024-01-27 23:25] <Deleted User> its not a visual glitch
[2024-01-27 23:25] <Deleted User> gameplay is messy
[2024-01-27 23:25] <xycaleth> weird
[2024-01-27 23:25] <Deleted User> oh could it being a func_group be related
[2024-01-27 23:26] <garuxx> physics glitches are normal for idthech3 / you can fix by manipulating normal geometry in abnormal way
[2024-01-27 23:27] <Deleted User> well it works fine in jk2
[2024-01-27 23:27] <Deleted User> idk
[2024-01-27 23:27] <Deleted User> and its just decompiled from that and moved essentially
[2024-01-27 23:27] <xycaleth> i wouldn't think it's a func group thing. it only a kind of container for brushes
[2024-01-27 23:28] <Deleted User> ic
[2024-01-27 23:29] <ensiform> Decompilation isn't always perfect
[2024-01-27 23:29] <Deleted User> hm
[2024-01-27 23:39] <garuxx> from q3 experience it's not something unexpected, especially if you imply skim mechanics there
[2024-01-27 23:39] <garuxx> try this / [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1200948248664354826/image.png?ex=6a0268b7&is=6a011737&hm=32e1b02d861c13a71a7320cd6a0e0eac6fcf876a248d11cccad90994633b42ee&]
[2024-01-27 23:39] <garuxx> if move direction is predefined
[2024-01-28 00:00] <Deleted User> its not predefined really, ppl can play it however they want
[2024-01-28 00:01] <Deleted User> ctf map (edited)
[2024-01-28 00:01] <Deleted User> i dont understand the suggestion
[2024-01-28 00:01] <Deleted User> putting a brush there? or
[2024-01-28 00:11] <garuxx> moving brush
[2024-01-28 00:17] <Deleted User> oh. how would that help? that'd break up the corner
[2024-01-28 00:17] <Deleted User> unless i misudnerstand
[2024-01-28 00:30] <garuxx> help physics to not fuckup 🤷🏿‍♀️
[2024-01-28 00:38] <garuxx> in q3 you can be stopped by wall, while jumping along / [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1200963140804939826/image.png?ex=6a027695&is=6a012515&hm=73e08d919da01c268dd30be2639fa71cab9779b529d4d9c24f3cb6b76d6e7205&]
[2024-01-28 00:39] <garuxx> if inner plane comes 1st in collision test and you land just before it, it will collide
[2024-01-28 00:40] <Deleted User> hmm
[2024-01-28 00:40] <Deleted User> why doesnt it happen in jk2 then
[2024-01-28 00:40] <garuxx> fixed? or fortunate planes order?
[2024-01-28 00:42] <Deleted User> hm
[2024-01-28 00:42] <Deleted User> could decompile + compile lead to a bad order?
[2024-01-28 00:43] <garuxx> recompiling changes order ofc
[2024-01-28 00:44] <Deleted User> ic
[2024-01-28 00:44] <garuxx> idk how's order state exactly / iirc it's not consistent in runtime
[2024-01-28 00:44] <garuxx> at least empirically such stuck in q3 is not consistent (edited)
[2024-01-28 00:45] <Deleted User> and this affects even clipping corners correct? i mean when u land before a corner with high speed and clip through it
[2024-01-28 00:45] <Deleted User> thats what we do in jk2 there
[2024-01-28 00:46] <garuxx> 
[2024-01-28 00:46] <Deleted User> ah. wasnt aware with the word skimming
[2024-01-28 00:46] <Deleted User> how does skimming work in the code, do you know? been wondering for a while
[2024-01-28 00:48] <garuxx> it's state / like / if(land z speed < -200) /  state |= skim /  skimtime = 400 (edited)
[2024-01-28 00:49] <garuxx> then in collision / if( state & skim ) /  return; //keep speed
[2024-01-28 00:50] <Deleted User> nice thanks ill check
[2024-01-28 00:51] <Deleted User> i just compared the .bsp files for the normal map for jka and jk2 aand they are bit-identical so there's gotta be a difference in the code
[2024-01-28 01:05] <Deleted User> hmm the groundtrace function that does the pm_time=250 has a fix in jka in racemode for dead ramps. i wonder if it also can result in killing these corners
[2024-01-28 01:06] <Deleted User> might explain why it happens with these angled corners but not normal ones
[2024-01-28 01:07] <ensiform> Test it with normal game code
[2024-01-28 01:07] <Deleted User> i'll ask the guy who was good at reproducing this tomorrow to try outside racemode
[2024-01-28 01:07] <Deleted User> that should help figure it out
[2024-01-28 01:59] <garuxx> q3 issue of being stopped by inner planes can't be fixed by gamecode, plane tracing business lives in engine
[2024-01-28 07:58] <tayst> Jka and jk2 has very different bg_pmove code for this type of stuff. And then even further in japro which tried to remove wallbug completely
[2024-01-28 07:59] <Deleted User> wallbug?
[2024-01-28 08:00] <Deleted User> in japro racemode we have a thing where if a ramp doesnt give you boost we force it to. im basicaally wondering if thats whats happening here. force caalling ClipVelocity
[2024-01-28 08:00] <tayst> https://youtu.be/C_19d5Zuc4Y?si=mq9ivWk1THQxBKnA
[2024-01-28 08:00] <tayst> Lots of different variants of the bug
[2024-01-28 08:01] <tayst> That’s another japro fix, for nospeed ramps which is another q3 bug
[2024-01-28 08:04] <tayst> Stepslide fix, OBs, it’s all different in japro so this type of question is best answered by checking behaviour with normal game code first at least
[2024-01-28 08:04] <tayst> Since there’s many places it could be japro specifically
[2024-01-28 08:04] <Deleted User> yeah next time i see retpecs ill asak him to try outside racemode
[2024-01-28 08:05] <tayst> Is he sticking to the inversely sloped walls on yavin
[2024-01-28 08:05] <Deleted User> ah
[2024-01-28 08:05] <Deleted User> he gets stuck
[2024-01-28 08:05] <Deleted User> completely dead in his tracks
[2024-01-28 08:05] <Deleted User> when trying to cut the corners at high speed
[2024-01-28 08:05] <tayst> Yep that’s nothing new happened on any japro version of any yavin map
[2024-01-28 08:05] <Deleted User> gg
[2024-01-28 08:05] <Deleted User> would be nice to fix
[2024-01-28 08:06] <tayst> I noticed this very quickly playing on hvn
[2024-01-28 08:06] <tayst> It’s most likely a japro code issue I think
[2024-01-28 08:06] <Deleted User> ic
[2024-01-28 08:06] <Deleted User> its maaking the yavin sightseeing map quite a bit less fun
[2024-01-28 08:07] <tayst> I’d start by searching japro game module code for wall bug if I was you
[2024-01-28 08:07] <tayst> Figure out a setup to reproduce, shouldn’t be hard, just try to do a big corner skim on the reverse sloped walls
[2024-01-28 08:07] <Deleted User> i'll start by figuring out if its outside racemode too
[2024-01-28 08:07] <tayst> It is
[2024-01-28 08:07] <Deleted User> retpecs was good at reproducing it
[2024-01-28 08:08] <tayst> Unless it’s changed it happened outside of race mode on hvn to me alll the time
[2024-01-28 08:08] <Deleted User> ic
[2024-01-28 08:08] <tayst> But yea then just see if it’s the japro wallbug fix causing it
[2024-01-28 08:09] <tayst> Ideally want to check if it happens on like openjk too but i understand setting up where new test env with testers can be a pain
[2024-01-28 08:13] <Deleted User> aye
Transmission Thread

Deleted User #135808

I'm having an issue where I decompiled ctf_yavin using the map_bp option and then moved the map quite a bit away from the center horizontally. Now, corners clip very weirdly and in unexpected ways, blocking you where normally you could cut them when strafing.

I'm testing this in JKA using the JAPro mod in race mode. It's still aligned to the grid, albeit a finer one. It happens mostly at high speeds; the insides of the brushes are caulk. You should be able to just clip that corner, but for some reason, you can't. It's happening in lots of other places too.

Attachment
https://cdn.discordapp.com/attachments/1103343199113711766/1200866742881226792/test_17.png?ex=6a02c58e&is=6a01740e&hm=3a047d6438b31af31bff8b128a2d4d94b349dc715285c2e2b6568a7c59ab4a76&
Attachment
https://cdn.discordapp.com/attachments/1103343199113711766/1200866743325827214/test_16.png?ex=6a02c58e&is=6a01740e&hm=3ff2cfd4077369d64423eb8a8fc3e57e978f160bee5ccbde371ee05996080881&

xycaleth

How far away from the center did you move it?

ensiform

Is it on a block size chopped spot? Check your _blocksize (default is usually 1024, though some use 8096). That can cause visual glitches like HOM cuts in a brush.

Deleted User #135808

Here is the distance: https://cdn.discordapp.com/attachments/1103343199113711766/1200944181510676521/test_18.png?ex=6a0264ed&is=6a01136d&hm=19e23c7d135aed83e61ad64e39285e903d27614f8d9980f22db33c6f048a12a3&

I actually tried with the normal base map too and it seems to happen there as well, so it must be a JKA thing or a bug. It's not just a visual glitch; the gameplay is messy. Could it being a func_group be related?

garuxx

Physics glitches are normal for id Tech 3. You can sometimes fix them by manipulating normal geometry in abnormal ways. In Quake 3, you can be stopped by a wall while jumping along it if the inner plane comes first in the collision test. If you land just before it, it will collide and stop you dead.

Attachment
https://cdn.discordapp.com/attachments/1103343199113711766/1200963140804939826/image.png?ex=6a027695&is=6a012515&hm=73e08d919da01c268dd30be2639fa71cab9779b529d4d9c24f3cb6b76d6e7205&

Recompiling changes the plane order, of course. I don't think the order is consistent in runtime, but empirically, these 'stucks' aren't consistent either. This affects 'skimming'—where you land before a corner at high speed and clip through it. Skimming works in the code by checking land speed; if it's high enough, it sets a skim state for a few hundred milliseconds to keep your speed during collision.

Deleted User #135808

Why doesn't it happen in JK2 then? I just compared the .bsp files for the normal map for JKA and JK2 and they are bit-identical, so there's gotta be a difference in the code.

I noticed the groundtrace function that handles pm_time=250 has a fix in JKA racemode for 'dead ramps.' I wonder if that's killing these corners. It might explain why it happens with these angled corners but not normal ones.

tayst

JKA and JK2 have very different bg_pmove code for this type of stuff. JAPro goes even further because it tried to remove the 'wallbug' completely. There are lots of different variants of that bug. JAPro also has fixes for 'nospeed ramps' (another Q3 bug), stepslide fixes, and OBs.

This type of question is best answered by checking behavior with normal game code first. If it's the JAPro wallbug fix causing it, you'll see it on any JAPro version of Yavin. I noticed this very quickly playing on HVN. I'd start by searching the JAPro game module code for the wallbug fix and see if you can reproduce it outside of race mode. Ideally, you'd want to check if it happens on OpenJK too.

Deleted User #135808

Yeah, he gets stuck completely dead in his tracks when trying to cut the corners at high speed. It's making the Yavin sightseeing map quite a bit less fun. I'll start by figuring out if it happens outside of race mode as well.