Jump to content
The Dark Mod Forums

Search the Community

Searched results for '/tags/forums/code/' or tags 'forums/code/q=/tags/forums/code/&'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • News & Announcements
    • The Dark Mod
    • Fan Missions
    • Off-Topic
  • Feedback and Support
    • TDM Tech Support
    • DarkRadiant Feedback and Development
    • I want to Help
  • Editing and Design
    • TDM Editors Guild
    • Art Assets
    • Music & SFX

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I have updated my Refont program, to now have a function that can analyze a font DAT file for missing or problematic characters. As part of a broader inquiry, I've just applied that program, individually, to all current 'english' font DAT files. I'm reporting the overall results here. I'm sure this will not be a surprise to some of you, but may be to others. Background As you know, TDM fonts are based a bitmap system, derived from 256-character code pages, of which "English" and "Russian" are currently supported. "English" is actually Latin-1, with additional characters to cover more European languages in a single codepage. This is (in theory) quite good for major European languages, less so for less-prominent ones. For each font, bitmaps are distributed in 3 sizes (12, 24, 48 pt), with the engine doing interpolation scaling. Current Font Findings 12-pt Size for All Fonts Only ASCII (i.e., lower range 0-127) characters are provided, no European. For some fonts (stone, mason, mason_glow), the 12-pt DAT is not distributed, so the engine will substitute a larger size, which typically has better Latin-1 coverage. For Fonts Used in Main Menus, HUD, or Subtitles The numbers shown approximate the number of "characters needing work" Fontname Size-24 Size-48 carleton 20 16 carleton_condensed 20 35 mason -- 33 Since 24 pt is not distributed, engine uses 48 pt. stone 30 83 For Additional Fonts Used in FM Readables, Etc. Except for one font (treasure_map), all the remaining fonts are ASCII-only, i.e., no characters in the upper range. In the lower range, routinely the 24 and 48 pt sizes have equivalent coverage. Most of these fonts are fully or nearly complete, while some neglect certain punctuation symbols. The worst is "everette", with 24 "needing work" characters. Further details are here:
  2. Looking at the backtrace and the code, I think the culprit is here: https://github.com/codereader/DarkRadiant/blob/fa4c266a6776516b59740f78f57b849097d97618/radiant/ui/skin/SkinEditorTreeView.cpp#L44 The ThreadedDeclarationTreePopulator is created on the stack and thus deallocated at the end of the function. The EnsureStopped() function is called on deletion (https://github.com/codereader/DarkRadiant/blob/master/libs/wxutil/dataview/ThreadedResourceTreePopulator.cpp#L108) but this doesn't appear to actually wait for the deletion to finish. By the time the deletion request is processed, the object itself is no longer valid. Other usages I see put the object in a shared pointer instead of on the stack. I'll have a chance to look at this properly on Sunday and figure out the best way to fix it.
  3. I've seen fun workarounds like that in other game modding as well. Years ago, maybe even a decade, some fella who was making a mod for Mount & Blade over at the Taleworlds forums revealed that he put invisible human NPCs on the backs of regular horse NPCs, then put the horse NPCs inside a horse corral he built for one of his mod's locations/scenes and then did some minor scripting, so the horses with invisible riders would wander around the corral. The end result was that it looked they're doing this of their own will, rather than an NPC rider being scripted to ride around the corral slowly. Necessity is the mother of invention. I don't know about the newest Mount & Blade game, but the first generation ones (2008-2022) apparently had some sort of hardcoded issue back in the earlier years, where if you left a horse NPC without a rider in its saddle, the horses would just stand around and wait and you couldn't get them to move around. Placing an invisible rider in their saddles suddenly made it viable again, at least for background scenes, of riderless horses wandering around, for added atmosphere. First generation M&B presumed you'd mostly be seeing horses in movement with riders, and the only horses-wandering-loosely animations and scripting were done for situations when the rider was knocked off their horse or dismounted in the middle of a battle. Hence the really odd workarounds. So, an invisible NPC trick might not be out of the question in TDM, even though you could probably still bump into it, despite its invisibility.
  4. All speakers are defined as spheres, with a customisable inner and outer radius. There is no way to change them into any other shape. Implementing support for rectangular speakers would need changes to the core game code.
  5. No I mean you licence (for money) those modules for others to use in their game. But they don't own it. What fits the genre best is if someone would steal your code. Bad for you but good for thief.
  6. Haha good try, i am glad people cant figure it out. I dont want my code to be sold to other people. I want to profit from it big time. That means if i dont find a solution for this project, it will go under forever. Ofc i will take the award as best thief clone anyways. Thats the reality of this genre.
  7. So the sound has full volume on distances up to minDistance, and no volume at distances above maxDistance. I have not found any special meaning for maxDistance = 0 in the code, so I assume such a sound will never be heard due to zero volume. Also, there are some default values littered around the code. Most importantly, sound shader gets minDistance = 1 and maxDistance = 10 by default. Also I think I have seen min=0, max = 10 somewhere in the code. There is little difference between minDistance = 1 and minDistance = 0. Mostly the difference is that fading does not happen within 1 meter of the sound source. Supposedly, setting minDistance = maxDistance = 0 will cause sound to be completely muted. If you want a sound to always have full volume, I think you should set e.g. minDistance = maxDistance = 1000. Of perhaps set "global" flag instead, which disables distance computation completely. Although this probably has different effect (like maybe global sound passes through walls too). Or if you want it to be sharply disabled at 10 meters, then set minDistance = maxDistance = 10... but I see no point in sounds that can be disabled based on distance without any fade. Finally, as I have described at the very beginning of the post, "minDistance" "0" as spawnarg has no effect on current TDM versions. I don't see mindistance/maxdistance settings in these two prefabs in SVN. Maybe this were the issues that someone fixed recently. Or... could it be that you confuse spawnargs with sound shader settings? Actually, I don't see the distance settings on sound shaders either.
  8. As far as I see in the code, minDistance/maxDistance specify the range in meters where volume falloff happens. Let's introduce F(d) as piecewise linear function. Then: F(0) = F(minDistance) = 1 F(maxDistance) = F(+infinity) = 0 F(d) changes linearly from minDistance to maxDistance The sound gain is multiplied by F(d)^2 (i.e. falloff is turned quadratic). If we talk about real physics, the falloff from point sound should linear without any caps. The gain should be multiplied by (1 / d). However, real sound sources are never perfectly concentrated at a point. If a sound source has size S, then the volume at distances up to O(S) will look like constant. I suppose default minDistance is nonzero to replicate this effect. The existence of maxDistance is harder to justify physically. Perhaps it is here for optimization reasons (don't process sounds farther than this). As for quadratic falloff instead of linear, I think the simply wanted the sound to fade away to zero smoothly.
  9. DarkRadiant 3.9.0 is ready for download. What's new: Feature: Add "Show definition" button for the "inherit" spawnarg Improvement: Preserve patch tesselation fixed subdivisions when creating caps Improvement: Add Filters for Location Entities and Player Start Improvement: Support saving entity key/value pairs containing double quotes Improvement: Allow a way to easily see all properties of attached entities Fixed: "Show definition" doesn't work for inherited properties Fixed: Incorrect mouse movement in 3D / 2D views on Plasma Wayland Fixed: Objective Description flumoxed by double-quotes Fixed: Spinboxes in Background Image panel don't work correctly Fixed: Skins defined on modelDefs are ignored Fixed: Crash on activating lighting mode in the Model Chooser Fixed: Can't undo deletion of atdm_conversation_info entity via conversation editor Fixed: 2D views revert to original ortho layout each time running DR. Fixed: WX assertion failure when docking windows on top of the Properties panel on Linux Fixed: Empty rotation when cloning an entity using editor_rotatable and an angle key Fixed: Three-way merge produces duplicate primitives when a func_static is moved Fixed: Renderer crash during three-way map merge Internal: Replace libxml2 with pugixml Internal: Update wxWidgets to 3.2.4 Windows and Mac Downloads are available on Github: https://github.com/codereader/DarkRadiant/releases/tag/3.9.0 and of course linked from the website https://www.darkradiant.net Thanks to all the awesome people who keep creating Fan Missions! Please report any bugs or feature requests here in these forums, following these guidelines: Bugs (including steps for reproduction) can go directly on the tracker. When unsure about a bug/issue, feel free to ask. If you run into a crash, please record a crashdump: Crashdump Instructions Feature requests should be suggested (and possibly discussed) here in these forums before they may be added to the tracker. The list of changes can be found on the our bugtracker changelog. Keep on mapping!
  10. TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/

     

  11. Yet another breaking change, I'm afraid: 6346 Sounds have a bunch of parameters: minDistance maxDistance volume shakes soundClass The base value for each parameter is set in sound shader. However, it can be overridden with a different value in spawnargs (e.g. "s_volume" "-10") or in C++ engine code with SetSoundVolume (used extensively for footsteps). Unfortunately, Doom 3 engine has a special case: setting some parameter to zero means it will not override the base value. So there is no way to override sound volume with 0, because setting zero would mean "use value from sound shader", while setting 0.1 or -0.1 would mean "use volume = 0.1 or -0.1". This behavior causes confusion. It is especially bad when volume is set programmatically, because e.g. volume of player footsteps is computed as a sum of many modifiers (run, crouch, creep, in water, etc.) and it is hard to be sure you don't get zero sum in the end. The idea is to fix this mess and add a "don't override" special value in the system. Speaking of spawnargs, it would work like this: "s_volume" "13.4" = override with value 13.4 "s_volume" "0" or "s_volume" "0.0" = override with zero "s_volume" "" (empty string) = don't override Right now there are tons of zero values set in these spawnargs. It is not clear where the author intended to override with zero, and where he wanted to drop inherited override and use base value. I guess for compatibility reasons I'll have to replace spawnargs "s_volume" "0" with "s_volume" "" in all missions.
  12. Ah, pity I wasn't reading the forums back in February. I'm fond of that game, along with Bugbear's other early title, Rally Trophy. I was never too good at FlatOut, but it was always a hoot to play.
  13. In case anyone decides to pursue this further, here are a couple more references: https://discourse.gnome.org/t/pointer-warping-on-wayland/9197 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/158 Seems like this feature is also common in PCB design software. The "correct" solution would be to use Wayland's pointer locking interface and relative mouse events, which is essentially what the FreezePointer class accomplishes by continuously warping the pointer back to its original location. The complication is that the way it works now all goes through wxwidgets which then goes through gtk3 on Linux. To fully implement this, I think someone would have to: Create a platform-specific alternative to the cross-platform FreezePointer that we have now Make sure it's only called on Wayland, and only if the pointer locking API is available Work your way through the wxwidgets / gtk3 layers to get hold of the native wayland surface and pointer handles Reconcile the Wayland mouse events with the mouse events received by wxwidgets If someone was motivated enough to pick this up, it might make sense to try to build this in at the wxwidgets level and try to get it accepted there. It would help keep platform-specific code in the right place and also make a couple other projects happy.
  14. Mouse look is essential so no. We should use whatever behind-the-scenes solution of messing with the pointer will work... once Wayland or WxWidgets or GTK3 will offer one, it's kind of on them that they haven't up to this point. Until then Jonri's PR works by forcing the X11 backend, which isn't a real solution but in practice solves everything for now. Here's a modified snippet of what I did in PyGame which works. Obviously this code has no effect, just an example to show what works in my project, just in case it's a similar situation here: Maybe Wayland expects us to hide the mouse pointer at a core level before it allows locking, and the reason it doesn't work is DR only hides it visually at top level? pygame.mouse.set_visible(False) x, y = pygame.mouse.get_pos() pygame.mouse.set_pos((x, y)) pygame.mouse.set_visible(True)
  15. I notice that what Blender does is not lock or hide the mouse cursor, but allows it to move, then snaps it back to the other side of the window so you can drag infinitely in one direction. I.e. if you are dragging to the left, when the cursor reaches the left-hand window edge, it immediately re-appears at the right-hand window edge and continues moving to the left. I wonder if re-writing the code to use the Blender approach would solve the problem? Perhaps the back-end code can handle instantaneously changing the mouse pointer position more reliably than trying to lock it in place.
  16. Oh my gosh, thank you for this! After reading what you just said, I realized I've in fact noticed the same thing in another program, but assumed it must be something completely unrelated: I've been working on creasing a CPU based voxel raytracing engine in Python, for which I settled with using PyGame. When the time came to implement first person camera control using the mouse, I noticed it did not work initially... however if I told my code to hide the mouse pointer first, locking it in the center of the window started working. It must be the same thing here in some form, Wayland likely has some very particular expectation on how the mouse pointer must be set in order to be locked. In fact just a few days ago, I tried a virtual worlds software called Vircadia / Overte again to see how it's been progressing. I activated mouse look mode and guess what happened: The exact same behavior of the view spinning endlessly as the cursor drifts away from the center due to lack of locking. So it's clearly happening to many things and not just GTK / WxWidgets related... but no all of them, most games (including TDM itself) work perfectly fine and mouse control never breaks. I'll try your solution later and mention the results, likely tomorrow as it's late now and I need to head off. If it works that would be incredible! At least as a workaround, we could simply not hide the cursor on Wayland, which will look ugly but at least allow using DR without needing hacks until they can solve whatever is happening on their end. Also Plasma 6 was just released, my distribution (Manjaro) will likely be getting it a couple of weeks or at most months from now. I'm curious how that will affect it: Hopefully it won't make the issue worse, but just in case I'd be happy to have a solution in Radiant before then.
  17. I revisited this issue and might have had a breakthrough. I noticed that when using the clipper my cursor wasn't changing, and afterwards when the cursor was no longer hidden when the dragging problem starts happening. If I take out the code that is supposed to change the mouse cursor when activating the clipper, the drag behavior remains correct during and after using the clipper tool. If I remember correctly from last time I went down this rabbit hole, Wayland has restrictions on pointer locking and I think it was only allowed while the pointer is hidden. I'm guessing something with changing the cursor is failing and then it doesn't get hidden before the pointer lock happens, causing Wayland to reject the pointer lock request. And when the pointer doesn't get locked, the math to calculate the drag amount goes all wonky. @MirceaKitsuneor others, if you'd like to try a quick and dirty workaround, find the void OrthoView::setCursorType(CursorType type) function and put a return statement on the first line so it doesn't actually change the cursor. I'll see if I can figure out what's actually going wrong when setting the cursors so we can make a proper fix.
  18. On wikipage https://wiki.thedarkmod.com/index.php?title=Tdm_mapsequence.txt it states: and in the example code: It seems it's possible to define something like this: Mission 1: tunnel street prison Mission 2: lake warehouse1 Mission 3: warehouse2 ending where tunnel, street and prison are different map files and part of the first mission in a campaign of 3 missions. So since it's not fully supported, I wonder what is actually supported by tdm.
  19. @snatcher I understand that when you feel your work doesn't live up to your goals that you don't want it out in the wild advertising your own perceived shortcomings but that leads to a troubling dilemma of authors who are never satisfied with their work offering fleeting access to their in-progress designs then rescinding them or allowing them to be lost. When I was a member of Doom3world forums, I would often see members do interesting experiments and sometimes that work would languish until someone new would examine it and pickup the torch. This seemed like a perfectly viable system until Doom3world was killed by spambots and countless projects and conceptual works were lost. I guess what I am trying to say is that mods don't need to be perfect to be valuable. If they contain some grain of a useable feature they might be adapted by mission authors in custom scenarios. They might offer instructive details that others trying to achieve the same results can examine. It would be great if known compelling works were kept somewhere safe other than via forum attachments and temporary file sharing sites. I suppose we used to collect such things in our internal SVN for safe keeping but even that isn't always viable. If folks would rather not post beta or incomplete mods to TDM's Moddb page, perhaps they would consider creating their own Moddb page or allow them to be added to my page for safe keeping. Please don't look at this as some sort of pressure campaign or anything. I fully understand anyone not willing to put their name next to something they aren't fully happy with. As a general proviso, ( if possible \ permitted ) I just want to prevent the loss of some valuable investigations and formative works. The end of Doom3world was a digital apocalypse similar to the death of photobucket. It is one of my greatest fears that TDM will become a digital memory with only the skeletons of old forum threads at the wayback archive site.
  20. There's a cool trick that is making what you have on your "hand", very small, or at lest smaller enough to not get out of the player collision mesh, so it can never reach a wall, the player collider prevents it. And then move the object very near the camera "lens" and it will look big and normal despite the small size, is a nice trick that I learned a few fps games use. But I don't think is the one idTech 4 uses... Unfortunately I don't recall what that trick/hack is anymore, I just remember something about the engine code having what idSoftware called "weapon hack", probably just looking at the engine code and searching for weapon hack, will give some results, thou like I said, right now, I don't recall how it is used.
  21. Noted. I initially had an idea for a skill-set but when I started working on some of them I wasn't sure what the final form or name would be. I opted for generic names and these generic names are now all over the code. I guess I got used to them. Well, Mission Complete! It is good that people like stuff but I don't get to hear what people don't like. By all means, let us know what you dislike or disagree with and why!
  22. No, I didn't. According to @HMart it needs a hack of some kind? I don't know. Yes, some major and minor pending items. I don't think this one can be fully realized unless it gets a serious Team effort, including some source code support. Sorry but I don't feel like I am the owner, I don't consider it in a "good enough" status and I am not ready to support it. I contributed as much as I could and others shall keep working on it. I won't be uploading it anywhere else.
  23. Congrats on the release! Remember to check ThiefGuild as well as the DarkFate forums (via Google Translate) for additional feedback.
  24. Changelog of 2.13 development: dev17042-10732 * Restored ability to create cvars dynamically, fixing bow in missions (5600). * Fixed issue where .cfg files were saved every frame (5600). * Added sys.getcvarf script event for getting float value of cvar (6530). * Extracted most of constants from weapon scripts into cvars (6530). dev17035-10724 * Support passing information between game and briefing/debriefing GUI via persistent info. Also changed start map & location selection, added on_mission_complete script callback (6509 thread). * New bumpmapped environment mapping is now default (6354). * New behavior of zero sound spawnarg is not default (6346). * Added sound for "charge post" model (6527). * Major refactoring of cvars system to simplify future changes (5600). Known issues: * Bow does not shoot in some missions (only in this dev build): thread dev17026-10712 * Nested subviews (mirrors, remotes, sky, etc.) now work properly (6434). * Added GUI debriefing state on mission success (6509 thread). * Sound argument override with zero now works properly under cvar (6346 thread). * Environment mapping is same on bumpy and non-bumpy surfaces under cvar (6354 thread). * Default console font size reduced to 5, added lower bound depending on resolution. * Added high-quality versions of panel_carved_rectangles (6515). * Added proper normal map for stainglass_saint_03 (6521). * Fixed DestroyDelay warning when closing objectives. * Fixed the only remaining non-threadsafe cvar (5600). * Minor optimization of depth shader. * Added cm_allocator debug cvar (6505). * Fixed r_lockView when compass is enabled. dev17008-10685 * Enabled shadow features specific to maps implementation (poll). * Auto-detect number of parallel threads to use in jobs system (6503). * Improved parallel images loading, parallelized sounds loading, optimized EAS (6503). * Major improvements in mission loading progress bar (6503). * Core missions are now stored uncompressed in assets SVN (6498). * Deleted a lot of old rendering code under useNewRenderPasses + some cleanup (6271). dev16996-10665 * Environment mapping supports texcoord transforms on bumpmap (6500). * Fully disabled shadows on translucent objects (6490). * Fixed dmap making almost axis-aligned visportals buggy (6480). * com_maxFps no longer quantizes by milliseconds on Windows 8+. * Now Uncapped FPS and Vsync are ON by default. * Supported Vsync control on Linux. * Added set of prototype materials (thread). * Fixes to Stone font to remove stray pixels (post). * Loot candlestick no longer toggle the candle when taken. * Optimized volumetric lights and shadows in the new Training Mission (4352). * Fixed frob_light_holder_toggle_light on entities with both skin_lit and skin_unlit. * Now combination lock supports non-door entities by activating them. * Added low-poly version of hedge model (6481). * Added tiling version of distant_cityscape_01 texture (6487). * Added missing editor image for geometric02_red_end_HD (6492). * Added building_facades/city_district decal material. * Fixed rendering with "r_useScissor 0" (6349). * Added r_lockView debug rendering cvar (thread). * Fixed regression in polygon trace model (5887). * Added a set of lampion light entityDefs.
×
×
  • Create New...