Forum posts

Posted 1 year ago2023-02-19 16:48:48 UTC
in Urby’s Multiple Choice Fan Fiction 2023 Post #347351
Iiiii vote D.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2023-02-07 15:45:37 UTC
in How to make npc's Post #347307
Depending on what you really need, you don't even need an NPC (CBaseMonster), really. You can inherit from CBaseAnimating and handle animation switching manually.

In any case, you can also look into monster_generic's code, you'll find a brutally simple monster example there. (genericmonster.cpp)
Also look into the monsters programming chapter in TWHL's programming book: Monsters Programming - The Concepts of Half-Life's AI
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2023-02-06 13:26:54 UTC
in Reflecting a beam problem Post #347304
There is a way simpler way to get a reflection vector.

Let's construct it piece by piece. Say you have an incoming vector V:
User posted image
And you would like to obtain the reflected vector R:
User posted image
You also happen to know the normal vector of your surface, N:
User posted image
So, we're aiming at something that is roughly the opposite direction of V. We can obtain the dot product of V and N, and it'll give us, well, something for a start:
User posted image
(I'm visualising this rather unconventionally, just note that the dot product will be negative in this instance, something like -0.8)

Now check this out. What if you take that dot product, and multiply V with it in some way? And then add (V*d) on top of N?
User posted image
Hell yeah, we're GETTING somewhere now! (actually you should subtract to get this result, because remember, the dot product is negative in this case)

Now, this is not actually it. Instead of N - V*d let's actually try -2N*d + V and see what happens:
User posted image
This expression can be simplified a bit: V - 2*N*d

So yeah, there's your formula right there.
const float doubleDot = 2.0f * direction.Dot( normal );
return direction - (doubleDot * normal);
If you don't believe me, here's how some engines & maths libraries do it:
https://github.com/godotengine/godot/blob/master/core/math/vector3.h#L516 -> Godot game engine
https://github.com/g-truc/glm/blob/master/glm/detail/func_geometric.inl#L104 -> GLM maths library
I'm surprised this isn't present in some engines & physics engines I know.

What you can do next is also add a bias that multiplies the influence of the normal:
Vector Reflect( const Vector& normal, float normalBias = 1.0f )
{
   const float doubleDot = 2.0f * normalBias * Dot( normal );
   return *this - (doubleDot * normal);
}
And then have a random number on each bounce to simulate surface imperfections. I guess you don't want that, but it's just a fun thought.

Also I honestly don't know how people came up with the exact formula, and I don't know myself, but through experimentation it eventually makes somewhat of a sense. No wonder I'm failing Maths in college lmao. But yeah, hope this helps!
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2023-01-22 16:43:07 UTC
in Programming video tutorials Post #347245
The source code from my videos is now finally available:
https://github.com/Admer456/hl-sdk-videos-src

Some of it could be useful material for TWHL Wiki, temporary entities in particular.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2023-01-12 22:14:40 UTC
in Post your screenshots! WIP thread Post #347232
YESSSSSSSS this is EXACTLY what I like to see!!!! Ottoman Empire (mainly the Balkan part of it) in the 1800s is such an underexplored game setting, I've always wanted to see it in this slick little low-poly form.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2023-01-01 16:52:40 UTC
in Wiki enhancment thread Post #347220
I'm loving this.

The RUST & VERC articles are archives, so I think those should be kept as-is.
TWHL's own guides, however, should definitely have redundancies taken care of. I believe what we have now is, simply, a consequence of transitioning from TWHL's legacy article-writing format to a wiki format, and so long as we have this, the transition isn't 100% complete.
Properly explain how to set up JACK for mapping, ensure things like getting up-to-date compile tools [...]
For years I wanted to rewrite "In the beginning" and basically update a buncha mapping guides into a modern context. I think I could attempt something soon enough.
Ideally tutorials would be split into 2 lists: ones that are known to be up-to-date and relevant and archived ones that are outdated, possibly referencing obsolete tools or older methods.
I agree, it would be nice to categorise those.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2023-01-01 16:01:53 UTC
in Post Your Desktops Post #347219
You seem to have posted an image link to a Discord image. It may work if the image is in a server, but certainly not in DMs, that stuff is inaccessible. You can copy-paste images directly into posts here, or alternatively use Imgur or some other image host.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-12-28 16:44:41 UTC
in Wiki enhancment thread Post #347207
Tutorials can be fun in 3rd person too. For TWHL's books (e.g. the programming series), a 3rd-person style without too much "fun" is a must, because it certainly is authored by several people (Penguinboy, Solokiller, Shepard, me, etc.) and must be consistent.

On the other hand, for guides (esp. series of guides) written solely by a single person, I think 1st-person is acceptable (but you don't want it to be strong). Realistically, it's not like someone's gonna edit a huge chunk of the guide, usually it's just minor improvements like correcting typos, grammar, or some numbers. I will admit I am a little biased, I like seeing personality in tutorials, and I'm particularly guilty of it myself, having written quite a few with lots of... personal touches.

But honestly, if you think about it, people visiting TWHL absolutely don't care who wrote the tutorial - they're interested in the tutorials, not the authors. If they're reading it for recreational purposes or for fun, then yeah, personality is cool. But most people are just looking for explanations and step-by-step guides, so having consistency in writing would be good to have. Having a pretty different writing style in each tutorial would break this consistency a lot.

In conclusion, I honestly dunno, I'd like to have 1st-person but at the same time, it has some side effects I briefly mentioned up there.
If someone really cares a lot about personality/fun and wants to read stuff from a specific author because they're fun to read, there are websites like Medium, where you can write about anything and in any way, within reason that is. That's my take on it.
(obviously, nobody here writes on Medium, but it could be anything really, e.g. I make video tutorials on YT)
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-12-22 20:52:39 UTC
in Need help with modding Post #347195
If you don't have anything to show for the mod, there may be very little interest. It's simply in people's nature to not be interested in ideas, but in final products instead. Having a bit of a vision of that final product helps attract attention.

My personal advice is: it would be easier to learn most those skills yourself (mapping in particular) than to form a team. Definitely try doing that first, and at that point you'll have actual stuff to show too.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-12-20 13:48:01 UTC
in Post Your Desktops Post #347184
At least bother wrapping it in an image tag, @Animator2003
[img:https://i.imgur.com/aAJoIXF.png]
User posted image
Otherwise I'm doing fine, thanks! What about you?
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-12-17 16:24:23 UTC
in Ok, here goes: question, why is a LEAK bad? Post #347180
Sounds like you were using older compilers, these tend to slip things through and compile the map anyway.

A more technical explanation of what happens:
What you actually lose with leaking is something called "outside filling". Normally, the process of BSP filling would strip out all unseen surfaces:
User posted image
That's kinda the beauty of BSP. These X'ed faces get removed. Nowadays we got tool textures like NULL to forcibly do this, but they don't really make a difference if your map is compiled without leaks, unless in some more special situations like with func_detail.

Everything that is considered to be the "outside" of the map is erased. Point entities (player spawns, lights etc.) dictate what's considered "inside", and the world geometry is used to then figure out what's outside from there.

However, with a leak, the compiler can no longer figure out what's inside & what's outside, so ALL faces stay. You get 6x more polygons in the map and it decimates performance basically.

This majorly increases the usage of the following resources, that can be seen if you compile with the -chart option:
  • AllocBlock
  • clipnodes
  • worldleaves
  • map surfaces
So basically, a map that would normally fill up 20% of these limits would, with a leak, fill like 60% or even more.
I hope you now have a bit of a better insight as to how leaks "work".
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-12-17 12:54:04 UTC
in Ok, here goes: question, why is a LEAK bad? Post #347176
Show us a concrete example of that "leak". A leak only counts if the compilers complain about it and prevent you from compiling the map further. I've had "pseudo leaks" where it was actually an enclosed space between my hallways, but it was all NULL faces and nobody ever really noticed. Still doesn't count as a leak, because the compiler didn't yell "LEAK IN HULL 0" or anything.

The disadvantages of leaks are, as Zegfalt said, having your map fullbright, cuz' compilers generally stop at the BSP stage when you have a leak, and so VIS & RAD won't execute. But that's the least of your concerns.

VIS won't execute, meaning most, if not all of your map, will be rendered at once, and this also means all entities are sent at once. This breaks all engine limits (256 max visible entities for example) if your map is large enough.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-11-27 20:28:10 UTC
in Programming video tutorials Post #347134
So, the introduction video has been remade:
Introduction
Happy belated 2nd anniversary, my HL SDK Programming series.

And now we got a video about temporary entities:
Temporary entities
Admer456 Admer456If it ain't broken, don't fox it!
Most of Half-Life was developed in software mode AFAIK, so I'm pretty sure they changed quite a couple of things here'n'there. I mean, just look at the water in software mode.

In Quake, gameplay logic is in QuakeC, but the client code is inside the engine. The client DLL in HL SDK is practically just engine code moved into a separate DLL. I don't think Valve renamed all the .c files into .cpp? No way to check that really, so I dunno.
Admer456 Admer456If it ain't broken, don't fox it!
GoldSRC also separates the hardware renderer and software renderer. hw.dll and sw.dll are actually entire builds of the engine but with different renderers.
Admer456 Admer456If it ain't broken, don't fox it!
"please add realtime rendering"
Hammer, J.A.C.K., even Worldcraft, all have real-time rendering. You can control the camera in real time with your mouse and WASD, and it renders at 60fps. That is real-time rendering, yes.

I imagine you're asking for real-time lights or maybe a lightmap preview. That's probably unlikely. This thread isn't about ideal editor features, but rather, what tools might be good for a programmer to develop one map editor.
Admer456 Admer456If it ain't broken, don't fox it!
I'm pretty sure xash is made off of the 2003 leak engine?
Xash started off as a fork of one of those Quake engine forks, and it used 2003 leak code at some point for a couple of smaller things. I don't remember what, but either way, that got removed from Xash-FWGS and replaced with clean code.

GoldSRC has code from all kinds of places. IIRC it's mostly WinQuake/GLQuake with some QuakeWorld for networking and view bobbing and a teeny tiny bit of Quake 2 for some other things.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-14 20:14:14 UTC
in Obtaining colliding ladder reference Post #346969
Seems like a good enough approximation.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-09 14:04:07 UTC
in Post your screenshots! WIP thread Post #346954
Amazing.

The darkness could be due to gamma settings in-game etc., but also TWHL having pretty bright colours in general.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-05 14:25:56 UTC
in MP5 muzzle flash overlapping Post #346946
I don't think that can be done. Here's the code responsible for ordering the engine to spawn the sprites:
switch( event->event )
{
case 5001:
    if ( iMuzzleFlash )
        gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[0], atoi( event->options) );
    break;
case 5011:
    if ( iMuzzleFlash )
        gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[1], atoi( event->options) );
    break;
case 5021:
    if ( iMuzzleFlash )
        gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[2], atoi( event->options) );
    break;
case 5031:
    if ( iMuzzleFlash )
        gEngfuncs.pEfxAPI->R_MuzzleFlash( (float *)&entity->attachment[3], atoi( event->options) );
    break;
case 5002:
    gEngfuncs.pEfxAPI->R_SparkEffect( (float *)&entity->attachment[0], atoi( event->options), -100, 100 );
    break;
// Client side sound
case 5004:
    gEngfuncs.pfnPlaySoundByNameAtLocation( (char *)event->options, 1.0, (float *)&entity->attachment[0] );
    break;
default:
    break;
}
The R_MuzzleFlash part only accepts a position (here the attachment point on the gun), and a type, presumably the type of the muzzle flash, some sprite ID.
void ( *R_MuzzleFlash ) ( float *pos1, int type );
As you can see, there is exactly nothing there that can possibly change the angles of these muzzleflashes. It is the engine's Efx API that controls this, which is out of a modder's reach.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-05 13:29:02 UTC
in MP5 muzzle flash overlapping Post #346944
Oh, I see, two muzzleflash sprites overlapping. My bad. Well, at least that should be a lot easier to fix. Could write some sorta per-frame bookkeeping/tracking mechanism that checks if a muzzleflash already happened on the current frame, so it doesn't duplicate them.
Admer456 Admer456If it ain't broken, don't fox it!
You can't make a standalone game, since Valve doesn't licence GoldSRC to anybody these days, but you can make a mod with the Half-Life SDK. I'd say Half-Life Updated SDK is a good place to start:
https://github.com/Solokiller/halflife-updated

For HL SDK programming knowledge, definitely start here:
Half-Life Programming - Getting Started

For mapping and other tomfoolery, check out the Tools and Resources page. J.A.C.K., WadMaker, SpriteMaker, GIMP, Audacity are all you need to start modding GoldSRC in general.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-05 13:02:42 UTC
in MP5 muzzle flash overlapping Post #346941
The muzzleflash sprite does not undergo the same "depth hack" as weapons do, meaning it will get clipped against nearby surfaces. Weapons are rendered in a way that they're "squished" along their Z axis (assuming this axis points away from your view), which prevents them from clipping into walls.

Since the engine is in control of rendering sprites, fixing this will require some super specific workarounds, namely preventing the engine from rendering those, and rendering this stuff ourselves in mod code. I am honestly not sure how feasible that would be. At best, one would need to write some custom rendering code (whether it's using OpenGL or the engine's Triangle API) just to render these muzzleflash effects.
Admer456 Admer456If it ain't broken, don't fox it!
Well actually, the Vault has options for NoDerivatives (as well as NonCommercial and some others):
User posted image
Default option is All Rights Reserved™ which, yeah, is about the same as GameBanana's default. What I personally don't like is the lack of CC0, but oh well...

Anyway, I'd just like you to know that there's no "real" way of getting portals from a BSP, i.e. the original .prt file. The BSP doesn't store portals, just BSP leaves and which leaf can see which leaf. Thankfully it's mostly easy to calculate from the BSP's planes because that's what the BSP compilers do, and that's what I believe bsp2prt does as well. Only thing I fear is that VHLT or some compiler down the family line is doing this step ever so slightly differently, which may cause all kinds of issues. Hope not.

BspGuy would be a good candidate to add this sorta functionality to, because you already got a 3D view of the BSP and all.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-03 07:59:42 UTC
in Wiki enhancment thread Post #346926
I am not sure if the Entity Flags category needs further categorisation. I didn't even know it existed until you mentioned it.

The way I imagine it, someone would normally arrive to that page if they're looking for info about a specific entity flag, not to browse them, so, how much value would it really add?
Admer456 Admer456If it ain't broken, don't fox it!
It is perfectly fine. The thing about portal files is that VHLT (the map compilers that come with J.A.C.K. and are the newest ones in general) generates some extra data in the portal file for its VIS to work. The problem is, J.A.C.K. and all other map editors don't parse this. If you open up the .prt file in a text editor, you'll see two numbers, and then a bunch of one-digit numbers afterwards, which is basically the thing J.A.C.K. is complaining about.

There's 2 solutions, you can 1) use Seedee's FixPrt tool or 2) use one of the modified VHLTs, either the latest version of Seedee's SDHLT or my ADMT.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-10-02 20:23:54 UTC
in Programming video tutorials Post #346923
New one! Attachments, controllers, hitboxes and animation events in a nutshell.
Advanced animation
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-26 16:26:23 UTC
in Extracting clip node data from BSP Post #346906
Hmm, I'll need to download BspGuy's code tomorrow and experiment. This was so far just me interpreting the code from its GitHub.
I wonder if it would be enough to perhaps query the BSP with a trace through the func_illusionary brush location to see if it hits something?
Ah! You can actually borrow HLRAD's BSP raycast code... I think... it's meant for hull 0, but could be adapted for cliphull123 perhaps.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-26 08:28:52 UTC
in Extracting clip node data from BSP Post #346903
Might wanna check this too:
int vertIdx = mesh.edges[mesh.faces[i].edges[k]].verts[v];
if (!mesh.verts[vertIdx].visible) {
    continue;
}
uniqueFaceVerts.insert(vertIdx);
Vertices can be visible/invisible too, it appears.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-25 11:38:05 UTC
in Extracting clip node data from BSP Post #346901
Here's my thoughts:

BspRenderer.cpp
L770:
vector<NodeVolumeCuts> solidNodes = map->get_model_leaf_volume_cuts(modelIdx, i);
What's interesting is the return type of get_model_leaf_volume_cuts. NodeVolumeCuts is the BSP planes that "define the leaf boundaries when applied to a bounding box". So these aren't just some random planes, these are effectively the planes that form the convex volume of a BSP node or well, leaf in this case.

L772:
vector<CMesh> meshes;
for (int k = 0; k < solidNodes.size(); k++) {
    meshes.push_back(clipper.clip(solidNodes[k].cuts));
    clipnodeLeafCount++;
}
A CMesh is just a bunch of vertices, edges and faces, nothing special there.
What clipper.clip does is create a box CMesh that is the max size of a map (-131k to +131k units), which actually explains the thing you were seeing there, with -1317821 for the X coordinate. It then proceeds to chop up the box with cuts - the BSP planes that define that node's volume. It removes verts/edges/faces that are below the plane, and retains the ones above the plane, I believe. Or vice-versa. Doesn't really matter, you get the idea.

Basically works the exact same as the clipping tool in Hammer.

L790:
for (int m = 0; m < meshes.size(); m++) {
    CMesh& mesh = meshes[m];

    for (int i = 0; i < mesh.faces.size(); i++) {

        if (!mesh.faces[i].visible) {
            continue;
        }
For the next few dozen lines, it is basically optimising the mesh, removing redundant vertices etc.
And that's... it I think? Get BSP planes that define the convex volume of a leaf, and create the mesh of that convex volume by chopping up the planes against a huge bounding box. Alternatively you can create a polygon object for each plane and cut those polygons up, instead of using a big cube as your starting clipping object.

NGL I did not think it was that simple, just getting the bounding volume of each solid BSP node per hull. Obtaining the list of solid BSP nodes isn't hard either.
Can I see your code? Maybe there's a tiny oversight somewhere.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-22 18:15:31 UTC
in Extracting clip node data from BSP Post #346899
It indeed expands the hulls because the player hull is like, 36x36x72 units I think. Similarly, cliphull2 would be larger, and cliphull3 would be the smallest.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-22 13:48:22 UTC
in Extracting clip node data from BSP Post #346897
I am also curious about generating a triangle mesh from clipnodes.
I think the answer can be found in BspGuy's source code, since that one renders clipnodes. Or at least seems to.
https://github.com/wootguy/bspguy/blob/master/src/editor/BspRenderer.cpp#L755

You could look into the original Quake compiler sources to see maybe how they're generated, but TL;DR you definitely gotta do some form of plane intersection to get polygons in the end.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-16 16:30:33 UTC
in HL1 Mod HUD suddenly disappeared? Post #346877
Always compile both DLLs when editing weapons.

The classic WON-era view bobbing is part of the HL Updated SDK.

The HUD shifting may be a consequence of this:
User posted image
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-12 21:31:44 UTC
in HL1 Mod HUD suddenly disappeared? Post #346870
Hello there, I'm the author of that tutorial.
Did you compile both DLL files? Did you accidentally change hud_draw to 0?
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-04 14:56:25 UTC
in Player speed limit? Post #346853
Refer to sv_maxspeed and cl_forwardspeed, start from CL_CreateMove.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-09-01 17:24:23 UTC
in Wiki enhancment thread Post #346841
In this thread I propose a couple of things and outline my plans for writing content on TWHL.
In short, I am looking to improve navigation for the Wiki articles, establish some sort of guidelines for writing and see what needs to be done regarding introductory guides. Generally, the goal is to make stuff more accessible to beginners. Hopefully we'll get some conversation started.

You all know me, but here's a quick introduction:
I've been writing tutorials for 6 years now, having started writing on GameBanana (please don't look at them lol, especially the first ones), and I found TWHL to be a pretty nice place for that, so I switched to writing here around 2019 or so, and I've been here since 2016 for sure. I am primarily interested in writing mapping and programming tutorials, beginner and advanced ones alike, I just love writing.

Now, here's the thing. This place is pretty nice from the writer's POV (aside from the occasional parser edge case with inline code and so on), and it's pretty nice for long-time members. But I think we can improve the landing a little bit, for beginners that is.

Improved navigation for beginners

What I'm about to say involves a fair bit of assumptions, so take it with a grain of salt.

Let's look at the index page for GoldSRC tutorials:
User posted image
On first glance, this is probably perfectly okay. You got a couple of introductory articles highlighted on the top, and then some subcategories to filter out stuff you don't need. Currently we have 22 mapping tutorials in the beginner category. This is very nice. Let's put ourselves into the perspective of an absolute beginner mapper, who maybe hadn't seen Dimbeak's mapping videos and is coming here. There's a chance they'd navigate here:
User posted image
Just for a second, imagine you know next to nothing about Hammer, or BSP, or carving, or anything like that.

The problem

Now which one of these is relevant to you?
"Introduction to mapping" outlines a bunch of fundamental definitions, but you don't know that yet.
"In the beginning" shows how to create a bunch of different stuff, and because it has multiple parts, you may potentially be turned off by it, thinking it's mega long and complex, like some 30-minute video tutorials. Of course, it depends on the type of person. In reality, it's a series of short, level-headed guides.

(Let's also temporarily ignore the fact that a lot of tutorials involve setting up ancient tools, I'll talk about this in the next section)

The solution

We need something that will almost instantly catch the reader's attention and let them know "yeah, this is exactly what you gotta read".
I'm not a marketing guy, so I can't catch attention all that well, but this is my idea:
User posted image
I published this change today, on the 1st of September 2022, and I am hoping to coordinate future changes like this here. Feedback is well appreciated.
I think this is an improvement because 1) there are now a few concept explanations as well as a troubleshooting guide upfront, and 2) each guide has a brief description next to it. I tried to keep them mostly short. They have an extra chance of helping the reader find the right place to start.

I was also thinking of this design, basically a grid with recommended articles with brief descriptions:
User posted image
On the left side, you have guides for newcomers, and on the right side, I am honestly not entirely sure. I think we can include some in-depth technical explanation guides there, or some interesting advanced tutorials. Tell me what you think!

Guidelines for writing

Oh boy. Ooooooh boy. I'm guilty of this one sort of.
For the sake of consistency, it would be pretty nice to have a couple of guides for contributors/writers. I love high-quality, consistent writing and would love to see that on TWHL. The Programming book is an example of high-quality writing, I like it (I mean, I wrote a chunk of it so I'm biased).

However, I've noticed one lil thing: the parts I wrote are more subjective (1st-person singular is not seldom), the parts by Penguinboy are more objective but both styles still have a pinch of personality, especially Shepard's contributions. Maybe I'm overthinking, but it would be nice to outline the basic style for the books.

Modernisation and quality improvement

Here I'll outline some articles I'll write a modern equivalent of, or improve in some other way. Generally speaking, I'd also add a bunch of 2D illustrations everywhere. These tutorials were written back in the day when pictures were... mmm... very expensive. Not so much nowadays. My tutorials tend to be littered with screenshots and illustrations, often a bit too much even.

Also, here are some brand new articles I wanna write, other than tutorials I typically tend to write:
  • TrenchBroom configuration guide for GoldSRC
  • Guides for Linux?
  • Detailed in-depth explanation of BSP and the entire compilation process
Penultimately, a whole lot of tutorials are prefixed with Tutorial:. However, my interpretation of "tutorial" is that it's a how-to. A chunk of them are what-is, if you get what I mean. Penguinboy suggested "Guide" on Discord, and I came up with "Explanation" a year ago when I wrote about the reason why brushes can't be concave.

So, what I'm saying is, maybe it'd be helpful to separate how-to guides and explanations of things. Explanations don't fit Definitions nor Tutorials the way I see it. Here are some articles that I think can potentially fit the Explanation prefix: Of course, it is possible to just keep them as-is and nobody will probably care. (except me of course, but I'm hypersensitive to details)

Finally, what do you think about linking keywords to their respective Definitions page? E.g. a beginner tutorial might mention ORIGIN, and I think it'd be useful to link to it, in case a newcomer doesn't know, they could simply click on it to see.

It'd look something like this:
"Make sure to give the door an origin brush."

Also, just to make sure, I plan to do most, if not all of these changes. This thread is more for me to see what the community thinks about it, but if we manage to get extra volunteers, that'd be epic.
Admer456 Admer456If it ain't broken, don't fox it!
Inactive tho' and not cross-platform.
Admer456 Admer456If it ain't broken, don't fox it!
I've checked it out, not bad. This is basically the same idea as J.A.C.K. but open-source?
I'm pretty sure they haven't updated that in ages. The Steam version has automatic mod setup which I think is unique to that version. It also had a big update a little while ago, if memory serves me correct.
Automatic mod setup is a plus, but I've done it so many times I speedrun it now. Besides, you won't be making myriads of mod configs, no?
I am not sure about that big update. There's some features in the beta, like sub-unit precision (which is reportedly pretty janky), and the developer still hasn't fixed UV locking. IMO the features it brings are mostly not that useful and don't justify the price tag.

Re: Eto.Forms
Oof, guess Qt is next.
Admer456 Admer456If it ain't broken, don't fox it!
I looked up copperspice, and did not find anything relating to actual code examples,
This is because all Qt code examples should work with CopperSpice just fine. Qt has an extensive documentation, so, yeah. Though, vanilla Qt should also work just fine, as Shepard suggests.

The reason I asked about C# is, some things you might wanna do are a lot easier there than in C++, like native plugins if you ever wanna add that.
Do you have any sorta design document for the editor, or is this a type of pre-planning phase?

Here's mine for example:
https://docs.google.com/document/d/134Chx1BxZPiWVkfK1hIfz5STCDqLrYRA3KRCA18-vQ4/edit?usp=sharing
Admer456 Admer456If it ain't broken, don't fox it!
Hey, I've been thinking about something similar too.
but it is not open source or free (and nobody uses the out of date free Jack, I hope.)
There is absolutely nothing wrong with the free version, I and many others use it lol.
Dear ImGui | I don't think this can be made to look like a normal application. (?)
The real problem is the lack of a good, decent file browser plugin for it, and if you care about laptops, the fact it has to redraw everything so it'll use more battery.

It is possible to create new Qt UI without touching Creator/Designer. I think that's how TrenchBroom goes about it, actually!
There may be an other option
Well, there does exist a certain Hammer-style editor: http://www.evolved-software.com/mapscape/mapscape
However it's closed-source. I remember seeing another repository with a C++ CSG map editor, but that was long inactive and it just said to use TrenchBroom, and I forgot the name...

What do you think about CopperSpice? It is a flavour of Qt but gets rid of some of its baggage.
Also, what about C# instead of C++? There's Eto.Forms which is pretty nice, WinForms but cross-platform basically.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-18 13:34:17 UTC
in C++ aabb-triangle collision Post #346799
I've found this to be pretty useful:
https://gdbooks.gitbooks.io/3dcollisions/content/Chapter4/aabb-triangle.html
It has lots of other intersection algorithms too, like AABB vs. sphere, or AABB vs. plane which is useful for frustum culling.
Admer456 Admer456If it ain't broken, don't fox it!
I don't know how how to exactly trigger a mission completion in CZ:DS, but I can tell you how to approach it.

NPCs should have a "Trigger condition" property. There are several conditions you can choose from: when the player is seen, when the NPC is at 50% health, when the NPC is dead etc. You can use it to trigger some event when the NPC dies.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-18 10:49:14 UTC
in how do i change the size of a decal? Post #346796
I think decals are always fixed in scale, you can't really change that.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-18 10:48:15 UTC
in Programming video tutorials Post #346795
Is it equivalent for these two ways on the capability for implementing any graphical features?
Yes. Both approaches allow you to do any feature, whether it's PBR, shadowmapping, post-processing etc.

The difference is in the level of control you have and what amount of work you have to do.
With hooking, you are overriding parts of the engine. You get partial control or full control, depending on what you override. In some ways, it might be easier, in others it might be harder.
In a single mod, you need to write the entire renderer from scratch. The game state is already there in the form of client entities, i.e. their transformation data & which model they use. You get full control by design, but it also takes the most amount of work.
I was wondering that the new renderer is opaque for the original gameplay
In the case of hooking, it should generally work as a simple "addon" to most mods and vanilla games, so it shouldn't affect original gameplay whatsoever.
In the case of a single mod, it can only be ported to other mods if they are source-available or they don't use any custom code (so you can simply insert your own DLLs there). It's more useful to people who are making mods, so they can have rendering features out of the box and not worry about DLL injection and other stuff that may potentially trigger VAC.

There's a 3rd option, and that is using Xash, which will give you complete engine-side freedom to implement things. It is a Quake fork that mimics GoldSRC, but there are some grey area legal issues.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-17 10:58:03 UTC
in Programming video tutorials Post #346792
Oh, I didn't see your post @Lucida, welcome!
I have a similar ambition, I wanna experiment with writing a renderer that uses NVRHI, so I can have Vulkan and DirectX 11/12. GoldSRC is closed-source so you generally have 2 options: hook into the engine (something like MetaRenderer) or write the renderer inside a mod (something like Trinity).

@Meerjel01
That'd be a topic for a new thread. I think there is a way, but I never looked into it.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-17 10:10:12 UTC
in Programming video tutorials Post #346790
That would be trigger_camera. And yes, it does actually do that.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-16 20:05:04 UTC
in Programming video tutorials Post #346787
There's no view changer, I noclip and lower sv_maxspeed and default_fov so I can record cinematic in-game shots. It might've been me accidentally moving the mouse ever so slightly.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-16 17:41:33 UTC
in Programming video tutorials Post #346785
Controlling animated models:
Animation
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-13 14:51:12 UTC
in Make level change triggers work in multiplayer? Post #346779
That'd be a bit more complicated. You'd need to keep weapon data on the serverside before the level change, and send it to players when they spawn in the next map. This would involve user messages (read: server-to-client messages) and some bookkeeping.
Admer456 Admer456If it ain't broken, don't fox it!
Posted 1 year ago2022-08-12 16:41:05 UTC
in allocblock full Post #346775
Compile with the -chart parameter and you'll see exactly how much AllocBlock you're using.
You can do so by entering the Expert compile dialog and adding -chart after the last " there (make sure you selected $bsp_exe first!):
&quot;$bspdir/$file&quot; -chart"$bspdir/$file" -chart
(notice that there's a space too)

Also make sure your map has no leaks. Then we can start talking.

AllocBlock will get full depending on the number of surfaces in your map, and their texture scales (in the texture application tool). If you have a low texture scale like this:
User posted image
DON'T DO THAT on large surfaces. For small things like signs, it is acceptable, but please don't use it on floors, walls and stuff like that. Use a regular, normal texture scale of 1.0 on those. In some places, you might wanna use 2.0 or 4.0 (like canyons/cliffs). Smaller texture scale means AllocBlock will get filled faster.

If that still doesn't help, you can try increasing the texture scale on ceilings and some walls, and start removing some details. More polygons/faces means more AllocBlock will get filled too.
Admer456 Admer456If it ain't broken, don't fox it!