Jump to content
The Dark Mod Forums

stgatilov

Active Developer
  • Posts

    6740
  • Joined

  • Last visited

  • Days Won

    231

Posts posted by stgatilov

  1. On 2/15/2024 at 7:18 PM, Baal said:

    Volta 2 crashes to desktop on mission completion before the "mission complete" screen appears.

      Hide contents

    It only happens when I put Belero on the elevator instead of shouldering him.

    Maybe you can provide a savefile?

  2. It turns out we have many people who enjoy discussing code 🥳

     

    My complaint about that code is that all floating point numbers are snapped to integers with same tolerance.

    The .proc file contains a lot of different data: models, shadow models, BSP tree, visportals.
    They contain in different combinations: positions, texcoords, normals, distances.
    Snapping or comparing all of these quantities with same tolerance is a really bad idea.

    Some data is more sensitive to changes than other.
    They even have different measurement units, i.e. you position is measures in something like meter-units, while texcoords are usually measured in something like tex-units, and they are as incomparable as meters and seconds.

    Some data  should not be snapped at all because that could break its internal invariants.
    If you snap coordinates of normal vector, it is no longer normalized, and the receiver has all the fun of dealing with extremely rare cases which normally should not happen.


    As for Hungarian notation...

    I do some mesh processing with halfedge data structures.
    When you have 10 local variables being halfedge handles, 5 local variables being face handles, and 5 local variables being vertex handles, it becomes much easier to understand what's going on if they start with "he" / "f" / "v" respectively.
    But this is very situational of course.

    Just starting pointers with 'p' and array-like stuff with 'a' is usually unnecessary, unless you have 3-4 levels (triple pointer or triple arrays), although in that case the code is smelly regardless or how you name variables 🤔

    • Like 2
  3. When I actually meant pseudographics, I did not mean some specific line/dots/crosses.
    I simply meant the cases when people add spaces until the text gets the exact alignment they want.

    You can't search for such cases, because the only offending character is space, which is present everywhere.
    The only way to proceed to just change spacing and listen for feedback afterwards.
    And it sounds like an OK solution for me in general, but definitely not a good idea for 2.12.

  4. 6 hours ago, datiswous said:

    Do subtitles for voice audio in non-video briefings actually work?

    I have an instance where I can't get them to show up. Or I'm missing something.

    Since briefing is completely redefined by you, you need to add subtitles GUI for them to show up.
    See stock mainmenu_briefing.gui.

    • Like 1
  5. 8 minutes ago, Wellingtoncrab said:

    I am not recalling anything really that interacts with the players inventory directly in the mission. Dropping the glasses with "Drop Inv. Item" and reacquiring them doesn't restore the item to the players inventory either I am guessing?

    The previous reporter who had non-working glasses said game crashes on drop.
    The same happens for me.

    As you might guess, most of the code expects the entity of the inventory item to be alive.
    Anyway, I don't think it is possibled to drop inventory item if it has no entity, because logically it should just put this entity back into the world. If it's dead, it can kill the inv. item, but I don't think it can resurrect the entity.

    • Thanks 1
  6. The "peculiar lenses" don't work for me.
    Neither the ones I bought, nor the second ones I found in some tower.

    Every CInventoryItem (C++ object) stores pointer to entity in m_Item.
    In my case, this pointer is dead, i.e. it points to an entity which was removed some time ago.
    I guess for the glasses to work, it should point to the "atdm:xray_glasses" entity.

    The reason why it works for some people is either because the glasses don't die for them, or because they die but not completely and no other entity created afterwards takes its entity number.

    So the main question is: who kills the glasses entity and why?

    UPDATE: Just to add some more detail.
    I think I'm playing clean latest version with latest TDM beta.

    I got lost pretty quickly, so I completed all the objectives and explored most of the map first. Then I returned to the starting area and went to buy a sword. There I noticed the glasses, bought them and tried to use them instantly: they did not work. Then I explored some more and found second glasses in the tower + a piece of advice to use them. Now I have two items, but they don't work anyway.

    • Thanks 1
  7. This case in Poets and Peasants is something new:

    In this case we have on same line:

    • light
    • brush wall
    • fully closed room
    • closed door with visportal in a brush wall
    • player

    Since only backfaces cast shadows, only the door and the first brush wall can cast shadows.
    The brush wall does not cast shadows because the entirety of its area is unreachable by light.
    So the door should.

    It turns out that all doors that are connected to visportal should automatically get this "forceShadowBehindOpaque" flag. When the door is closed, it closes the visportal and thus becomes part of the wall, just like a brush would be in its place.

     

     

    • Like 2
  8. On 2/7/2024 at 4:18 PM, Geep said:

    I suspect this advice is too conservative. You want to avoid enlarging an xSkip, because the resulting changes to wordwraps could potentially lead to line or paragraph truncation.

    Some GUIs use some kind of pseudographics.
    Reducing the spacing also breaks such readables.

  9. Ok, here is the source of the goddamn precision issue:

    static void WriteFloat( idFile *f, float v )
    {
    	if ( idMath::Fabs(v - idMath::Round(v)) < 0.001 ) {
    		f->WriteFloatString( "%i ", (int)idMath::Round(v) );
    	}
    	else {
    		f->WriteFloatString( "%f ", v );
    	}
    }

    I guess I'll never stop finding more weird tolerance stuff in this codebase 😭

    Anyway, I'll fix this after 2.12: never know the consequences.

    UPDATE: Here is issue in bugtracker 6480

    • Like 2
  10. I looked closer at the problem in Dragon's Claw, and this is caused by some kind of precision issue in dmap.

    The .proc file contains imprecise BSP plane:

    /* node 18377 */ ( 0.0399680398 1 0 1202.8780517578 ) -38 18378

    And also there is a visportal stored there:

    /* iap 62 */ 4 37 50 ( -96 -1200 -488 ) ( 304 -1216 -488 ) ( 304 -1216 300 ) ( -96 -1200 300 )

    The game loads the visportal polygon and computes portal plane from it, which is:

    plane	(a=-0.0399680398, b=-0.999200940, c=0.00000000, d=-1202.87805)

    As you see, the plane normals are different by 0.2%.
    The visportal plane computed from polygon is almost perfectly unit, but the BSP plane is not unit (length slightly greater than unit). This makes the game think it is on the left of visportal in one place, but on the right of visportal in another place.


    I tried to re-dmap but the data is the same.
    I'll try to see what is going on.
    Indeed, making the portal axis-aligned would have most likely fixed the issue.

  11. 10 hours ago, thebigh said:

    I'm seeing the same thing in Dragons Claw, a big chunk of skybox right here:

    I can reproduce this one.
    Enable noclip and execute: "setviewpos 207 -1212 -408".
    Tiny movement by Y and you get proper view, but here exactly at visportal it gets closed.

    @Daft Mugi, does it look like the issue you have?
    I bet it does not.

  12. I tried to debug this.

    It turns out that "global variables" includes all immediate values (including string literals which take 128 bytes each) and all global function declarations (4 byte per function, including even engine events).

    I see 119240 bytes before starting Iris, and 124924 bytes after starting it.
    On Bakery Job, I see 109680 before starting game, 109700 bytes after starting it.

    So It seems that core game takes about 110K, but Iris itself takes only about 10K, and the limit is at 196K.
    Does not sound like a big problem for missions.
    With addons, you have to compile all of them at once, and perhaps there is a lot of code, so you reach the limit.

    Ok, let's double MAX_GLOBALS for 2.12.

    • Like 2
  13. 41 minutes ago, snatcher said:

    Tag: Exceeded global memory size (196608 bytes)

    This is total size of all global variables.

    Here are the limits:

    #define MAX_STRING_LEN		128
    #define MAX_GLOBALS			196608			// in bytes
    #define MAX_FUNCS			3072
    #define MAX_STATEMENTS		81920			// statement_t - 18 bytes last I checked

    I suppose everything except for MAX_STRING_LEN can be raised.

    Perhaps create an issue for 2.13?

  14. 12 hours ago, Daft Mugi said:

    I found the setting that causes it. The glitch happens when anti-aliasing (r_multiSamples) is enabled.

    EDIT: Bisecting shows that rev 10384 is the first commit to introduce this glitch.

    Antialiasing mostly affects some backend logic, while the commit changed data structures in frontend. It is very hard to believe they are linked in any way.

    Maybe the bug is not reliably reproducible?
    Maybe antialiasing is an important condition when it happens, but otherwise it is timing-specific, so accelerating frontend made it pop up. Or maybe antialiasing is just one way to slow gown backend and using maximum soft shadow quality or r_fboResolution 2 would make it happen too.

    Maybe the particular behavior is driver-dependent (e.g. NVIDIA masks the error away).
    Which GPU do you have? Which drivers do you use?
    Which CPU do you have BTW?

    I cannot reproduce it myself, even on Linux VM.
    Does it happen in the very specific viewpos and goes away if you move away slightly?
    Maybe someone else can reproduce it?

  15. 11 hours ago, Frost_Salamander said:

    Getting a bunch of warnings on map start, I think related to subtitles?  It happens when I put the AI entity 'atdm:ai_townsfolk_female' in my map.

    I deleted double-slashes in svn rev 16957.
    I think they were causing the issue.

    I believe it only happens on Linux, Windows side somehow reduces the double-slash to single directory separator.

    • Like 1
  16. 8 hours ago, datiswous said:

    Yeah I guess you could make a script that loads missions, then teleports to different area's and makes screenshots (actually I made a similar script for envshot a while back), but then you have to review all those screenshots?

    Yeah, I wanted to implement some kind of testing framework on top of automation but did not.

  17. 8 hours ago, snatcher said:

    Overriding a single decl sound works as expected but I get some warnings in the console. I don't expect support for mods but I think it is worth mentioning it.

    I think the game treats everything inside "fms" as "mission assets", and everything in game root directory as "core assets".
    You can check it at the start of game console, where all the paths are listed.

  18. 19 hours ago, nbohr1more said:

    Looks like we have one physics based regression?

    Linux users get stuck at the start of mission "One Step Too Far" :

    I committed a fix in svn rev 10636.

    Let's hope it does not break something else in player movement.

    • Like 3
    • Thanks 1
  19. 7 hours ago, snatcher said:

    Reap as you Sow. Beginning of the mission. There's this weird thing going on that I don't see in 2.11:

    I opened DarkRadiant and am now trying to understand how the sun lights were supposed to work.
    No idea thus far.

    Looks like an awful experiment with massive caulk overuse.

    • Haha 1
  20. On 1/28/2024 at 4:50 AM, Daft Mugi said:

    Found a graphics glitch in Accountant 1. Not present in 2.11.

    Does it happen if you disable Frontend Acceleration and set com_smp to 0 (don't forget to restore it back afterwards)?
    Does it happens with clean config (i.e. after deleting darkmod.cfg) ?

×
×
  • Create New...